Update PetAI.cpp

Pulled check for IsReady to outside of the IsPositive check

(cherry picked from commit a71ea54a3a)
This commit is contained in:
RelevantJesse
2015-07-21 14:45:31 -07:00
committed by Aokromes
parent c5d2ece2fe
commit c9e27cca44

View File

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