From 294a27d2f61ee5bc7badd42473137efdabd28a45 Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Sun, 7 Jun 2020 15:01:05 +0300 Subject: [PATCH] update #13 --- WeakAuras/GenericTrigger.lua | 10 ++-------- WeakAuras/Prototypes.lua | 23 +++++------------------ WeakAurasOptions/WeakAurasOptions.lua | 2 +- 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index af11ddc..9e4ede9 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -2001,10 +2001,7 @@ do end end - function WeakAuras.GetSpellCooldown(id, ignoreRuneCD, showgcd, ignoreSpellKnown, track) - if (not spellKnown[id] and not ignoreSpellKnown) then - return; - end + function WeakAuras.GetSpellCooldown(id, ignoreRuneCD, showgcd, track) local startTime, duration, gcdCooldown; if track == "charges" then startTime, duration = spellCdsCharges:FetchSpellCooldown(id) @@ -2031,10 +2028,7 @@ do return startTime, duration, gcdCooldown; end - function WeakAuras.GetSpellCharges(id, ignoreSpellKnown) - if (not spellKnown[id] and not ignoreSpellKnown) then - return; - end + function WeakAuras.GetSpellCharges(id) return spellCounts[id]; end diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 71153b6..7de7332 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -1835,10 +1835,9 @@ WeakAuras.event_prototypes = { local spellname = %s local ignoreRuneCD = %s local showgcd = %s; - local ignoreSpellKnown = %s; local track = %q - local startTime, duration, gcdCooldown = WeakAuras.GetSpellCooldown(spellname, ignoreRuneCD, showgcd, ignoreSpellKnown, track); - local spellCount = WeakAuras.GetSpellCharges(spellname, ignoreSpellKnown); + local startTime, duration, gcdCooldown = WeakAuras.GetSpellCooldown(spellname, ignoreRuneCD, showgcd, track); + local spellCount = WeakAuras.GetSpellCharges(spellname); local stacks = (spellCount and spellCount > 0 and spellCount) or nil; local genericShowOn = %s local expirationTime = startTime and duration and startTime + duration @@ -1860,7 +1859,6 @@ WeakAuras.event_prototypes = { ret = ret:format(spellName, (trigger.use_matchedRune and "true" or "false"), (trigger.use_showgcd and "true" or "false"), - (trigger.use_ignoreSpellKnown and "true" or "false"), (trigger.track or "auto"), showOnCheck ); @@ -1972,11 +1970,6 @@ WeakAuras.event_prototypes = { text = text ..L["Ignore Rune CDs"] end - if trigger.use_ignoreSpellKnown then - if text ~= "" then text = text .. "; " end - text = text .. L["Ignore Unknown Spell"] - end - if trigger.genericShowOn ~= "showOnReady" and trigger.track ~= "cooldown" then if trigger.use_trackcharge and trigger.trackcharge then if text ~= "" then text = text .. "; " end @@ -2015,13 +2008,6 @@ WeakAuras.event_prototypes = { test = "true", collapse = "extra Cooldown Progress (Spell)" }, - { - name = "ignoreSpellKnown", - display = L["Disable Spell Known Check"], - type = "toggle", - test = "true", - collapse = "extra Cooldown Progress (Spell)" - }, { name = "trackcharge", display = L["Show CD of Charge"], @@ -3377,9 +3363,10 @@ WeakAuras.event_prototypes = { name = "spellName", display = L["Spell"], required = true, - type = "string", + type = "spell", test = "true", - store = true + store = true, + conditionType = "string" }, -- This parameter uses the IsSpellInRange API function, but it does not check spell range at all -- IsSpellInRange returns nil for invalid targets, 0 for out of range, 1 for in range (0 and 1 are both "positive" values) diff --git a/WeakAurasOptions/WeakAurasOptions.lua b/WeakAurasOptions/WeakAurasOptions.lua index 4fc8e56..9ebe11b 100644 --- a/WeakAurasOptions/WeakAurasOptions.lua +++ b/WeakAurasOptions/WeakAurasOptions.lua @@ -724,7 +724,7 @@ function WeakAuras.ConstructOptions(prototype, data, startorder, triggernum, tri end end end - return useExactSpellId and L["Invalid Spell ID"] or L["Invalid Spell Name/ID/Link"]; + return useExactSpellId and L["Invalid Spell ID"] or (arg.conditionType == "string" and L["Invalid Spell Name/Link"] or L["Invalid Spell Name/ID/Link"]); else return nil; end