Skip to content

fix(Core/Unit): Notify creature pets when owner enters combat via assist#25327

Open
blinkysc wants to merge 1 commit intoazerothcore:masterfrom
blinkysc:fix-creature-pet-engage-assist
Open

fix(Core/Unit): Notify creature pets when owner enters combat via assist#25327
blinkysc wants to merge 1 commit intoazerothcore:masterfrom
blinkysc:fix-creature-pet-engage-assist

Conversation

@blinkysc
Copy link
Copy Markdown
Contributor

Changes Proposed:

This PR proposes changes to:

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

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. Please specify which tools were used, if any.
    • Claude Code with AzerothMCP

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). Cherry-picks must be committed using the proper --author tag in order to be accepted, thus crediting the original authors, unless otherwise unable to be found

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. .go creature id 11882 — teleport to Twilight Stonecaller in Silithus
  2. Each Stonecaller should have a summoned Earth Elemental nearby
  3. Attack one Stonecaller — nearby Stonecallers will assist via aggro chain
  4. Before fix: The assisting Stonecallers' Earth Elementals stand idle
  5. After fix: The Earth Elementals join combat with their owners

Known Issues and TODO List:

  • Verify this doesn't cause issues with player-owned guardians (the path already exists for player pets via DealDamage and Attack)
  • Test with other NPC summoner/pet pairs (e.g. warlocks with void walkers, other caster+elemental combos)

Description

When a creature enters combat via assist or aggro chain (as opposed to being directly attacked), its controlled creatures (guardians/pets summoned via spells like Summon Earth Elemental) were never notified. The existing OwnerAttackedBy notification only fires from DealDamage — meaning only the directly attacked creature's pets would assist.

This adds an OwnerAttackedBy call in Creature::AtEngage so that whenever a creature enters combat for any reason, its controlled creatures are informed about the engage target and can assist.

When a creature enters combat via aggro chain or assist (not direct
damage), its controlled creatures (guardians/pets) were not notified,
causing them to stand idle while their owner fights.

Closes chromiecraft/chromiecraft#9228
@github-actions github-actions bot added CORE Related to the core file-cpp Used to trigger the matrix build labels Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE Related to the core file-cpp Used to trigger the matrix build Ready to be Reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NPC] Mobs with Pets - Aggro Bug

1 participant