diff --git a/WeakAuras/AuraEnvironment.lua b/WeakAuras/AuraEnvironment.lua index a66f7fc..8f29325 100644 --- a/WeakAuras/AuraEnvironment.lua +++ b/WeakAuras/AuraEnvironment.lua @@ -92,7 +92,7 @@ local WA_Utf8Sub = function(input, size) -- Add any bytes that are part of the sequence while (true) do local byte = input:byte(i) - if byte >= 128 and byte < 192 then + if byte and byte >= 128 and byte < 192 then output = output .. input:sub(i, i) else break diff --git a/WeakAuras/Media/Textures/Circle_AlphaGradient_In.tga b/WeakAuras/Media/Textures/Circle_AlphaGradient_In.tga new file mode 100644 index 0000000..5619f9e Binary files /dev/null and b/WeakAuras/Media/Textures/Circle_AlphaGradient_In.tga differ diff --git a/WeakAuras/Media/Textures/Circle_AlphaGradient_Out.tga b/WeakAuras/Media/Textures/Circle_AlphaGradient_Out.tga new file mode 100644 index 0000000..75eb85e Binary files /dev/null and b/WeakAuras/Media/Textures/Circle_AlphaGradient_Out.tga differ diff --git a/WeakAuras/Media/Textures/Ring_10px.tga b/WeakAuras/Media/Textures/Ring_10px.tga new file mode 100644 index 0000000..d3e8534 Binary files /dev/null and b/WeakAuras/Media/Textures/Ring_10px.tga differ diff --git a/WeakAuras/Media/Textures/Ring_20px.tga b/WeakAuras/Media/Textures/Ring_20px.tga new file mode 100644 index 0000000..18674ec Binary files /dev/null and b/WeakAuras/Media/Textures/Ring_20px.tga differ diff --git a/WeakAuras/Media/Textures/Ring_30px.tga b/WeakAuras/Media/Textures/Ring_30px.tga new file mode 100644 index 0000000..da55366 Binary files /dev/null and b/WeakAuras/Media/Textures/Ring_30px.tga differ diff --git a/WeakAuras/Media/Textures/Ring_40px.tga b/WeakAuras/Media/Textures/Ring_40px.tga new file mode 100644 index 0000000..7473737 Binary files /dev/null and b/WeakAuras/Media/Textures/Ring_40px.tga differ diff --git a/WeakAuras/Media/Textures/Square_AlphaGradient.tga b/WeakAuras/Media/Textures/Square_AlphaGradient.tga new file mode 100644 index 0000000..e704af7 Binary files /dev/null and b/WeakAuras/Media/Textures/Square_AlphaGradient.tga differ diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 0465b5e..4b22636 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -4603,7 +4603,7 @@ WeakAuras.event_prototypes = { local aggro, status, threatpct, rawthreatpct, threatvalue, threattotal if unit then aggro, status, threatpct, rawthreatpct, threatvalue = WeakAuras.UnitDetailedThreatSituation('player', unit) - threattotal = (threatvalue or 0) * 100 / (threatpct or 1) + threattotal = (threatvalue or 0) * 100 / (threatpct ~= 0 and threatpct or 1) else status = UnitThreatSituation('player') aggro = status == 2 or status == 3 @@ -5722,7 +5722,7 @@ WeakAuras.dynamic_texts = { end end, func = function(duration, state, totalPrecision) - if state.progressType ~= "timed" then + if not state or state.progressType ~= "timed" then return duration end if type(duration) ~= "number" then @@ -5755,6 +5755,7 @@ WeakAuras.dynamic_texts = { }, ["n"] = { get = function(state) + if not state then return "" end return state.name or state.id or "", true end, func = function(v) @@ -5763,6 +5764,7 @@ WeakAuras.dynamic_texts = { }, ["i"] = { get = function(state) + if not state then return "" end return state.icon or "Interface\\Icons\\INV_Misc_QuestionMark" end, func = function(v) diff --git a/WeakAuras/Types.lua b/WeakAuras/Types.lua index 85a3e2a..c25dc7f 100644 --- a/WeakAuras/Types.lua +++ b/WeakAuras/Types.lua @@ -1327,6 +1327,14 @@ WeakAuras.texture_types = { ["Interface\\AddOns\\WeakAuras\\Media\\Textures\\target_indicator.tga"] = "Target Indicator", ["Interface\\AddOns\\WeakAuras\\Media\\Textures\\target_indicator_glow.tga"] = "Target Indicator Glow", ["Interface\\AddOns\\WeakAuras\\Media\\Textures\\arrows_target.tga"] = "Arrows Target", + + ["Interface\\AddOns\\WeakAuras\\Media\\Textures\\Circle_AlphaGradient_In.tga"] = "Circle Alpha Gradient In", + ["Interface\\AddOns\\WeakAuras\\Media\\Textures\\Circle_AlphaGradient_Out.tga"] = "Circle Alpha Gradient Out", + ["Interface\\AddOns\\WeakAuras\\Media\\Textures\\Ring_10px.tga"] = "Ring 10px", + ["Interface\\AddOns\\WeakAuras\\Media\\Textures\\Ring_20px.tga"] = "Ring 20px", + ["Interface\\AddOns\\WeakAuras\\Media\\Textures\\Ring_30px.tga"] = "Ring 30px", + ["Interface\\AddOns\\WeakAuras\\Media\\Textures\\Ring_40px.tga"] = "Ring 40px", + ["Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_AlphaGradient.tga"] = "Square Alpha Gradient", }, ["Sparks"] = { ["Interface\\CastingBar\\UI-CastingBar-Spark"] = "Blizzard Spark",