fix(Core): fix instance portal not resurrecting when corpse is not spawned (#6106)

This commit is contained in:
Axel Cocat
2021-05-29 15:37:34 +02:00
committed by GitHub
parent b846179986
commit a355b4d27c
3 changed files with 24 additions and 0 deletions

View File

@@ -190,6 +190,17 @@ void WorldSession::HandleMoveWorldportAck()
}
}
if (!corpse && mEntry->IsDungeon())
{
// resurrect character upon entering instance when the corpse is not available anymore
if (GetPlayer()->GetCorpseLocation().GetMapId() == mEntry->MapID)
{
GetPlayer()->ResurrectPlayer(0.5f, false);
GetPlayer()->RemoveCorpse();
}
}
bool allowMount = !mEntry->IsDungeon() || mEntry->IsBattlegroundOrArena();
if (mInstance)
{