aboutsummaryrefslogtreecommitdiff
path: root/src/game/GridNotifiers.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-31 16:38:50 -0600
committermegamage <none@none>2009-01-31 16:38:50 -0600
commit336e8501f0e8c6cede5356347a8c6894e39197b5 (patch)
tree3dd2e47833be51ea6d2ff4f64b0655dd149b0553 /src/game/GridNotifiers.cpp
parent4074b481f0a95bec47d8ce9ed275acf46ff95a8e (diff)
*Update to Mangos 7208. Implement phase system.
--HG-- branch : trunk
Diffstat (limited to 'src/game/GridNotifiers.cpp')
-rw-r--r--src/game/GridNotifiers.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/GridNotifiers.cpp b/src/game/GridNotifiers.cpp
index 442654ce455..491c75b8f63 100644
--- a/src/game/GridNotifiers.cpp
+++ b/src/game/GridNotifiers.cpp
@@ -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