From fd6a0b01f416ebc90120b87723c37f5fc21f5a0b Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Tue, 18 Feb 2025 19:30:43 +0100 Subject: [PATCH] from retail --- WeakAuras/LibGroupTalentsWrapper.lua | 2 +- WeakAuras/TimeUtil.lua | 4 +-- WeakAuras/Types.lua | 7 ++--- WeakAurasOptions/Cache.lua | 6 ++--- .../AceConfigDialog-3.0.lua | 26 +++++++++---------- 5 files changed, 23 insertions(+), 22 deletions(-) diff --git a/WeakAuras/LibGroupTalentsWrapper.lua b/WeakAuras/LibGroupTalentsWrapper.lua index 322a9ec..34e6b6a 100644 --- a/WeakAuras/LibGroupTalentsWrapper.lua +++ b/WeakAuras/LibGroupTalentsWrapper.lua @@ -45,7 +45,7 @@ if LibGroupTalents then for i = 1, numMembers do local groupUnitName = UnitName(units[i]) if groupUnitName then - nameToUnitMap[groupUnitName] = groupUnit + nameToUnitMap[groupUnitName] = groupUnitName end end diff --git a/WeakAuras/TimeUtil.lua b/WeakAuras/TimeUtil.lua index 1ef0dcf..1bf9259 100644 --- a/WeakAuras/TimeUtil.lua +++ b/WeakAuras/TimeUtil.lua @@ -40,7 +40,7 @@ SecondsFormatterConstants = DontRoundUpLastUnit = false, } -SecondsFormatter.Abbreviation = +SecondsFormatter.Abbreviation = { None = 1, -- seconds, minutes, hours... Truncate = 2, -- sec, min, hr... @@ -190,7 +190,7 @@ function SecondsFormatterMixin:Format(seconds, abbreviation) if (self:CanApproximate(seconds)) then local interval = math.max(minInterval, SecondsFormatter.Interval.Minutes); while (interval < maxInterval) do - local nextInterval = interval + 1; + local nextInterval = interval + 1; if (seconds > self:GetIntervalSeconds(nextInterval)) then interval = nextInterval; else diff --git a/WeakAuras/Types.lua b/WeakAuras/Types.lua index e453624..5897423 100644 --- a/WeakAuras/Types.lua +++ b/WeakAuras/Types.lua @@ -1089,10 +1089,11 @@ local function update_forms() Private.form_types[i] = i.." - "..name end end + if Private.OptionsFrame and not tCompare(oldForms, Private.form_types) then + Private.OptionsFrame():ReloadOptions() + end end -if Private.OptionsFrame and not tCompare(oldForms, Private.form_types) then - Private.OptionsFrame():ReloadOptions() -end + local form_frame = CreateFrame("Frame"); form_frame:RegisterEvent("UPDATE_SHAPESHIFT_FORMS") form_frame:RegisterEvent("PLAYER_LOGIN") diff --git a/WeakAurasOptions/Cache.lua b/WeakAurasOptions/Cache.lua index e6d1fe8..32ddce4 100644 --- a/WeakAurasOptions/Cache.lua +++ b/WeakAurasOptions/Cache.lua @@ -68,9 +68,9 @@ function spellCache.Build() cache[name].spells = cache[name].spells .. "," .. id .. "=" .. icon end misses = 0 - if holes and holes[id] then - id = holes[id] - end + --if holes and holes[id] then + -- id = holes[id] + --end else misses = misses + 1 end diff --git a/WeakAurasOptions/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua b/WeakAurasOptions/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua index d292f7a..3bfe4f2 100644 --- a/WeakAurasOptions/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua +++ b/WeakAurasOptions/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua @@ -50,17 +50,17 @@ local function CreateDispatcher(argCount) local xpcall, eh = ... local method, ARGS local function call() return method(ARGS) end - + local function dispatch(func, ...) method = func if not method then return end ARGS = ... return xpcall(call, eh) end - + return dispatch ]] - + local ARGS = {} for i = 1, argCount do ARGS[i] = "arg"..i end code = code:gsub("ARGS", tconcat(ARGS, ", ")) @@ -75,7 +75,7 @@ end}) Dispatchers[0] = function(func) return xpcall(func, errorhandler) end - + local function safecall(func, ...) return Dispatchers[select("#", ...)](func, ...) end @@ -539,14 +539,14 @@ local function OptionOnMouseOver(widget, event) local desc = GetOptionsMemberValue("desc", opt, options, path, appName) local usage = GetOptionsMemberValue("usage", opt, options, path, appName) local descStyle = opt.descStyle - + if descStyle and descStyle ~= "tooltip" then return end - + GameTooltip:SetText(name, 1, .82, 0, 1) - + if opt.type == "multiselect" then GameTooltip:AddLine(user.text,0.5, 0.5, 0.8, 1) - end + end if type(desc) == "string" then GameTooltip:AddLine(desc, 1, 1, 1, 1) end @@ -1388,7 +1388,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName) local image, width, height = GetOptionsMemberValue("image",v, options, path, appName) - + if type(image) == "string" then if not width then width = GetOptionsMemberValue("imageWidth",v, options, path, appName) @@ -1462,7 +1462,7 @@ local function TreeOnButtonEnter(widget, event, uniquevalue, button) local option = user.option local path = user.path local appName = user.appName - + local feedpath = new() for i = 1, #path do feedpath[i] = path[i] @@ -1477,7 +1477,7 @@ local function TreeOnButtonEnter(widget, event, uniquevalue, button) local name = GetOptionsMemberValue("name", group, options, feedpath, appName) local desc = GetOptionsMemberValue("desc", group, options, feedpath, appName) - + GameTooltip:SetOwner(button, "ANCHOR_NONE") if widget.type == "TabGroup" then GameTooltip:SetPoint("BOTTOM",button,"TOP") @@ -1486,11 +1486,11 @@ local function TreeOnButtonEnter(widget, event, uniquevalue, button) end GameTooltip:SetText(name, 1, .82, 0, 1) - + if type(desc) == "string" then GameTooltip:AddLine(desc, 1, 1, 1, 1) end - + GameTooltip:Show() end