From d3ab7a63a287829c7ed30a2573fcfe9cb90ddfba Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Mon, 21 Apr 2025 16:40:02 +0200 Subject: [PATCH] (fix/threat) unit "At Least One Enemy" due to missing "none" unit in our game version --- WeakAuras/GenericTrigger.lua | 3 --- WeakAuras/Prototypes.lua | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index c244a9c..7872633 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -76,9 +76,6 @@ local ConstructTest, ConstructFunction local nameplateExists = {} ----@param unit UnitToken ----@param smart? boolean ----@return boolean unitExists function WeakAuras.UnitExistsFixed(unit, smart) if #unit > 9 and unit:sub(1, 9) == "nameplate" then return nameplateExists[unit] diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 2c662b5..202d8c1 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -6379,7 +6379,7 @@ Private.event_prototypes = { trigger.unit = trigger.unit or "target"; local ret = [[ unit = string.lower(unit) - local name = UnitName(unit, false) + local name = UnitName(unit, false) or (unit == "none" and "Unknown") local ok = true local aggro, status, threatpct, rawthreatpct, threatvalue, threattotal if unit and unit ~= "none" then @@ -6530,7 +6530,7 @@ Private.event_prototypes = { }, { hidden = true, - test = "WeakAuras.UnitExistsFixed(unit, false) and specificUnitCheck" + test = "((WeakAuras.UnitExistsFixed(unit, false) or unit == 'none') and specificUnitCheck)" } }, automaticrequired = true