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;
|
_decisionTimer -= diff;
|
||||||
if (!UpdateVictimWithGaze())
|
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();
|
MySelectNextTarget();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -356,6 +366,26 @@ struct npc_pet_dk_army_of_the_dead : public AggressorAI
|
|||||||
if (me->IsValidAttackTarget(attacker))
|
if (me->IsValidAttackTarget(attacker))
|
||||||
AttackStart(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
|
struct npc_pet_dk_dancing_rune_weapon : public NullCreatureAI
|
||||||
|
|||||||
Reference in New Issue
Block a user