fix(cdm): apply Custom Icon to aura-tracked custom buffs - #2082
Open
wanghws wants to merge 1 commit into
Open
Conversation
A Custom Spell ID added to a Buffs bar has no stored duration, so it renders through the engine aura container (_AC) rather than a CDM frame, and ApplyCustomIcon never reaches it. The right-click menu still offered Add Custom Icon for these entries, so the setting saved and nothing changed. EllesmereGaming#1425 noted that per-spell settings cannot reach these icons: one engine group renders every custom aura on the bar, and while auras are secret Lua cannot tell its buttons apart. A spell with a Custom Icon now gets a single-spell group of its own in the same container, so every button in that group is known to hold that spell without reading the aura. Its style hides the engine-stamped art (the same SetShown + alpha pair Only Show Numbers uses) and shows a texture of our own, created in the button's creation window and anchored to the icon so shape masks, zoom crop and Only Show Numbers follow it. Which spells carry a Custom Icon is part of the structural signature; the fileID is not. Re-picking an icon restyles that group in place, because a rebuild abandons the old container and its engine-created group buttons can never be freed. Styles of groups a rebuild drops are cleared from AK.styles. Bars with no Custom Icon on an aura-tracked custom keep the single shared group and the exact signature they had: the per-spell resolve is gated on ns._cdmAnyCustomIcon. The options callback also runs the aura-tracking sync now, since the reanchor it already queued never reaches the container. Claude-Session: https://claude.ai/code/session_01NYsCUA5DSWPU1wHWFZv2p7
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.
What does this PR do?
A Custom Spell ID on a Buffs bar offers Add Custom Icon in its right-click menu, but
the icon never changed: the buff kept showing its own art (screenshots below).
Cause. A custom spell ID on a buffs-family bar has no stored duration, so it is not a CDM
frame at all -- it renders in the engine aura container hung off the bar's end (
_ACinEllesmereUICdmHooks.lua).ApplyCustomIcononly stamps claimed CDM frames and our own injectedframes, so it never reaches these buttons. #1425 recorded the underlying limit: one engine group
renders every custom aura on the bar, and while auras are secret Lua cannot tell its buttons
apart, so per-spell settings have nowhere to land.
Fix. A spell that has a Custom Icon gets a single-spell group of its own in the same
container. Every button in that group is then known to hold that spell without reading the
aura, so the group's style can carry the art:
SetShown+ alpha pair Only Show Numbersalready uses) and shows a texture of our own in its place. The texture is created in the
button's creation window (
_AC.InitExtra, the only place a region may be parented to an engineaura button) and anchored to the icon, so shape masks, zoom crop, Cropped and Only Show Numbers
all follow it.
is not. Re-picking an icon restyles that group in place (
_AC.SyncFixedIcons) instead ofrebuilding, because a rebuild abandons the old container and its engine-created group buttons
can never be freed (
AK.ReleaseContainer). Styles of groups a rebuild drops are removed fromAK.styles.UpdateCustomBuffAuraTracking: the reanchor italready queued never reaches the container.
Notes:
shared group and the exact signature it had, and the per-spell resolve is gated on
ns._cdmAnyCustomIcon.order).
their visible count, and the split moves one visible slot from the shared group to the new one.
reach these icons and are out of scope here; the audio cues are covered separately by CDM: play buff gain/loss audio cues for aura-tracked custom buffs #1712.
How was it tested?
Tested in-game on live against this checklist:
461860: the aura renders with the custom artwhile active.
changes.
Screenshots
Before -- Custom Icon
461860saved for the spell, the buff still shows its own art:After -- the buff shows the custom art:
Checklist
effect where it was silently ignored
ns._cdmAnyCustomIconisset, and bars without a Custom Icon on an aura-tracked custom keep the exact container and
signature
is (re)built or restyled, never per aura event or per frame
their creation window; no hooks added
https://claude.ai/code/session_01NYsCUA5DSWPU1wHWFZv2p7