diff --git a/Components/Core/Conditions/Categories/Spells.lua b/Components/Core/Conditions/Categories/Spells.lua index 5361f9cf..adac7642 100644 --- a/Components/Core/Conditions/Categories/Spells.lua +++ b/Components/Core/Conditions/Categories/Spells.lua @@ -311,6 +311,32 @@ function Env.ReactiveHelper(NameFirst, Checked) end end +ConditionCategory:RegisterCondition(2.95, "SPELL_LEARNED", { + text = L["SPELL_LEARNED"], + + bool = true, + + name = function(editbox) + editbox:SetTexts(L["SPELL_LEARNED"], L["CNDT_ONLYFIRST"]) + editbox:SetLabel(L["SPELLTOCHECK"]) + end, + useSUG = true, + unit = false, + formatter = TMW.C.Formatter.BOOL, + icon = 237558, + tcoords = CNDT.COMMON.standardtcoords, + Env = { + GetSpellInfo = GetSpellInfo, + }, + -- In Classic SoD, IsPlayerSpell doesn't work for rune abilities (always returns false). + -- However, GetSpellInfo with a name input only returns the player's spells. + funcstr = [[BOOLCHECK( GetSpellInfo(c.Spells.FirstString) )]], + events = function(ConditionObject, c) + return + ConditionObject:GenerateNormalEventString("SPELLS_CHANGED") + end, +}) + ConditionCategory:RegisterCondition(3, "REACTIVE", { text = L["SPELLREACTIVITY"], tooltip = L["REACTIVECNDT_DESC"], diff --git a/Localization/TellMeWhen-enUS.lua b/Localization/TellMeWhen-enUS.lua index ed89c0c9..b0a4fc9d 100755 --- a/Localization/TellMeWhen-enUS.lua +++ b/Localization/TellMeWhen-enUS.lua @@ -1690,6 +1690,7 @@ 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["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."