aboutsummaryrefslogtreecommitdiff
path: root/src/game/GridNotifiers.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-26 20:35:40 -0600
committermegamage <none@none>2009-02-26 20:35:40 -0600
commit85d5d94e71e4ad2b49889253da1c2b1679050541 (patch)
tree023c5bec611c75779ee5e4876c265febf749991f /src/game/GridNotifiers.cpp
parent0f9238ecb1f0706320d71fd658aa6029a49fa6a9 (diff)
[7333] Refactoring DestinationHolder/Traveler/Unit::SendMonsterMoveWithSpeed code. Author: VladimirMangos
* Move common code in appropriate functions. * Correct select speed and 2D/3D distance for creature/player walk/fly --HG-- branch : trunk
Diffstat (limited to 'src/game/GridNotifiers.cpp')
-rw-r--r--src/game/GridNotifiers.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/GridNotifiers.cpp b/src/game/GridNotifiers.cpp
index 638de03fe45..c6119617f33 100644
--- a/src/game/GridNotifiers.cpp
+++ b/src/game/GridNotifiers.cpp
@@ -142,11 +142,17 @@ VisibleNotifier::Notify()
// Now do operations that required done at object visibility change to visible
- // target aura duration for caster show only if target exist at caster client
// send data at target visibility change (adding to client)
for(std::set<WorldObject*>::const_iterator vItr = i_visibleNow.begin(); vItr != i_visibleNow.end(); ++vItr)
+ {
+ // target aura duration for caster show only if target exist at caster client
if((*vItr)!=&i_player && (*vItr)->isType(TYPEMASK_UNIT))
i_player.SendAurasForTarget((Unit*)(*vItr));
+
+ // non finished movements show to player
+ if((*vItr)->GetTypeId()==TYPEID_UNIT && ((Creature*)(*vItr))->isAlive())
+ ((Creature*)(*vItr))->SendMonsterMoveWithSpeedToCurrentDestination(&i_player);
+ }
}
void