Skip to content

Commit

Permalink
Workaround #1978, #2055 - Add hardcoded workarounds for a few reporte…
Browse files Browse the repository at this point in the history
…d covenant abilities that can't be tracked properly by name (Soul Rot, Adaptive Swarm).
  • Loading branch information
ascott18 committed Feb 27, 2023
1 parent 2c26c37 commit 3b4f266
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 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 #2075 - Spell cast percent completion was not filtering by name.
* Fix #2072 - Swing timer monitors were not initializing dual-wield state until an equipment change was observed.
* Fix #2071 - Tooltip Number conditions not working on retail. Also switched these conditions to use modern APIs, resulting in substantially better performance.
* Workaround #1978, #2055 - Add hardcoded workarounds for a few reported covenant abilities that can't be tracked properly by name (Soul Rot, Adaptive Swarm).
* Workaround #2065 - Blizzard's cooldown bling effect ignores opacity, so suppress it for hidden icons.

## v10.0.8
Expand Down
22 changes: 22 additions & 0 deletions Components/Core/Spells/Spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,28 @@ local fixSpellMap = {
end
end,
}
local function covenantFix(shadowlandsId, talentedId)
-- For covenant abilities that became talents,
-- there are two abilities with different cooldowns, names, ids, etc.

-- However, the talent cannot be used while the covenant ability is on CD, and vice-versa.
-- Additionally, and the reason for this fix, is spell APIs by name will resolve to the covenant ability,
-- not to the talent. So, when both are learned, we'll assume that if the player has both abilities learned,
-- then the talent one is the one they're actually using, so we have TMW replace the spell with the ID of the talent.

-- Note: not all covenant abilities are broken in this way.
-- For example, Convoke the Spirits, while it does have two different spells,
-- resolves by-name to the correct spell based on talent learned vs unlearned.

fixSpellMap[shadowlandsId] = function()
if IsPlayerSpell(shadowlandsId) and IsPlayerSpell(talentedId) then
return talentedId
end
end
end

covenantFix(325727, 391888) -- Adaptive Swarm (druid, necrolord) https://github.com/ascott18/TellMeWhen/issues/2055
covenantFix(325640, 386997) -- Soul Rot (warlock, nf) https://github.com/ascott18/TellMeWhen/issues/1978

local function getSpellNames(setting, doLower, firstOnly, convert, hash, allowRenaming)
local spells = parseSpellsString(setting, doLower, false)
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 #2075 - Spell cast percent completion was not filtering by name.
* Fix #2072 - Swing timer monitors were not initializing dual-wield state until an equipment change was observed.
* Fix #2071 - Tooltip Number conditions not working on retail. Also switched these conditions to use modern APIs, resulting in substantially better performance.
* Workaround #1978, #2055 - Add hardcoded workarounds for a few reported covenant abilities that can't be tracked properly by name (Soul Rot, Adaptive Swarm).
* Workaround #2065 - Blizzard's cooldown bling effect ignores opacity, so suppress it for hidden icons.
## v10.0.8
Expand Down

0 comments on commit 3b4f266

Please sign in to comment.