mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-04 22:07:52 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user