Skip to content

Commit

Permalink
feat: #2214 - New condition: Spell Overridden. For all those pesky ne…
Browse files Browse the repository at this point in the history
…w Paladin talents with no way to figure out which spell is active.
  • Loading branch information
ascott18 committed Sep 9, 2024
1 parent 3db267c commit 7c60606
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 7 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## v11.0.7
* #1857 - Add LibCustomGlow animations.
* #2144 - TMW now accounts for adjusted-rate cooldowns and auras (e.g. timer freezes caused by talents or boss mechanics).
* #1857 - Added LibCustomGlow animations.
* #2144 - Cooldowns and auras now accounts for time dilation. For example, timer freezes caused by talents, or boss mechanics like Jailer phase transitions or Chronomatic Anomaly fast/slow effects.
* #2214 - New condition: Spell Overridden. For all those pesky new Paladin talents with no way to figure out which spell is active.
* Fix: #2089 - Track swings with Crusading Strikes talent in swing timers
* Fix: #2125 - "script ran too long" when zoning into instances.
* Fix: #2191 - Icon Shown condition ignoring Shown/Hidden checkboxes for disabled icons/groups.
Expand Down
37 changes: 37 additions & 0 deletions Components/Core/Conditions/Categories/Spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ end

ConditionCategory:RegisterCondition(2.95, "SPELL_LEARNED", {
text = L["SPELL_LEARNED"],
tooltip = L["SPELL_LEARNED_DESC"],

bool = true,

Expand All @@ -345,6 +346,42 @@ ConditionCategory:RegisterCondition(2.95, "SPELL_LEARNED", {
end,
})

if C_Spell.GetOverrideSpell then
ConditionCategory:RegisterCondition(2.97, "SPELL_OVERRIDE", {
text = L["SPELL_OVERRIDE"],
tooltip = L["SPELL_OVERRIDE_DESC"],

bool = true,

name = function(editbox)
editbox:SetTexts(L["SPELL_OVERRIDE_BASE"], L["CNDT_ONLYFIRST"])
end,
name2 = function(editbox)
editbox:SetTexts(L["SPELL_OVERRIDE_TARGET"], L["CNDT_ONLYFIRST"])
end,
useSUG = true,
unit = false,
formatter = TMW.C.Formatter.BOOL,
icon = 1112939,
tcoords = CNDT.COMMON.standardtcoords,
Env = {
GetOverrideSpell = C_Spell.GetOverrideSpell,
GetSpellName = TMW.GetSpellName
},
funcstr = function(c)
if isNumber[c.Name2] then
return [[BOOLCHECK( GetOverrideSpell(c.Spells.First) == c.Spells2.First )]]
else
return [[BOOLCHECK( strlowerCache[GetSpellName(GetOverrideSpell(c.Spells.First) or "")] == c.Spells2.First )]]
end
end,
events = function(ConditionObject, c)
return
ConditionObject:GenerateNormalEventString("SPELLS_CHANGED")
end,
})
end

ConditionCategory:RegisterCondition(3, "REACTIVE", {
text = L["SPELLREACTIVITY"],
tooltip = L["REACTIVECNDT_DESC"],
Expand Down
5 changes: 3 additions & 2 deletions Localization/StaticFormats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ else
end

if GetSpellInfo(119996) then
L["ICONMENU_REACTIVE_DESC"] = L["ICONMENU_REACTIVE_DESC"]:format(Spell(5308), Spell(119996), Spell(32379))
L["ICONMENU_REACTIVE_DESC"] = L["ICONMENU_REACTIVE_DESC"]:format(Spell(5308), Spell(119996), Spell(24275))
else
L["ICONMENU_REACTIVE_DESC"] = L["ICONMENU_REACTIVE_DESC"]:format(Spell(5308), Spell(7384), Spell(19306))
end
Expand All @@ -70,7 +70,8 @@ L["HELP_MISSINGDURS"] = L["HELP_MISSINGDURS"]:format("%s", GetSpellInfo(1766)) -
L["ICONTYPE_SWINGTIMER_TIP"] = L["ICONTYPE_SWINGTIMER_TIP"]:format(GetSpellInfo(75), L["ICONMENU_SPELLCOOLDOWN"], L["ICONMENU_SPELLCOOLDOWN"], GetSpellInfo(75), 75)
L["ICONTYPE_SWINGTIMER_TIP_APPLYSETTINGS"] = L["ICONTYPE_SWINGTIMER_TIP_APPLYSETTINGS"]:format(GetSpellInfo(75))

L["ICONMENU_IGNORENOMANA_DESC"] = L["ICONMENU_IGNORENOMANA_DESC"] :format(Spell(85288), Spell(5308))
L["ICONMENU_IGNORENOMANA_DESC"] = L["ICONMENU_IGNORENOMANA_DESC"] :format(Spell(24275), Spell(5308))
L["REACTIVECNDT_DESC"] = L["REACTIVECNDT_DESC"] :format(Spell(24275), Spell(5308))
L["CLEU_DAMAGE_SHIELD_DESC"] = L["CLEU_DAMAGE_SHIELD_DESC"] :format(Spell(31271), Spell(30482), Spell(324))
L["CLEU_DAMAGE_SHIELD_MISSED_DESC"] = L["CLEU_DAMAGE_SHIELD_MISSED_DESC"] :format(Spell(31271), Spell(30482), Spell(324))
L["CLEU_SPELL_STOLEN_DESC"] = L["CLEU_SPELL_STOLEN_DESC"] :format(Spell(30449))
Expand Down
15 changes: 14 additions & 1 deletion Localization/TellMeWhen-enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1699,9 +1699,22 @@ L["SPELLCHARGETIME_DESC"] = "Tracks the time remaining until a spell like %s or
L["EMPOWEREDSTAGE"] = "Empowered Spell Stage"
L["EMPOWEREDSTAGE_DESC"] = "Current stage of empowered spell"
L["SPELL_LEARNED"] = "Spell Learned"
L["SPELL_LEARNED_DESC"] = [[Checks if the given spell is learned.
Note that this can fail to work for some types of spells - especially spells that replace other spells. For those cases, use the Spell Overridden condition.]]

L["SPELL_OVERRIDE"] = "Spell Overridden"
L["SPELL_OVERRIDE_DESC"] = [[Checks if the given base spell is currently overridden by the specified override spell.
To check if the base spell is not overriden by anything, enter the same spell as both the base and override spell.]]
L["SPELL_OVERRIDE_BASE"] = "Base Spell"
L["SPELL_OVERRIDE_TARGET"] = "Override Spell"

L["SPELLREACTIVITY"] = "Spell Reactivity"
L["MP5"] = "%d MP5"
L["REACTIVECNDT_DESC"] = "This condition only checks the reactive state of the ability, not the cooldown of it."
L["REACTIVECNDT_DESC"] = [[This condition only checks the reactive state of the ability, not the cooldown of it.
Reactive abilities are those that are only usable under certain conditions in combat, like %s or %s.]]
L["BUFFCNDT_DESC"] = "Only the first spell will be checked, all others will be ignored."
L["CNDT_ONLYFIRST"] = "Only the first spell/item will be checked - semicolon-delimited lists are not valid for this condition type."
L["CNDT_MULTIPLEVALID"] = "You can enter multiple names/IDs to check by separating each with a semicolon."
Expand Down
5 changes: 3 additions & 2 deletions Options/CHANGELOG.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ TMW.CHANGELOG_LASTVER="10.0.0"

TMW.CHANGELOG = [==[
## v11.0.7
* #1857 - Add LibCustomGlow animations.
* #2144 - TMW now accounts for adjusted-rate cooldowns and auras (e.g. timer freezes caused by talents or boss mechanics).
* #1857 - Added LibCustomGlow animations.
* #2144 - Cooldowns and auras now accounts for time dilation. For example, timer freezes caused by talents, or boss mechanics like Jailer phase transitions or Chronomatic Anomaly fast/slow effects.
* #2214 - New condition: Spell Overridden. For all those pesky new Paladin talents with no way to figure out which spell is active.
* Fix: #2089 - Track swings with Crusading Strikes talent in swing timers
* Fix: #2125 - "script ran too long" when zoning into instances.
* Fix: #2191 - Icon Shown condition ignoring Shown/Hidden checkboxes for disabled icons/groups.
Expand Down

0 comments on commit 7c60606

Please sign in to comment.