diff options
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index b00dadc98dd..23aae2cd363 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -16406,7 +16406,16 @@ void Player::HandleStealthedUnitsDetection() // target aura duration for caster show only if target exist at caster client // send data at target visibility change (adding to client) if((*i)!=this && (*i)->isType(TYPEMASK_UNIT)) + { SendAuraDurationsForTarget(*i); + //if(((Unit*)(*i))->isAlive()) //should be always alive + { + if((*i)->GetTypeId()==TYPEID_UNIT) + ((Creature*)(*i))->SendMonsterMoveWithSpeedToCurrentDestination(this); + if(((Unit*)(*i))->getVictim()) + ((Unit*)(*i))->SendAttackStart(((Unit*)(*i))->getVictim()); + } + } i = stealthedUnits.erase(i); continue; @@ -17386,10 +17395,16 @@ void Player::UpdateVisibilityOf(WorldObject* target) // target aura duration for caster show only if target exist at caster client // send data at target visibility change (adding to client) if(target!=this && target->isType(TYPEMASK_UNIT)) + { SendAuraDurationsForTarget((Unit*)target); - - if(target->GetTypeId()==TYPEID_UNIT && ((Creature*)target)->isAlive()) - ((Creature*)target)->SendMonsterMoveWithSpeedToCurrentDestination(this); + if(((Unit*)target)->isAlive()) + { + if(target->GetTypeId()==TYPEID_UNIT) + ((Creature*)target)->SendMonsterMoveWithSpeedToCurrentDestination(this); + if(((Unit*)target)->getVictim()) + ((Unit*)target)->SendAttackStart(((Unit*)target)->getVictim()); + } + } } } } |