Merge pull request #15140 from RelevantJesse/6.x

[Core/Pet] Spellcooldown in UpdateAI
This commit is contained in:
Shauren
2016-03-09 13:07:17 +01:00

View File

@@ -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;