diff options
| author | RelevantJesse <RelevantJesse@users.noreply.github.com> | 2015-07-21 14:45:31 -0700 |
|---|---|---|
| committer | RelevantJesse <RelevantJesse@users.noreply.github.com> | 2015-07-21 14:45:31 -0700 |
| commit | a71ea54a3a6f960463fb582b2e573a672ed00999 (patch) | |
| tree | d35232965b1f36cd1838ad85f89e9a82ba74bf48 | |
| parent | 9fc06b956bd14b263a857af2ab4560069bdc1958 (diff) | |
Update PetAI.cpp
Pulled check for IsReady to outside of the IsPositive check
| -rw-r--r-- | src/server/game/AI/CoreAI/PetAI.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index 7d36fd9de67..6b9439c0b05 100644 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -150,15 +150,15 @@ void PetAI::UpdateAI(uint32 diff) if (me->GetCharmInfo() && me->GetSpellHistory()->HasGlobalCooldown(spellInfo)) continue; + + // check spell cooldown + if (!me->GetSpellHistory()->IsReady(spellInfo)) + continue; if (spellInfo->IsPositive()) { if (spellInfo->CanBeUsedInCombat()) { - // check spell cooldown - if (!me->GetSpellHistory()->IsReady(spellInfo)) - continue; - // Check if we're in combat or commanded to attack if (!me->IsInCombat() && !me->GetCharmInfo()->IsCommandAttack()) continue; |
