diff options
author | Shauren <shauren.trinity@gmail.com> | 2016-03-09 13:07:17 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2016-03-09 13:07:17 +0100 |
commit | 52bb6485417494e58361a75fcf73cf5f0a1d09c5 (patch) | |
tree | 52346339a1ab138b3512c7e3fcfeddd150d2c0dc /src | |
parent | ce88d737cfc6bd67714ba3f0bb221b4aa80c5945 (diff) | |
parent | a71ea54a3a6f960463fb582b2e573a672ed00999 (diff) |
Merge pull request #15140 from RelevantJesse/6.x
[Core/Pet] Spellcooldown in UpdateAI
Diffstat (limited to 'src')
-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 2bf31a8be06..46a0342fea5 100644 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -148,15 +148,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; |