fix(aura): identify a cached aura by its caster and descriptor slot - #21
Open
fuffc wants to merge 1 commit into
Open
fix(aura): identify a cached aura by its caster and descriptor slot#21fuffc wants to merge 1 commit into
fuffc wants to merge 1 commit into
Conversation
Two casters of one spell on one target are two auras in two descriptor slots, but `Aura::Source` held a single entry per `(target, spellId)`. The second cast overwrote the first caster's `casterGuid` and timing, and `OnAuraRemoved` for either copy evicted the entry backing the survivor. Observable from Lua, with a same-class groupmate debuffing your target: `sourceUnit` names the wrong caster, so a `PLAYER`-filtered query drops your own debuff; and the base-duration estimate stored for the other caster elapses while your talent-extended aura is still up, which `PushEnriched` reports as `expirationTime = 0` — an aura on the unit with no timer at all. Entries are now keyed `(target, spellId, caster)`, the identity the server uses. Recovering which instance a descriptor slot holds needs the two halves joined: SpellGo knows the caster but no slot, `OnAuraAdded` knows the slot but no caster, and they arrive in that order, so the application hook seats its slot on the newest cast capture still awaiting one. `Get` takes that slot and resolves by it first, falling back to the unit's sole entry for the spell — every single-caster case, and the paths with no descriptor to read a slot from. Several entries and no binding resolves to a miss: the caller's unknown-caster defaults beat a coin flip between two casters. `OnAuraRemoved` and `EvictAbsent` retire the instance in the vacated slot rather than every entry sharing its spell ID. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Two casters of one spell on one target are two auras in two descriptor slots, but
Aura::Sourceheld a single entry per(target, spellId). The second cast overwrote the first caster'scasterGuidand timing, andOnAuraRemovedfor either copy evicted the entry backing the survivor.Observable from Lua, with a same-class groupmate debuffing your target:
sourceUnitnames the wrong caster, so aPLAYER-filtered query drops your own debuff; and the base-duration estimate stored for the other caster elapses while your talent-extended aura is still up, whichPushEnrichedreports asexpirationTime = 0— an aura on the unit with no timer at all.Entries are now keyed
(target, spellId, caster), the identity the server uses. Recovering which instance a descriptor slot holds needs the two halves joined: SpellGo knows the caster but no slot,OnAuraAddedknows the slot but no caster, and they arrive in that order, so the application hook seats its slot on the newest cast capture still awaiting one.Gettakes that slot and resolves by it first, falling back to the unit's sole entry for the spell — every single-caster case, and the paths with no descriptor to read a slot from. Several entries and no binding resolves to a miss: the caller's unknown-caster defaults beat a coin flip between two casters.OnAuraRemovedandEvictAbsentretire the instance in the vacated slot rather than every entry sharing its spell ID.