Skip to content

Restore Mistweaver functionality in Midnight#9

Open
EricaPomme wants to merge 4 commits into
VgerMods:mainfrom
EricaPomme:main
Open

Restore Mistweaver functionality in Midnight#9
EricaPomme wants to merge 4 commits into
VgerMods:mainfrom
EricaPomme:main

Conversation

@EricaPomme
Copy link
Copy Markdown
Contributor

@EricaPomme EricaPomme commented Apr 5, 2026

Summary

Restores Teachings of the Monastery (SpellID 202090) stack tracking for Mistweaver Monks in WoW Midnight (12.0+). The buff stacks up to 4, granted by Tiger Palm (+1, or +2 with Way of the Crane selected) and consumed by Blackout Kick.

New approach: UNIT_SPELLCAST_SUCCEEDED

We count stacks synthetically by listening for Tiger Palm (100780) and Blackout Kick (100784) casts on the player, maintaining a local counter. This event delivers reliable spell IDs
without touching any protected data.

KittyOnEvent signature change (arg3)

UNIT_SPELLCAST_SUCCEEDED passes three event arguments: unitTarget, castGUID, spellID. The existing signature only accepted arg1 and arg2. We added arg3 to receive spellID. The handler
only acts when arg1 == "player", so no other event path is affected.

Way of the Crane detection via C_Traits

With the talent active, each Tiger Palm grants 2 stacks instead of 1. IsSpellKnown(388779) returns false. IsPlayerSpell(388779) returns true for all Monk specs regardless of whether the talent is selected (it's present in the class talent tree for every loadout). We use C_Traits tree traversal -- GetNodeInfo + entryIDsWithCommittedRanks -- to check whether the player has specifically committed their choice to the 388779 entry at that node. This correctly returns true/false per loadout.

Testing performed

Testing was performed against training dummies in Silvermoon on my Pandaren-A monk.

  • Brewmaster
    • No sound events emitted (as expected)
  • Windwalker
    • Chi events still play as normal
  • Mistweaver
    • Way of the Serpent
      • One stack plays for each Tiger Palm
      • Resets to 0 on Blackout Kick
      • Does not emit sounds for higher than 4 stacks
    • Way of the Crane
      • Two stacks play for each Tiger Palm
      • Resets to 0 on Blackout Kick
      • Does not emit sounds for higher than 4 stacks
    • "Way" choice node untalented
      • One stack plays for each Tiger Palm
      • Resets to 0 on Blackout Kick
      • Does not emit sounds for higher than 4 stacks

The blanket 'if VgerCore.IsMidnight then return nil end' guard was too
broad -- it disabled all buff-stack tracking for all Midnight players
even out of combat, where aura data is fully readable.

Replace with a per-entry issecretvalue() check inside the loop so that
out-of-combat reads work normally and in-combat reads still return nil
gracefully when spell IDs are secret.
Uses UNIT_SPELLCAST_SUCCEEDED to synthetically count stacks of SpellID
202090, with C_Traits talent detection for Way of the Crane (+2 vs +1
stacks per Tiger Palm).  Bumped to 1.12.5.
@EricaPomme
Copy link
Copy Markdown
Contributor Author

Added back part of the guard. Playing my enh shaman was playing tones on combat end. It should currently only play for monk; or any class explicitly allowed by the guard.

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.

1 participant