diff options
author | maximius <none@none> | 2009-09-22 16:14:37 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-09-22 16:14:37 -0700 |
commit | b3f3a82e5fbd685567c2849d2787b4874e6204ae (patch) | |
tree | 406d44261044d9c0f18940a52506c51f98bb750a /src/game/PetAI.cpp | |
parent | 80efe383fb1d90151188679bc314991a6a428d7d (diff) |
*Fix Unit::m_regenTimer so creatures regen health properly, by MrSmite
*Partial Utgarde Pinnacle instance & boss scripts, rewritten by Tartalo, original by ckegg
*Fix a bug where pets would engage new attackers while approaching the target their owner sent them to attack, by MrSmite
--HG--
branch : trunk
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 |