Update PetAI.cpp

Pulled check for IsReady to outside of the IsPositive check

(cherry picked from commit a71ea54a3a6f960463fb582b2e573a672ed00999)
This commit is contained in:
RelevantJesse authored and Aokromes committed 2016-05-05 03:40:44 +02:00
1 parent c5d2ece2fe
commit c9e27cca44
1 file changed
+4 -4
+4 -4
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;