[11446] Reimplement corpse enter to instance.

* Resurrect player _before_ enter to instance with corpse
* In case corpse in more deep instance teleport to corpse instance inner entrance.
* If by some reason player can't enter to corpse instance it will just resurrected before entrance.

Original patch and research done by Den.
This commit is contained in:
VladimirMangos 2011-05-09 00:53:21 +04:00
parent 6d28c7dfd0
commit 605fb79847
4 changed files with 65 additions and 69 deletions

View file

@ -169,17 +169,6 @@ void WorldSession::HandleMoveWorldportAckOpcode()
GetPlayer()->m_taxi.ClearTaxiDestinations();
}
// resurrect character at enter into instance where his corpse exist after add to map
Corpse *corpse = GetPlayer()->GetCorpse();
if (corpse && corpse->GetType() != CORPSE_BONES && corpse->GetMapId() == GetPlayer()->GetMapId())
{
if( mEntry->IsDungeon() )
{
GetPlayer()->ResurrectPlayer(0.5f);
GetPlayer()->SpawnCorpseBones();
}
}
if (mInstance)
{
Difficulty diff = GetPlayer()->GetDifficulty(mEntry->IsRaid());