Skip to content

Fix Azgalor melee Rain of Fire target swapping - #13

Merged
brighton-chi merged 1 commit into
the-labfrom
copilot/fix-bot-behavior-with-rain-of-fire
Apr 21, 2026
Merged

Fix Azgalor melee Rain of Fire target swapping#13
brighton-chi merged 1 commit into
the-labfrom
copilot/fix-bot-behavior-with-rain-of-fire

Conversation

Copilot AI commented Apr 21, 2026

Copy link
Copy Markdown

Azgalor melee handling was sticky once a bot swapped to a Doomguard: if Rain of Fire later landed on that Doomguard, the bot could keep tunneling the add instead of returning to Azgalor. This change makes melee target selection symmetric under Rain of Fire and removes the hidden helper scope introduced in the prior PR.

  • Behavior update: Rain of Fire target swapping

    • When a melee bot is standing in active Rain of Fire while targeting Azgalor, it switches to a Lesser Doomguard if one exists.
    • When a melee bot is standing in active Rain of Fire while targeting a Lesser Doomguard, it switches back to Azgalor.
    • When no Doomguard exists, the bot falls back to moving away from Azgalor.
  • Action flow correction

    • Removed the return true path in the Doomguard branch that could consume the action and leave the bot effectively stuck.
    • The action now only claims success when it actually changes target or issues movement.
  • Helper cleanup

    • Moved the Azgalor Rain of Fire active-object helper out of the anonymous namespace and declared it in HyjalSummitHelpers for explicit shared use.
Unit* doomguard = AI_VALUE2(Unit*, "find target", "lesser doomguard");
bool isTargetingDoomguard =
    doomguard && (bot->GetVictim() == doomguard || bot->GetTarget() == doomguard->GetGUID());

if (isTargetingDoomguard)
    return Attack(azgalor);

if (doomguard)
    return Attack(doomguard);

return MoveAway(azgalor, 5.0f);

Agent-Logs-Url: https://github.com/brighton-chi/mod-playerbots/sessions/a91f27bd-55aa-4c28-b511-e00e256b5398

Co-authored-by: brighton-chi <190869400+brighton-chi@users.noreply.github.com>
@brighton-chi
brighton-chi marked this pull request as ready for review April 21, 2026 21:31
@brighton-chi
brighton-chi merged commit a65536c into the-lab Apr 21, 2026
1 check failed
@brighton-chi
brighton-chi deleted the copilot/fix-bot-behavior-with-rain-of-fire branch May 11, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants