You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(Core/Spells): Fire CAST phase procs for triggered spells - #28609
Spell::_cast skipped the CAST phase proc for every triggered spell (m_originalCaster && !IsTriggered()). Black Magic (59630) only procs in the CAST phase, so it never procced from harmful spells a script or weapon imbue casts as triggered: Death Coil's damage (47632), Static Shock's Lightning Shield damage (49279) and Flametongue Attack (10444).
The gate is dropped. Aura::GetProcEffectMask already filters triggered spells per aura: an aura only sees them with SPELL_ATTR3_CAN_PROC_FROM_PROCS or PROC_ATTR_TRIGGERED_CAN_PROC, or when the triggered spell has SPELL_ATTR3_NOT_A_PROC. Black Magic has both of the first two. Arcane Potency has neither, so Blizzard ticks still don't consume it, which is what the gate was added for. TrinityCore only requires an original caster here. Allowing just NOT_A_PROC spells would fix Death Coil and Static Shock but not Flametongue Attack, which has no Attr3 bits.
Fingers of Frost (74396) has 2 charges, accepts triggered spells and listened to CAST and HIT. With both phases firing for triggered spells, one Blizzard tick or Arcane Missiles bolt took both charges. Its spell_proc row is now CAST only, as #24942 set it, and spell_mage_fingers_of_frost drops its HIT phase handling. Since charges are now taken at CAST, a triggered tick that misses also takes one.
This re-lands part of #24942, which also dropped this gate and moved 74396 to CAST only. #24990 reverted both, naming "the separated CAST-before-HIT phase and deferred 0-charge aura cleanup" as the cause of a use-after-free. CAST-before-HIT ordering came back in #25647 and is on master, and this PR doesn't bring back the deferred 0-charge cleanup.
CAST phase spell_proc rows that now see triggered spells through their own attributes:
Black Magic (59630)
Fingers of Frost talent (44543, 44545) and buff (74396)
Blessed Weapon Coating (45396), which also has SPELL_ATTR3_CAN_PROC_FROM_PROCS. Righteous Weapon Coating (45398) has it too, but its melee and ranged auto attack proc flags only add auto-repeat shots.
Two kinds of triggered casts pass every aura's filter and now reach any CAST phase row: ranged auto-repeat shots (Auto Shot, wand Shoot), and triggered spells with SPELL_ATTR3_NOT_A_PROC (Arcane Missiles bolts, Penance bolts, Lightning Shield damage, Death Coil damage, Tranquility ticks, Starfall stars). These are all the CAST phase rows with charges and without PROC_ATTR_REQ_SPELLMOD or PROC_ATTR_REQ_MANA_COST that such casts can now consume:
28200 (Ascendance, Talisman of Ascendance), 33299 (Coilfang Slave Pens caster trinket), 39530 (Focus): also on wand Shoot and Auto Shot
24389 (Chaos Fire): fire spells only
59887-59891 (Borrowed Time): Penance bolts now take the charge, where the Penance channel never matched its proc flags
Rows with PROC_ATTR_REQ_SPELLMOD or PROC_ATTR_REQ_MANA_COST (Arcane Potency, Presence of Mind, Hot Streak, Brain Freeze and the rest) still need a spell that the aura's spellmod applies to or that costs mana.
e2e coverage in e2e/suites/spells/aura/triggered_cast_proc_e2e_test.go: Black Magic procs from Death Coil and from Flametongue Attack on auto-attacks, and one Blizzard tick takes one Fingers of Frost charge.
AI-assisted Pull Requests
Important
Using AI tools to prepare pull requests is allowed, but it must be disclosed and it must follow our AC guidelines for AI Agentic Engineering (link below).
You are expected to fully understand the changes you submit and to be able to explain and justify them when maintainers ask.
AI tools (e.g. Claude, ChatGPT, or similar) were used entirely or partially to prepare this pull request. If checked, specify which tools and models below.
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
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.
The new e2e tests pass on this branch. With the gate restored, the Flametongue case reports AC#25969 CONFIRMED BUG. With 74396 back at CAST|HIT, one Blizzard tick leaves Fingers of Frost with 0 charges.
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.
Shaman with a Black Magic weapon and Flametongue Weapon, auto-attacking a Heroic Training Dummy without casting: Black Magic (59626) procs.
Death Knight with a Black Magic weapon casting Death Coil on the dummy: Black Magic procs.
Mage with Fingers of Frost (.aura 74396) channeling Blizzard on the dummy: the channel start takes no charge, each tick takes one, hit or miss.
Mage with Arcane Potency channeling Blizzard: the ticks don't consume Arcane Potency.
Mage with Missile Barrage casting Arcane Missiles, and Arcane Blast with Arcane Potency: charges drop as before.
Known Issues and TODO List:
[ ]
[ ]
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:
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.
The CAST phase proc in Spell::_cast skipped every triggered spell, so
auras that opt into triggered procs never saw them. Black Magic never
procced from Flametongue Attack, Static Shock or Death Coil damage.
Aura::GetProcEffectMask already filters triggered spells per aura
(SPELL_ATTR3_CAN_PROC_FROM_PROCS, PROC_ATTR_TRIGGERED_CAN_PROC,
SPELL_ATTR3_NOT_A_PROC), so Blizzard ticks still don't consume Arcane
Potency. This matches TrinityCore, which only requires an original
caster.
Fingers of Frost (74396) relied on the HIT phase for triggered spells.
With both phases firing, each Blizzard tick or Arcane Missiles bolt
consumed two charges, so its proc entry is now CAST phase only, as in
TrinityCore, and the script's HIT-phase handling is dropped.
Closesazerothcore#25969
Co-authored-by: blinkysc <37940565+blinkysc@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
The change updates cast-phase proc handling for triggered casts and adjusts the Fingers of Frost proc hook. It sets SpellPhaseMask for spell 74396. New end-to-end tests cover Black Magic procs from Death Coil and Flametongue Attack, plus Fingers of Frost charge use during Blizzard.
Severity of issue fixed: Low
Merge Risk: Low · up to f9352
The change lets Black Magic proc from triggered harmful spells and fixes Fingers of Frost so one Blizzard tick uses one charge. The only open concern is a rare timing flake in the new e2e test, which can be fixed without touching the core logic. Merge risk is low.
Warning
Some tools did not complete. Review the errors below.
golangci-lint (2.15.0)
level=error msg="[linters_context] typechecking error: build constraints exclude all Go files in /e2e/suites/spells/aura"
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Read the tick count and charges from the same settled channel state.
Line 392 checks the tick count, and line 396 reads the charges with no wait between them. A tick logged in that gap leaves the charge read stale, so the assertion at line 410 can fail on a correct core. The window is short, so the failure is rare, but it is a test race rather than a core defect.
Move the tick check and the charge read after the channel is stopped and WaitNotChanneling returns, so both observations describe the same final state.
By Claude Code, Opus 5.5 (claude-opus-5-5) — self-review v0.10, 2026-11-29
Checks Tested in-game by the author. e2e on a local Release build of the change: TestAC_25969_*/FlametongueAttack and TestAura_FingersOfFrostTriggeredTickTakesOneCharge pass at 11f5b61f10 (2/2 each; 10/10 Fingers of Frost on earlier revisions). With the !IsTriggered() gate restored, FlametongueAttack reports AC#25969 CONFIRMED BUG; with 74396 at CAST|HIT, Fingers of Frost has 0 charges after one tick. TestAC_25969_*/DeathCoil not run locally (the local auth DB's RBAC blocks death knight creation).
Review details (rounds 10–11)
Intent Let triggered spells fire the CAST-phase proc event in Spell::_cast, so Black Magic (59630) procs from triggered harmful spells (Death Coil damage 47632, Static Shock 49279, Flametongue Attack 10444), and move Fingers of Frost (74396) to CAST phase only so one triggered Blizzard tick takes one charge; e2e coverage for both.
Project rules.agents/docs/self-review-rules.md found and applied
Difff55450bb7e194e9a698d4b197c8776d3abbf0c96
Metadata342010edc77ac65d139a23a3d85172a80f3d77c3
Carried forward from black-magic-triggered-procs.SELF-REVIEW-3.md: findings 1–21 fixed. Upstream master was merged in to resolve a conflict in the e2e/README.md inventory row.
Round 10 — 62566e9a63, full (merge base moved to 0643d9d9c7 by the master merge), 1 finding
e2e/suites/spells/aura/triggered_cast_proc_e2e_test.go:253 — comment claimed subtests close a shared cached world DB; each subtest builds its own bot and the harness caches per bot, so the shared DB plumbing was redundant → fixed: removed
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
CORERelated to the coreDBrelated to the SQL databasee2eThis PR contains a end-to-end testfile-cppUsed to trigger the matrix buildScriptRefers to C++ Scripts for the Core
3 participants
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:
Spell::_castskipped the CAST phase proc for every triggered spell (m_originalCaster && !IsTriggered()). Black Magic (59630) only procs in the CAST phase, so it never procced from harmful spells a script or weapon imbue casts as triggered: Death Coil's damage (47632), Static Shock's Lightning Shield damage (49279) and Flametongue Attack (10444).The gate is dropped.
Aura::GetProcEffectMaskalready filters triggered spells per aura: an aura only sees them withSPELL_ATTR3_CAN_PROC_FROM_PROCSorPROC_ATTR_TRIGGERED_CAN_PROC, or when the triggered spell hasSPELL_ATTR3_NOT_A_PROC. Black Magic has both of the first two. Arcane Potency has neither, so Blizzard ticks still don't consume it, which is what the gate was added for. TrinityCore only requires an original caster here. Allowing justNOT_A_PROCspells would fix Death Coil and Static Shock but not Flametongue Attack, which has no Attr3 bits.Fingers of Frost (74396) has 2 charges, accepts triggered spells and listened to CAST and HIT. With both phases firing for triggered spells, one Blizzard tick or Arcane Missiles bolt took both charges. Its
spell_procrow is now CAST only, as #24942 set it, andspell_mage_fingers_of_frostdrops its HIT phase handling. Since charges are now taken at CAST, a triggered tick that misses also takes one.This re-lands part of #24942, which also dropped this gate and moved 74396 to CAST only. #24990 reverted both, naming "the separated CAST-before-HIT phase and deferred 0-charge aura cleanup" as the cause of a use-after-free. CAST-before-HIT ordering came back in #25647 and is on master, and this PR doesn't bring back the deferred 0-charge cleanup.
CAST phase
spell_procrows that now see triggered spells through their own attributes:SPELL_ATTR3_CAN_PROC_FROM_PROCS: 38334, 62114, 67667, 67670, 67698, 67752, 71585, 71602, 71645, 75465, 75474SPELL_ATTR3_CAN_PROC_FROM_PROCS. Righteous Weapon Coating (45398) has it too, but its melee and ranged auto attack proc flags only add auto-repeat shots.Two kinds of triggered casts pass every aura's filter and now reach any CAST phase row: ranged auto-repeat shots (Auto Shot, wand Shoot), and triggered spells with
SPELL_ATTR3_NOT_A_PROC(Arcane Missiles bolts, Penance bolts, Lightning Shield damage, Death Coil damage, Tranquility ticks, Starfall stars). These are all the CAST phase rows with charges and withoutPROC_ATTR_REQ_SPELLMODorPROC_ATTR_REQ_MANA_COSTthat such casts can now consume:Rows with
PROC_ATTR_REQ_SPELLMODorPROC_ATTR_REQ_MANA_COST(Arcane Potency, Presence of Mind, Hot Streak, Brain Freeze and the rest) still need a spell that the aura's spellmod applies to or that costs mana.e2e coverage in
e2e/suites/spells/aura/triggered_cast_proc_e2e_test.go: Black Magic procs from Death Coil and from Flametongue Attack on auto-attacks, and one Blizzard tick takes one Fingers of Frost charge.AI-assisted Pull Requests
Important
Using AI tools to prepare pull requests is allowed, but it must be disclosed and it must follow our AC guidelines for AI Agentic Engineering (link below).
You are expected to fully understand the changes you submit and to be able to explain and justify them when maintainers ask.
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
TrinityCore
Spell::_castfires the CAST phase proc for any spell with an original caster: https://github.com/TrinityCore/TrinityCore/blob/e6570eb6b1c2c2b667219134007ab2f442a00619/src/server/game/Spells/Spell.cpp#L3620-L3637The
!m_originalCastergate and the CAST proc call there are ariel-'s, from TrinityCore/TrinityCore@e641d0c (Implementation of QAston proc system) and TrinityCore/TrinityCore@cb9e72e, credited withCo-authored-by.The gate removal, the 74396 phase change and the script simplification follow eae14a5 (fix(Core/Spells): Fix proc phase ordering CAST before HIT for instant spells #24942) by blinkysc, which co-credits Shauren. Both are credited with
Co-authored-by.Tests Performed:
This PR has been:
The new e2e tests pass on this branch. With the gate restored, the Flametongue case reports
AC#25969 CONFIRMED BUG. With 74396 back at CAST|HIT, one Blizzard tick leaves Fingers of Frost with 0 charges.How to Test the Changes:
.aura 74396) channeling Blizzard on the dummy: the channel start takes no charge, each tick takes one, hit or miss.Known Issues and TODO List:
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.