aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRelevantJesse <RelevantJesse@users.noreply.github.com>2015-07-21 14:45:31 -0700
committerShauren <shauren.trinity@gmail.com>2016-03-12 23:54:24 +0100
commit55bb3fb00cf55a9a0f3a0579070310bf31f0ac60 (patch)
tree57388e6ea30c2269b80c382f9b6dc661f7fa6e1d /src
parentcaef32d3757ae81f184150c8cef0a128b3a13a01 (diff)
Update PetAI.cpp
Pulled check for IsReady to outside of the IsPositive check (cherry picked from commit a71ea54a3a6f960463fb582b2e573a672ed00999)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/CoreAI/PetAI.cpp8
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 8acf6b9c9dc..66b1253069c 100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -150,14 +150,14 @@ 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 & school lock
- if (!me->GetSpellHistory()->IsReady(spellInfo))
- continue;
-
// Check if we're in combat or commanded to attack
if (!me->IsInCombat() && !me->GetCharmInfo()->IsCommandAttack())
continue;