diff options
Diffstat (limited to 'src/game/PetAI.cpp')
-rw-r--r-- | src/game/PetAI.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp index 783f74c38b8..25125c2a0dc 100644 --- a/src/game/PetAI.cpp +++ b/src/game/PetAI.cpp @@ -447,6 +447,10 @@ bool PetAI::_CanAttack(Unit *target) if (me->HasReactState(REACT_PASSIVE)) return me->GetCharmInfo()->IsCommandAttack(); + // Pets commanded to attack should not stop their approach if attacked by another creature + if (me->getVictim() && (me->getVictim() != target)) + return !me->GetCharmInfo()->IsCommandAttack(); + // From this point on, pet will always be either aggressive or defensive // Stay - can attack if target is within range or commanded to |