mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Objects: Initialize position data and zone/instance script for all worldobject types (except player)
This commit is contained in:
@@ -166,6 +166,9 @@ bool AreaTrigger::Create(uint32 areaTriggerCreatePropertiesId, Unit* caster, Uni
|
||||
m_movementInfo.transport.guid = target->GetGUID();
|
||||
}
|
||||
|
||||
UpdatePositionData();
|
||||
SetZoneScript();
|
||||
|
||||
UpdateShape();
|
||||
|
||||
uint32 timeToTarget = GetCreateProperties()->TimeToTarget != 0 ? GetCreateProperties()->TimeToTarget : *m_areaTriggerData->Duration;
|
||||
|
||||
@@ -170,6 +170,9 @@ bool Conversation::Create(ObjectGuid::LowType lowGuid, uint32 conversationEntry,
|
||||
Object::_Create(ObjectGuid::Create<HighGuid::Conversation>(GetMapId(), conversationEntry, lowGuid));
|
||||
PhasingHandler::InheritPhaseShift(this, creator);
|
||||
|
||||
UpdatePositionData();
|
||||
SetZoneScript();
|
||||
|
||||
SetEntry(conversationEntry);
|
||||
SetObjectScale(1.0f);
|
||||
|
||||
|
||||
@@ -89,6 +89,9 @@ bool Corpse::Create(ObjectGuid::LowType guidlow, Player* owner)
|
||||
|
||||
PhasingHandler::InheritPhaseShift(this, owner);
|
||||
|
||||
UpdatePositionData();
|
||||
SetZoneScript();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,9 @@ bool DynamicObject::CreateDynamicObject(ObjectGuid::LowType guidlow, Unit* caste
|
||||
WorldObject::_Create(ObjectGuid::Create<HighGuid::DynamicObject>(GetMapId(), spell->Id, guidlow));
|
||||
PhasingHandler::InheritPhaseShift(this, caster);
|
||||
|
||||
UpdatePositionData();
|
||||
SetZoneScript();
|
||||
|
||||
SetEntry(spell->Id);
|
||||
SetObjectScale(1.0f);
|
||||
auto dynamicObjectData = m_values.ModifyValue(&DynamicObject::m_dynamicObjectData);
|
||||
|
||||
@@ -119,6 +119,9 @@ bool SceneObject::Create(ObjectGuid::LowType lowGuid, SceneType type, uint32 sce
|
||||
Object::_Create(ObjectGuid::Create<HighGuid::SceneObject>(GetMapId(), sceneId, lowGuid));
|
||||
PhasingHandler::InheritPhaseShift(this, creator);
|
||||
|
||||
UpdatePositionData();
|
||||
SetZoneScript();
|
||||
|
||||
SetEntry(scriptPackageId);
|
||||
SetObjectScale(1.0f);
|
||||
|
||||
|
||||
@@ -4868,6 +4868,9 @@ Corpse* Map::ConvertCorpseToBones(ObjectGuid const& ownerGuid, bool insignia /*=
|
||||
|
||||
PhasingHandler::InheritPhaseShift(bones, corpse);
|
||||
|
||||
bones->UpdatePositionData();
|
||||
bones->SetZoneScript();
|
||||
|
||||
AddCorpse(bones);
|
||||
|
||||
// add bones in grid store if grid loaded where corpse placed
|
||||
|
||||
Reference in New Issue
Block a user