Core/Objects: SetZoneScript will now use map zone coordinates instead of using the cached zone id
This commit is contained in:
1 parent
0c358c9a0b
commit
4474655779
2 files changed
+6
-4
No files matched your search
@@ -2168,10 +2168,12 @@ void WorldObject::SetZoneScript()
|
||||
m_zoneScript = (ZoneScript*)((InstanceMap*)map)->GetInstanceScript();
|
||||
else if (!map->IsBattlegroundOrArena())
|
||||
{
|
||||
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId()))
|
||||
uint32 zoneId = GetMap()->GetZoneId(GetPhaseShift(), GetPosition());
|
||||
|
||||
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(zoneId))
|
||||
m_zoneScript = bf;
|
||||
else
|
||||
m_zoneScript = sOutdoorPvPMgr->GetZoneScript(GetZoneId());
|
||||
m_zoneScript = sOutdoorPvPMgr->GetZoneScript(zoneId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user