Core/Corpses: Fixed crash in corpse creation
Port From (https://github.com/TrinityCore/TrinityCore/commit/5e90f188f80d217b95606caf745e82253f3a4d47)
This commit is contained in:
@@ -89,9 +89,6 @@ namespace Game.Entities
|
||||
|
||||
PhasingHandler.InheritPhaseShift(this, owner);
|
||||
|
||||
UpdatePositionData();
|
||||
SetZoneScript();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -4536,6 +4536,9 @@ namespace Game.Entities
|
||||
// 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();
|
||||
|
||||
@@ -3411,11 +3411,11 @@ namespace Game.Maps
|
||||
|
||||
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