This commit is contained in:
Bunny67
2020-06-07 15:01:05 +03:00
parent 45f4b455e9
commit 294a27d2f6
3 changed files with 8 additions and 27 deletions
+2 -8
View File
@@ -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
+5 -18
View File
@@ -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)
+1 -1
View File
@@ -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