Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cooldown Progress (Spell), Cooldown Ready: Change spell id logic
Change how the "non-exact spell match" logic work to make it work better with the APIs that TWW provides. The intent of the "non-exact spell match" option is to get the cooldown information as long as the "name" matches. That relied on the game giving us information on GetSpellCooldown("name") for the right spell. Before TWW this worked reasonably well, although a few spells were not following overrides. In TWW, C_Spell.GetSpellCooldown() never follows overrides and thus in a lot more cases asking for the spell cooldown via the name doesn't work. Thus we now do the following algorithm (with ample pseudo functions): local spellId = ... if not exactMatch then spellId = GetSpellId(GetSpellName(spellId)) end if followoverride then spellId = GetSpellOverride(spellId) end cooldownInfo = GetSpellCooldown(spellId) And while at it refactor some of the internals so that the code has complexity. Fixes: #5246
- Loading branch information