Core/Phasing: synch phasing with PR

This commit is contained in:
Ovahlord committed 2018-03-25 18:16:40 +02:00
1 parent 612686f639
commit 7bd10bace8
1 file changed
+3 -2
+3 -2
View File
@@ -230,14 +230,15 @@ void PhasingHandler::OnAreaChange(WorldObject* object)
object->GetPhaseShift().ClearPhases();
object->GetSuppressedPhaseShift().ClearPhases();
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(object->GetAreaId());
uint32 areaId = object->GetAreaId();
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId);
while (areaEntry)
{
if (std::vector<PhaseAreaInfo> const* newAreaPhases = sObjectMgr->GetPhasesForArea(areaEntry->ID))
{
for (PhaseAreaInfo const& phaseArea : *newAreaPhases)
{
if (phaseArea.SubAreaExclusions.find(areaEntry->ID) != phaseArea.SubAreaExclusions.end())
if (phaseArea.SubAreaExclusions.find(areaId) != phaseArea.SubAreaExclusions.end())
continue;
uint32 phaseId = phaseArea.PhaseInfo->Id;