Repository navigation
Conversation
Referenced commit(s): 783df06
…26624) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Referenced commit(s): 53c0500
…hcore#26629) Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Referenced commit(s): 0e2b59b
…om Flame Leviathan AoE (azerothcore#26622) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Co-authored-by: sudlud <sudlud@users.noreply.github.com>
…zerothcore#26644) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…azerothcore#26623) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Referenced commit(s): 65443de
…e#26650) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…ng (azerothcore#26473) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Referenced commit(s): 3e3aa18
…azerothcore#26625) Co-authored-by: Unholychick <lucas__jensen@hotmail.com> Co-authored-by: Chaouki Dhib <chaodhib@gmail.com> Co-authored-by: sirikfoll <sirikfoll@hotmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Referenced commit(s): 40b80eb
Referenced commit(s): 990ef2e
…-filtered signature deletes (azerothcore#26668)
Referenced commit(s): 47d6d2a
Referenced commit(s): 1ee9213
While a player is mind controlled (e.g. Chains of Kel'Thuzad), the charm AI in UpdateCharmedAI picks between a primary and a secondary spell slot at random. PrepareCharmAISpells could leave a lower rank of the same spell chain in the secondary slot, so casters whose top spells are ranks of a single chain (Frostbolt, Shadow Bolt, etc.) cast a reduced rank roughly half the time. Normalize every cached charm-AI spell to the highest rank the player has learned by walking its spell chain, mirroring TrinityCore's rank resolution in PlayerAI::VerifySpellCast. Distinct spells stay distinct; only same-chain lower ranks collapse to the max rank. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
Author
|
Retargeting to azerothcore/azerothcore-wotlk upstream. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes Proposed:
This PR proposes changes to:
While a player is mind controlled (reported for Chains of Kel'Thuzad in Naxxramas, but this is generic charm-AI behaviour),
Player::UpdateCharmedAIpicks between a primary and a secondary spell slot at random (m_charmAISpells[... + rnd],rnd = urand(0, 1)).Player::PrepareCharmAISpellscan leave a lower rank of the same spell chain in the secondary slot, so a caster whose top damage comes from a single chain (Frostbolt, Shadow Bolt, etc.) casts a reduced rank roughly half the time.The fix normalizes every cached charm-AI spell to the highest rank the player has actually learned, by walking its spell chain with
GetNextSpellInChain+HasSpellat the end ofPrepareCharmAISpells. Distinct spells stay distinct (different chains are never merged); only same-chain lower ranks collapse up to the max known rank. This mirrors TrinityCore's rank resolution inPlayerAI::VerifySpellCast, applied once to AC's existing cache rather than porting the wholeSimpleCharmedPlayerAIsystem.AI-assisted Pull Requests
Issues Addressed:
SOURCE:
The changes have been validated through:
Mind controlled players on retail cast the maximum rank of their spells. The rank-resolution approach mirrors TrinityCore's
PlayerAI::VerifySpellCast, which walks the spell chain up to the highest known rank before casting.Tests Performed:
Builds and passes
apps/codestyle/codestyle-cpp.py. The change only reuses symbols already present in the same function (sSpellMgr) plus the existingPlayer::HasSpell.How to Test the Changes:
Known Issues and TODO List:
SimpleCharmedPlayerAIcould replace it later if desired.