diff options
| author | Duarte Duarte <dnpd.dd@gmail.com> | 2015-05-19 18:52:05 +0100 |
|---|---|---|
| committer | Duarte Duarte <dnpd.dd@gmail.com> | 2015-05-19 18:52:05 +0100 |
| commit | f4c1a8fb2d6aff13f67dd2494dc18b481c548af9 (patch) | |
| tree | 55c290aa51f46ac14296439e4a33eb6c77dfd722 /src/server/game/AI | |
| parent | 6dcfe9ba178a93046104439b43d84ad1e9f6969d (diff) | |
| parent | e70790576414dde16b56fd828d52a79ef540d3e9 (diff) | |
Merge pull request #14454 from ariel-/cd
Port Core/Spells: Cooldown updates (6.x branch)
Diffstat (limited to 'src/server/game/AI')
| -rw-r--r-- | src/server/game/AI/CoreAI/PetAI.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index abb6126ca2c..2522c97de25 100644 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -22,6 +22,7 @@ #include "Player.h" #include "Spell.h" #include "ObjectAccessor.h" +#include "SpellHistory.h" #include "SpellMgr.h" #include "Creature.h" #include "Util.h" @@ -146,15 +147,15 @@ void PetAI::UpdateAI(uint32 diff) if (!spellInfo) continue; - if (me->GetCharmInfo() && me->GetCharmInfo()->GetGlobalCooldownMgr().HasGlobalCooldown(spellInfo)) + if (me->GetCharmInfo() && me->GetSpellHistory()->HasGlobalCooldown(spellInfo)) continue; if (spellInfo->IsPositive()) { if (spellInfo->CanBeUsedInCombat()) { - // check spell cooldown - if (me->HasSpellCooldown(spellInfo->Id)) + // check spell cooldown & school lock + if (!me->GetSpellHistory()->IsReady(spellInfo)) continue; // Check if we're in combat or commanded to attack |
