Skip to content

Commit

Permalink
fix: #2183 Abilities like Void Eruption/Bolt not reflecting when the …
Browse files Browse the repository at this point in the history
…spell changes.
  • Loading branch information
ascott18 committed Jul 27, 2024
1 parent 0b9a9f5 commit 17aa64f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* Fix: #2178 Spell dragging to icons broken (again) in WoW 11.0
* Fix: #2179 Tracking Active condition broken in WoW 11.0
* Fix: #2182 Unlearned choice node talents missing from suggestion list
* Fix: #2181 totem tracking by name broken, added new warlock talents to Guardians icon type
* Fix: #2181 Totem tracking by name broken, added new warlock talents to Guardians icon type
* Fix: #2183 Abilities like Void Eruption/Bolt not reflecting when the spell changes.

## v11.0.1
* Fix: #2174 - Autocast conditions not working
Expand Down
19 changes: 18 additions & 1 deletion Components/Core/Spells/Spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ local tableArgs = {
}
local __index_old = nil

local RenamingSpellSetInstances = {}
setmetatable(RenamingSpellSetInstances, {__mode='kv'})

TMW:NewClass("SpellSet"){
OnFirstInstance = function(self)
Expand All @@ -299,7 +301,9 @@ TMW:NewClass("SpellSet"){

self.Name = name
self.AllowRenaming = allowRenaming

if allowRenaming then
RenamingSpellSetInstances[self] = true
end
setmetatable(self, self.betterMeta)
end,

Expand Down Expand Up @@ -343,6 +347,19 @@ TMW:RegisterCallback("TMW_GLOBAL_UPDATE", function()
end
end)

if C_Spell and C_Spell.GetOverrideSpell then
-- When spell overrides might change,
-- we need to wipe all the data about spell overrides that are cached on SpellSet instances
-- so the can be recalculated. For example, Void Eruption <-> Void Bolt.
-- This used to work automatically through GetSpellCooldown prior to WoW 11.0,
-- but now we have to manage spell overrides ourselves.
TMW:RegisterEvent("SPELLS_CHANGED", function()
for instance in pairs(RenamingSpellSetInstances) do
instance:Wipe()
end
end)
end


--- Returns an instance of {{{TMW.C.SpellSet}}} for the given spellString.
-- The following can be accessed as members of the {{{TMW.C.SpellSet}}}:
Expand Down
3 changes: 2 additions & 1 deletion Options/CHANGELOG.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ TMW.CHANGELOG = [==[
* Fix: #2178 Spell dragging to icons broken (again) in WoW 11.0
* Fix: #2179 Tracking Active condition broken in WoW 11.0
* Fix: #2182 Unlearned choice node talents missing from suggestion list
* Fix: #2181 totem tracking by name broken, added new warlock talents to Guardians icon type
* Fix: #2181 Totem tracking by name broken, added new warlock talents to Guardians icon type
* Fix: #2183 Abilities like Void Eruption/Bolt not reflecting when the spell changes.
## v11.0.1
* Fix: #2174 - Autocast conditions not working
Expand Down

0 comments on commit 17aa64f

Please sign in to comment.