fix(Core/PetAI): Fixed logic in PetAI to determine if pet can cast co… (#5038)

This commit is contained in:
UltraNix
2021-04-06 14:23:30 +02:00
committed by GitHub
parent 2f2d84ac5c
commit 3db8a9b09b

View File

@@ -245,8 +245,8 @@ void PetAI::UpdateAI(uint32 diff)
{
if (spellInfo->CanBeUsedInCombat())
{
// Check if we're in combat or commanded to attack
if (!me->IsInCombat() && !me->GetCharmInfo()->IsCommandAttack())
// Check if we're in combat or commanded to attack (exlude auras with infinity duration)
if (!me->IsInCombat() && !me->GetCharmInfo()->IsCommandAttack() && spellInfo->GetMaxDuration() != -1)
continue;
}