AuraTrigger:IsMatching has a possibly redundant check #8

Open
opened 2026-03-18 00:11:24 +00:00 by omicron · 1 comment
Owner

In AuraTrigger:IsMatching there is an incorrect check that checks the spell id. However, this doesn't actually cause issues because the AuraList will keep track of checking which trigger reacts to which spells. It seems the check there is redundant and I'm not sure why it was there in the first place. This needs to be more thoroughly thought about before a decision is made either way.

In AuraTrigger:IsMatching there is an incorrect check that checks the spell id. However, this doesn't actually cause issues because the AuraList will keep track of checking which trigger reacts to which spells. It seems the check there is redundant and I'm not sure why it was there in the first place. This needs to be more thoroughly thought about before a decision is made either way.
omicron added the
Status
Need More Info
2
Kind/Internals
labels 2026-03-18 00:11:24 +00:00
Author
Owner

The way AuraTrigger currently gets activated is via the AuraList. AuraList keeps track of the auras active on the unit of a particular unit frame. It keeps all triggers in spell id indexed hash maps so by the time an AuraTrigger gets updated we kind of already know that it matches the spellId. In that regard this check is indeed redundant. It seems reasonable to me that we demand that the spell Id matches as a precondition to the trigger updating methods.

I'm considering extending this to also allow triggering by spell name instead of spell id. This would just add another table of the triggers indexed by spell names. If we go this route, the precondition on AuraTrigger would then be that it needs to match either the spell ids or the spell names.

The way AuraTrigger currently gets activated is via the AuraList. AuraList keeps track of the auras active on the unit of a particular unit frame. It keeps all triggers in spell id indexed hash maps so by the time an AuraTrigger gets updated we kind of already know that it matches the spellId. In that regard this check is indeed redundant. It seems reasonable to me that we demand that the spell Id matches as a precondition to the trigger updating methods. I'm considering extending this to also allow triggering by spell name instead of spell id. This would just add another table of the triggers indexed by spell names. If we go this route, the precondition on AuraTrigger would then be that it needs to match either the spell ids or the spell names.
Sign in to join this conversation.