fix(Core/Scripts): Fix DK Gargoyle not resuming attack after CC (#25318)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-05-03 04:25:56 -05:00
committed by GitHub
parent 45018c110f
commit 4305f741a4

View File

@@ -209,6 +209,16 @@ struct npc_pet_dk_ebon_gargoyle : ScriptedAI
_decisionTimer -= diff;
if (!UpdateVictimWithGaze())
{
// Re-engage if we still have a valid victim but lost engagement
// (e.g., PvP combat reference expired during CC like Cyclone)
if (Unit* victim = me->GetVictim())
{
if (me->IsValidAttackTarget(victim))
{
me->EngageWithTarget(victim);
return;
}
}
MySelectNextTarget();
return;
}
@@ -356,6 +366,26 @@ struct npc_pet_dk_army_of_the_dead : public AggressorAI
if (me->IsValidAttackTarget(attacker))
AttackStart(attacker);
}
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
{
// Re-engage if we still have a valid victim but lost engagement
// (e.g., combat reference expired during CC like knockback)
if (Unit* victim = me->GetVictim())
{
if (me->IsValidAttackTarget(victim))
{
me->EngageWithTarget(victim);
return;
}
}
return;
}
DoMeleeAttackIfReady();
}
};
struct npc_pet_dk_dancing_rune_weapon : public NullCreatureAI