add DummyPRDFrame, multiple Prototype Load Functions, Fix queued function in loginQueue, Refactor unit check and awesome detection

This commit is contained in:
NoM0Re
2024-12-29 13:28:40 +01:00
parent bbd4e59b48
commit afa66ff265
12 changed files with 285 additions and 60 deletions
+6 -6
View File
@@ -802,7 +802,7 @@ local function GetBuffTriggerOptions(data, triggernum)
name = L["Filter by Nameplate Type"],
order = 69.1,
hidden = function() return
not (trigger.type == "aura2" and (WeakAuras.isAwesomeEnabled and trigger.unit == "nameplate"))
not (trigger.type == "aura2" and (WeakAuras.isAwesomeEnabled() and trigger.unit == "nameplate"))
end
},
hostility = {
@@ -818,7 +818,7 @@ local function GetBuffTriggerOptions(data, triggernum)
name = "",
order = 69.3,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and (WeakAuras.isAwesomeEnabled and trigger.unit == "nameplate") and not trigger.useHostility) end
hidden = function() return not (trigger.type == "aura2" and (WeakAuras.isAwesomeEnabled() and trigger.unit == "nameplate") and not trigger.useHostility) end
},
useNpcId = {
@@ -827,14 +827,14 @@ local function GetBuffTriggerOptions(data, triggernum)
name = L["Filter by Npc ID"],
order = 69.31,
hidden = function() return
not (trigger.type == "aura2" and (WeakAuras.isAwesomeEnabled and trigger.unit == "nameplate"))
not (trigger.type == "aura2" and (WeakAuras.isAwesomeEnabled() and trigger.unit == "nameplate"))
end
},
npcId = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Npc ID"],
hidden = function() return not (trigger.type == "aura2" and WeakAuras.isAwesomeEnabled and trigger.unit == "nameplate" and trigger.useNpcId) end,
hidden = function() return not (trigger.type == "aura2" and WeakAuras.isAwesomeEnabled() and trigger.unit == "nameplate" and trigger.useNpcId) end,
order = 69.32,
desc = L["Supports multiple entries, separated by commas"]
},
@@ -843,7 +843,7 @@ local function GetBuffTriggerOptions(data, triggernum)
name = "",
order = 69.33,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and WeakAuras.isAwesomeEnabled and trigger.unit == "nameplate" and not trigger.useNpcId) end
hidden = function() return not (trigger.type == "aura2" and WeakAuras.isAwesomeEnabled() and trigger.unit == "nameplate" and not trigger.useNpcId) end
},
ignoreSelf = {
@@ -851,7 +851,7 @@ local function GetBuffTriggerOptions(data, triggernum)
name = L["Ignore Self"],
order = 69.35,
width = WeakAuras.doubleWidth,
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" or (WeakAuras.isAwesomeEnabled and trigger.unit == "nameplate"))) end
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" or (WeakAuras.isAwesomeEnabled() and trigger.unit == "nameplate"))) end
},
ignoreDead = {
+2 -2
View File
@@ -117,7 +117,7 @@ local function GetCustomTriggerOptions(data, triggernum)
end
elseif trueEvent:match("^UNIT_") then
local unit = string.lower(i)
if not (OptionsPrivate.Private.baseUnitId[unit] and OptionsPrivate.Private.multiUnitId[unit]) and not string.find(unit, "^nameplate%d+$") then
if not (OptionsPrivate.Private.baseUnitId[unit] and OptionsPrivate.Private.multiUnitId[unit]) and not unit:find("^nameplate%d+$") then
return "|cFFFF0000"..L["Unit %s is not a valid unit for RegisterUnitEvent"]:format(unit)
end
elseif trueEvent == "TRIGGER" then
@@ -157,7 +157,7 @@ local function GetCustomTriggerOptions(data, triggernum)
end
elseif trueEvent:match("^UNIT_") then
local unit = string.lower(i)
if not (OptionsPrivate.Private.baseUnitId[unit] or string.find(unit, "^nameplate%d+$")) then
if not (OptionsPrivate.Private.baseUnitId[unit] or unit:find("^nameplate%d+$")) then
return false
end
elseif trueEvent == "TRIGGER" then
@@ -193,6 +193,10 @@ function OptionsPrivate.CreateFrame()
if OptionsPrivate.Private.mouseFrame then
OptionsPrivate.Private.mouseFrame:OptionsClosed()
end
if OptionsPrivate.Private.personalRessourceDisplayFrame then
OptionsPrivate.Private.personalRessourceDisplayFrame:OptionsClosed()
end
end)
local width, height
@@ -484,7 +488,7 @@ function OptionsPrivate.CreateFrame()
addFooter(L["Documentation"], [[Interface\AddOns\WeakAuras\Media\Textures\GitHub.tga]], "https://github.com/WeakAuras/WeakAuras2/wiki",
L["Check out our wiki for a large collection of examples and snippets."])
if not WeakAuras.isAwesomeEnabled then
if not WeakAuras.isAwesomeEnabled() then
addFooter("Awesome WotLK", [[Interface\AddOns\WeakAuras\Media\Textures\GitHub.tga]], "https://github.com/FrostAtom/awesome_wotlk",
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"])
end
@@ -147,7 +147,7 @@ local function createOptions(id, data)
["UNITFRAME"] = L["Unit Frames"],
["CUSTOM"] = L["Custom Frames"]
}
if WeakAuras.isAwesomeEnabled then
if WeakAuras.isAwesomeEnabled() then
v["NAMEPLATE"] = L["Nameplates"]
end
return v