(fix/threat) unit "At Least One Enemy" due to missing "none" unit
in our game version
This commit is contained in:
@@ -76,9 +76,6 @@ local ConstructTest, ConstructFunction
|
|||||||
|
|
||||||
local nameplateExists = {}
|
local nameplateExists = {}
|
||||||
|
|
||||||
---@param unit UnitToken
|
|
||||||
---@param smart? boolean
|
|
||||||
---@return boolean unitExists
|
|
||||||
function WeakAuras.UnitExistsFixed(unit, smart)
|
function WeakAuras.UnitExistsFixed(unit, smart)
|
||||||
if #unit > 9 and unit:sub(1, 9) == "nameplate" then
|
if #unit > 9 and unit:sub(1, 9) == "nameplate" then
|
||||||
return nameplateExists[unit]
|
return nameplateExists[unit]
|
||||||
|
|||||||
@@ -6379,7 +6379,7 @@ Private.event_prototypes = {
|
|||||||
trigger.unit = trigger.unit or "target";
|
trigger.unit = trigger.unit or "target";
|
||||||
local ret = [[
|
local ret = [[
|
||||||
unit = string.lower(unit)
|
unit = string.lower(unit)
|
||||||
local name = UnitName(unit, false)
|
local name = UnitName(unit, false) or (unit == "none" and "Unknown")
|
||||||
local ok = true
|
local ok = true
|
||||||
local aggro, status, threatpct, rawthreatpct, threatvalue, threattotal
|
local aggro, status, threatpct, rawthreatpct, threatvalue, threattotal
|
||||||
if unit and unit ~= "none" then
|
if unit and unit ~= "none" then
|
||||||
@@ -6530,7 +6530,7 @@ Private.event_prototypes = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
hidden = true,
|
hidden = true,
|
||||||
test = "WeakAuras.UnitExistsFixed(unit, false) and specificUnitCheck"
|
test = "((WeakAuras.UnitExistsFixed(unit, false) or unit == 'none') and specificUnitCheck)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
automaticrequired = true
|
automaticrequired = true
|
||||||
|
|||||||
Reference in New Issue
Block a user