From a71ea54a3a6f960463fb582b2e573a672ed00999 Mon Sep 17 00:00:00 2001 From: RelevantJesse Date: Tue, 21 Jul 2015 14:45:31 -0700 Subject: Update PetAI.cpp Pulled check for IsReady to outside of the IsPositive check --- src/server/game/AI/CoreAI/PetAI.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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; -- cgit v1.2.3