mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Merge pull request #15140 from RelevantJesse/6.x
[Core/Pet] Spellcooldown in UpdateAI
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user