diff options
Diffstat (limited to 'src/game/PetAI.cpp')
| -rw-r--r-- | src/game/PetAI.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp index d8f7725687b..61446220192 100644 --- a/src/game/PetAI.cpp +++ b/src/game/PetAI.cpp @@ -48,7 +48,7 @@ void PetAI::MoveInLineOfSight(Unit *u) { if( !i_pet.getVictim() && i_pet.GetCharmInfo() && i_pet.GetCharmInfo()->HasReactState(REACT_AGGRESSIVE) && - u->isTargetableForAttack() && i_pet.IsHostileTo( u ) && + i_pet.IsHostileTo( u ) && i_pet.canAttack(u) && u->isInAccessablePlaceFor(&i_pet)) { float attackRadius = i_pet.GetAttackDistance(u); @@ -95,7 +95,7 @@ bool PetAI::_needToStop() const if(i_pet.isCharmed() && i_pet.getVictim() == i_pet.GetCharmer()) return true; - return !i_pet.getVictim()->isTargetableForAttack(); + return !i_pet.canAttack(i_pet.getVictim()); } void PetAI::_stopAttack() |
