Core/Objects: Initialize position data and zone/instance script for all worldobject types (except player)

Port From (https://github.com/TrinityCore/TrinityCore/commit/fddd6cdf3fb342b98d4878d23874f60498d7545a)
This commit is contained in:
hondacrx
2022-05-31 16:03:14 -04:00
parent 108abf92cd
commit 4fe0663b1d
5 changed files with 15 additions and 0 deletions
@@ -168,6 +168,9 @@ namespace Game.Entities
m_movementInfo.transport.guid = target.GetGUID();
}
UpdatePositionData();
SetZoneScript();
UpdateShape();
uint timeToTarget = GetCreateProperties().TimeToTarget != 0 ? GetCreateProperties().TimeToTarget : m_areaTriggerData.Duration;
+3
View File
@@ -119,6 +119,9 @@ namespace Game.Entities
_Create(ObjectGuid.Create(HighGuid.Conversation, GetMapId(), conversationEntry, lowGuid));
PhasingHandler.InheritPhaseShift(this, creator);
UpdatePositionData();
SetZoneScript();
SetEntry(conversationEntry);
SetObjectScale(1.0f);
+3
View File
@@ -89,6 +89,9 @@ namespace Game.Entities
PhasingHandler.InheritPhaseShift(this, owner);
UpdatePositionData();
SetZoneScript();
return true;
}
+3
View File
@@ -91,6 +91,9 @@ namespace Game.Entities
_Create(ObjectGuid.Create(HighGuid.DynamicObject, GetMapId(), spell.Id, guidlow));
PhasingHandler.InheritPhaseShift(this, caster);
UpdatePositionData();
SetZoneScript();
SetEntry(spell.Id);
SetObjectScale(1f);
+3
View File
@@ -3411,6 +3411,9 @@ namespace Game.Maps
PhasingHandler.InheritPhaseShift(bones, corpse);
bones.UpdatePositionData();
bones.SetZoneScript();
AddCorpse(bones);
// add bones in grid store if grid loaded where corpse placed