mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Update PetAI.cpp
Pulled check for IsReady to outside of the IsPositive check
(cherry picked from commit a71ea54a3a)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user