Skip to content

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

Open
blinkysc wants to merge 2 commits intoazerothcore:masterfrom
blinkysc:fix-dk-gargoyle-cc-reengage
Open

fix(Core/Scripts): Fix DK Gargoyle not resuming attack after CC#25318
blinkysc wants to merge 2 commits intoazerothcore:masterfrom
blinkysc:fix-dk-gargoyle-cc-reengage

Conversation

@blinkysc
Copy link
Copy Markdown
Contributor

@blinkysc blinkysc commented Mar 30, 2026

Changes Proposed:

This PR proposes changes to:

  • Core (units, players, creatures, game systems).
  • Scripts (bosses, spell scripts, creature scripts).
  • Database (SAI, creatures, etc).

When the Ebon Gargoyle (entry 27829) is CC'd (e.g., Cyclone) for longer than the 5-second PvP combat reference timeout, the combat reference expires and triggers JustExitedCombatEngagementOver, setting _isEngaged = false. After CC ends, the gargoyle still has its victim (m_attacking is intact) but UpdateVictimWithGaze() returns false because IsEngaged() is false. MySelectNextTarget() sees the victim is still valid and does nothing. The gargoyle is stuck permanently idle — it has a victim but no engagement, so it never re-enters the casting logic.

The fix re-establishes engagement via EngageWithTarget() when the gargoyle has a valid victim but lost its engagement state.

AI-assisted Pull Requests

Important

While the use of AI tools when preparing pull requests is not prohibited, contributors must clearly disclose when such tools have been used and specify the model involved.

Contributors are also expected to fully understand the changes they are submitting and must be able to explain and justify those changes when requested by maintainers.

  • AI tools (e.g. ChatGPT, Claude, or similar) were used entirely or partially in preparing this pull request. Claude Code with AzerothMCP were used.

Issues Addressed:

SOURCE:

The changes have been validated through:

  • Live research (checked on live servers, e.g Classic WotLK, Retail, etc.)
  • Sniffs (remember to share them with the open source community!)
  • Video evidence, knowledge databases or other public sources (e.g forums, Wowhead, etc.)
  • The changes promoted by this pull request come partially or entirely from another project (cherry-pick).

Tests Performed:

This PR has been:

  • Tested in-game by the author.
  • Tested in-game by other community members/someone else other than the author/has been live on production servers.
  • This pull request requires further testing and may have edge cases to be tested.

How to Test the Changes:

  • This pull request can be tested by following the reproduction steps provided in the linked issue
  • This pull request requires further testing. Provide steps to test your changes. If it requires any specific setup e.g multiple players please specify it as well.
  1. On a DK, engage an enemy player (requires two characters on opposing factions)
  2. .cast 49206 — Summon Gargoyle, verify it attacks the target
  3. Target the gargoyle (NPC 27829) and .aura 33786 (Cyclone) to CC it
  4. Wait for Cyclone to expire (6 seconds)
  5. Gargoyle should resume casting Gargoyle Strike on its target

Known Issues and TODO List:

  • Other CC types lasting > 5 seconds should also be tested (e.g., Fear, Polymorph)
  • Verify no regression with normal gargoyle target switching behavior

How to Test AzerothCore PRs

When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].

You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:

http://www.azerothcore.org/wiki/How-to-test-a-PR

REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).

For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.

When the Ebon Gargoyle is CC'd (e.g., Cyclone) for longer than the
5-second PvP combat reference timeout, the combat reference expires
and triggers JustExitedCombat/EngagementOver. After CC ends, the
gargoyle still has its victim (m_attacking) but is no longer engaged,
so UpdateVictimWithGaze returns false. MySelectNextTarget sees the
victim is valid and does nothing, leaving the gargoyle permanently
idle.

Fix by re-engaging via EngageWithTarget when the gargoyle has a valid
victim but lost engagement state.

Closes chromiecraft/chromiecraft#9221
@github-actions github-actions bot added Script Refers to C++ Scripts for the Core file-cpp Used to trigger the matrix build labels Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

file-cpp Used to trigger the matrix build Ready to be Reviewed Script Refers to C++ Scripts for the Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Death Knight] Army of the Dead Bug after CC [Death Knight] Gargoyle Bugs out after CC

1 participant