diff options
Diffstat (limited to 'src/game/GridNotifiers.cpp')
-rw-r--r-- | src/game/GridNotifiers.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/game/GridNotifiers.cpp b/src/game/GridNotifiers.cpp index a189aa72304..f5a400e272b 100644 --- a/src/game/GridNotifiers.cpp +++ b/src/game/GridNotifiers.cpp @@ -146,7 +146,7 @@ VisibleNotifier::Notify() // send data at target visibility change (adding to client) for(std::set<WorldObject*>::const_iterator vItr = i_visibleNow.begin(); vItr != i_visibleNow.end(); ++vItr) if((*vItr)!=&i_player && (*vItr)->isType(TYPEMASK_UNIT)) - i_player.SendAuraDurationsForTarget((Unit*)(*vItr)); + i_player.SendAurasForTarget((Unit*)(*vItr)); } void @@ -154,6 +154,11 @@ Deliverer::Visit(PlayerMapType &m) { for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { + //if (!i_source.InSamePhase(iter->getSource())) + // continue; + if(!iter->getSource()->InSamePhase(i_phaseMask)) + continue; + if (!i_dist || iter->getSource()->GetDistance(&i_source) <= i_dist) { // Send packet to all who are sharing the player's vision @@ -174,6 +179,9 @@ Deliverer::Visit(CreatureMapType &m) { for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { + if(!iter->getSource()->InSamePhase(i_phaseMask)) + continue; + if (!i_dist || iter->getSource()->GetDistance(&i_source) <= i_dist) { // Send packet to all who are sharing the creature's vision @@ -192,6 +200,9 @@ Deliverer::Visit(DynamicObjectMapType &m) { for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { + if(!iter->getSource()->InSamePhase(i_phaseMask)) + continue; + if (IS_PLAYER_GUID(iter->getSource()->GetCasterGUID())) { // Send packet back to the caster if the caster has vision of dynamic object @@ -249,9 +260,6 @@ ObjectUpdater::Visit(GridRefManager<T> &m) } } -template void ObjectUpdater::Visit<GameObject>(GameObjectMapType &); -template void ObjectUpdater::Visit<DynamicObject>(DynamicObjectMapType &); - bool CannibalizeObjectCheck::operator()(Corpse* u) { // ignore bones @@ -268,3 +276,6 @@ bool CannibalizeObjectCheck::operator()(Corpse* u) return false; } + +template void ObjectUpdater::Visit<GameObject>(GameObjectMapType &); +template void ObjectUpdater::Visit<DynamicObject>(DynamicObjectMapType &); |