fix(Core/Corpses): Reset corpse location data if player already resurrected in different dungeon map. (#9429)
Fixes #9210
This commit is contained in:
parent
7d3aeb4b25
commit
d0167d0d6d
2 changed files with 4 additions and 2 deletions
|
|
@ -4514,6 +4514,8 @@ void Player::RemoveCorpse()
|
|||
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
Corpse::DeleteFromDB(GetGUID(), trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
_corpseLocation.WorldRelocate();
|
||||
}
|
||||
|
||||
void Player::SpawnCorpseBones(bool triggerSave /*= true*/)
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ void WorldSession::HandleMoveWorldportAck()
|
|||
{
|
||||
if (mEntry->IsDungeon())
|
||||
{
|
||||
GetPlayer()->ResurrectPlayer(0.5f, false);
|
||||
GetPlayer()->ResurrectPlayer(0.5f);
|
||||
GetPlayer()->SpawnCorpseBones();
|
||||
}
|
||||
}
|
||||
|
|
@ -203,7 +203,7 @@ void WorldSession::HandleMoveWorldportAck()
|
|||
// resurrect character upon entering instance when the corpse is not available anymore
|
||||
if (GetPlayer()->GetCorpseLocation().GetMapId() == mEntry->MapID)
|
||||
{
|
||||
GetPlayer()->ResurrectPlayer(0.5f, false);
|
||||
GetPlayer()->ResurrectPlayer(0.5f);
|
||||
GetPlayer()->RemoveCorpse();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue