mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Corpses: Fixed crash in corpse creation
This commit is contained in:
@@ -89,9 +89,6 @@ bool Corpse::Create(ObjectGuid::LowType guidlow, Player* owner)
|
||||
|
||||
PhasingHandler::InheritPhaseShift(this, owner);
|
||||
|
||||
UpdatePositionData();
|
||||
SetZoneScript();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -4492,6 +4492,9 @@ Corpse* Player::CreateCorpse()
|
||||
// register for player, but not show
|
||||
GetMap()->AddCorpse(corpse);
|
||||
|
||||
corpse->UpdatePositionData();
|
||||
corpse->SetZoneScript();
|
||||
|
||||
// we do not need to save corpses for BG/arenas
|
||||
if (!GetMap()->IsBattlegroundOrArena())
|
||||
corpse->SaveToDB();
|
||||
|
||||
@@ -4873,11 +4873,11 @@ Corpse* Map::ConvertCorpseToBones(ObjectGuid const& ownerGuid, bool insignia /*=
|
||||
|
||||
PhasingHandler::InheritPhaseShift(bones, corpse);
|
||||
|
||||
AddCorpse(bones);
|
||||
|
||||
bones->UpdatePositionData();
|
||||
bones->SetZoneScript();
|
||||
|
||||
AddCorpse(bones);
|
||||
|
||||
// add bones in grid store if grid loaded where corpse placed
|
||||
AddToMap(bones);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user