Core/Objects: Update position data of gameobjects and creatures before setting their zone scripts. This fixes capture points not being assigned to their outdoor pvp zone

This commit is contained in:
Ovahlord
2019-01-26 16:23:43 +01:00
parent 252147f704
commit 1d469a3d80
2 changed files with 4 additions and 0 deletions

View File

@@ -1000,6 +1000,8 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 /*phaseMask*
return false;
}
UpdatePositionData();
if (!CreateFromProto(guidlow, entry, data, vehId))
return false;

View File

@@ -212,6 +212,8 @@ bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, u
if (!dynamic)
SetRespawnCompatibilityMode();
UpdatePositionData();
SetZoneScript();
if (m_zoneScript)
{