Skip to content

Commit

Permalink
fix: #2208 errors around actions for monks
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Sep 2, 2024
1 parent c10dfc7 commit 50aa03a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Fix: #2197 upstream issue in LibSpellRange-1.0 with range checking in classic/cata.
* Fix: #2201 Don't treat inactive hero talent trees as learned talents
* Fix: #2210 Fix desync of current GCD duration
* Fix: #2208 Uncommon issue with monk action bars


## v11.0.4
Expand Down
19 changes: 11 additions & 8 deletions Components/Core/Common/Actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,27 @@ local function UpdateActionSlots()
-- Sometimes, FindBaseSpellByID can return `nil`.
local baseId = FindBaseSpellByID(id);
if baseId then
local baseName = strlowerCache[GetSpellName(baseId)]
spells[baseId] = true
spells[baseName] = true
MapSpellToAction(baseId, action)
MapSpellToAction(baseName, action)
if baseName then
local baseName = strlowerCache[GetSpellName(baseId)]
MapSpellToAction(baseName, action)
end
end

if C_Spell.GetOverrideSpell then

-- https://github.com/ascott18/TellMeWhen/issues/2205
-- I suspect GetOverrideSpell was returning nil too?
local overrideId = C_Spell.GetOverrideSpell(id);
if overrideId then
local overrideName = strlowerCache[GetSpellName(overrideId)]
MapSpellToAction(overrideId, action)
MapSpellToAction(overrideName, action)
spells[overrideId] = true
spells[overrideName] = true

-- overrideName being nil was the root cause of https://github.com/ascott18/TellMeWhen/issues/2208
local overrideName = strlowerCache[GetSpellName(overrideId)]
if overrideName then
MapSpellToAction(overrideName, action)
spells[overrideName] = true
end
end
end

Expand Down
1 change: 1 addition & 0 deletions Options/CHANGELOG.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ TMW.CHANGELOG = [==[
* Fix: #2197 upstream issue in LibSpellRange-1.0 with range checking in classic/cata.
* Fix: #2201 Don't treat inactive hero talent trees as learned talents
* Fix: #2210 Fix desync of current GCD duration
* Fix: #2208 Uncommon issue with monk action bars
## v11.0.4
Expand Down

0 comments on commit 50aa03a

Please sign in to comment.