diff --git a/Interface/AddOns/SVUI/SVUI.lua b/Interface/AddOns/SVUI/SVUI.lua index 3208c96..8dd3b48 100644 --- a/Interface/AddOns/SVUI/SVUI.lua +++ b/Interface/AddOns/SVUI/SVUI.lua @@ -243,16 +243,14 @@ DEFINE REGISTRY HELPERS do local PackageQueue, ScriptQueue = {},{}; - local INFO_BY = "%s by %s"; - local INFO_VERSION = "%s%s - Version: %d"; - local INFO_NEW = "%s (Newest: %d)"; + local INFO_BY = "%s |cff0099FFby %s|r"; + local INFO_VERSION = "%s%s |cff33FF00Version: %s|r"; local INFO_NAME = "Plugins"; local INFO_HEADER = "SuperVillain UI (version %.3f): Plugins"; if GetLocale() == "ruRU" then - INFO_BY = "%s от %s"; - INFO_VERSION = "%s%s - Версия: %d"; - INFO_NEW = "%s (Последняя: %d)"; + INFO_BY = "%s |cff0099FFот %s|r"; + INFO_VERSION = "%s%s |cff33FF00Версия: %s|r"; INFO_NAME = "Плагины"; INFO_HEADER = "SuperVillain UI (устарела %.3f): Плагины"; end @@ -368,15 +366,11 @@ do if addon ~= self.__owner.___name then local author = GetAddOnMetadata(addon, "Author") local Pname = GetAddOnMetadata(addon, "Title") or addon - local color = plugin.old and "|cffFF0000" or "|cff00FF00" list = ("%s%s"):format(list, Pname) if author then - list = self.INFO_BY:format(list, author) - end - list = self.INFO_VERSION:format(list, color, plugin.___ver) - if plugin.old then - list = self.INFO_NEW:format(list, plugin.newversion) + list = self.INFO_BY:format(list, author) end + list = self.INFO_VERSION:format(list, "|cff00FF00", plugin.version) list = ("%s|r\n"):format(list) end end @@ -387,6 +381,7 @@ do if(callbackFunc and type(callbackFunc) == "function") then local addon = obj.___name local ver = obj.___ver or GetAddOnMetadata(addon, "Version") + local oldFlag = (ver < self.__owner.___ver) self.Plugins[addon] = { version = ver, callback = callbackFunc @@ -652,7 +647,5 @@ end SVUICore[1] = SVUI SVUICore[2] = SVUI.Localization -SVUICore[3] = SVUI.Global -SVUICore[4] = SVUI.Configs _G[SVUINameSpace] = SVUICore; \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua index 9442ad0..139d55f 100644 --- a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua +++ b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua @@ -33,7 +33,8 @@ local ceil = math.ceil; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs local MOD = {}; MOD.ButtonCache = {}; --[[ diff --git a/Interface/AddOns/SVUI/packages/aura/SVAura.lua b/Interface/AddOns/SVUI/packages/aura/SVAura.lua index b90686a..91f5cb7 100644 --- a/Interface/AddOns/SVUI/packages/aura/SVAura.lua +++ b/Interface/AddOns/SVUI/packages/aura/SVAura.lua @@ -42,7 +42,8 @@ local tremove, twipe = table.remove, table.wipe; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs local MOD = {}; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua index cd6dbc0..b6a8833 100644 --- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua +++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua @@ -40,7 +40,8 @@ local twipe = table.wipe; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs local MOD = {}; local TTIP = SuperVillain.SVTip; --[[ diff --git a/Interface/AddOns/SVUI/packages/chat/SVChat.lua b/Interface/AddOns/SVUI/packages/chat/SVChat.lua index 37c5421..5605359 100644 --- a/Interface/AddOns/SVUI/packages/chat/SVChat.lua +++ b/Interface/AddOns/SVUI/packages/chat/SVChat.lua @@ -34,7 +34,8 @@ local twipe = table.wipe; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs local MOD = {}; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/packages/dock/SVDock.lua b/Interface/AddOns/SVUI/packages/dock/SVDock.lua index ca5290e..bba6bf2 100644 --- a/Interface/AddOns/SVUI/packages/dock/SVDock.lua +++ b/Interface/AddOns/SVUI/packages/dock/SVDock.lua @@ -33,7 +33,8 @@ local format, gsub, strfind, strmatch, tonumber = format, gsub, strfind, strmatc GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs local MOD, DOCKLET_CACHE, TOOL_CACHE, SAFETY_CACHE = {}, {}, {}, {}; local PREV_TOOL, DEFAULT_DOCKLET; --[[ diff --git a/Interface/AddOns/SVUI/packages/gear/SVGear.lua b/Interface/AddOns/SVUI/packages/gear/SVGear.lua index cad489f..d9c989d 100644 --- a/Interface/AddOns/SVUI/packages/gear/SVGear.lua +++ b/Interface/AddOns/SVUI/packages/gear/SVGear.lua @@ -32,7 +32,8 @@ local ceil, floor, round = math.ceil, math.floor, math.round; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs local MOD = {}; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua index 96cffd0..f84093a 100644 --- a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua +++ b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua @@ -13,7 +13,8 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs local MOD = {} --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/packages/map/SVMap.lua b/Interface/AddOns/SVUI/packages/map/SVMap.lua index 7938b04..15433c2 100644 --- a/Interface/AddOns/SVUI/packages/map/SVMap.lua +++ b/Interface/AddOns/SVUI/packages/map/SVMap.lua @@ -36,7 +36,8 @@ local parsefloat = math.parsefloat; -- Uncommon GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs local MOD = {}; --[[ ########################################################## @@ -420,7 +421,7 @@ local function UpdateWorldMapConfig() SVUI_MiniMapCoords:Hide() else SVUI_MiniMapCoords:Show() - MOD.CoordTimer = SuperVillain:ExecuteLoop(UpdateMapCoords, 0.8) + MOD.CoordTimer = SuperVillain:ExecuteLoop(UpdateMapCoords, 0.2) UpdateMapCoords() end AdjustMapSize() diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.lua b/Interface/AddOns/SVUI/packages/override/SVOverride.lua index 283c9db..865e563 100644 --- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua @@ -33,7 +33,8 @@ local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs local MOD = {}; MOD.LewtRollz = {}; --[[ diff --git a/Interface/AddOns/SVUI/packages/plates/SVPlate.lua b/Interface/AddOns/SVUI/packages/plates/SVPlate.lua index 27f9d4a..d581191 100644 --- a/Interface/AddOns/SVUI/packages/plates/SVPlate.lua +++ b/Interface/AddOns/SVUI/packages/plates/SVPlate.lua @@ -49,7 +49,8 @@ local tremove, tcopy, twipe, tsort, tconcat = table.remove, table.copy, table.wi GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs local MOD = {}; --[[ ########################################################## @@ -163,6 +164,7 @@ local AurasCache = {}; local AuraClocks = {}; local ClockIsTicking = false; local TickTock = 0; +local LastKnownTarget; --[[ ########################################################## UTILITY FRAMES @@ -336,6 +338,14 @@ end LOCAL HELPERS ########################################################## ]]-- +local function ParseByGUID(guid) + for plate, _ in pairs(VisiblePlates) do + if plate and plate:IsShown() and plate.guid == guid then + return plate + end + end +end + local function CheckRaidIcon(plate) if(plate and plate.ref) then SVUI_PLATE = plate.frame @@ -351,6 +361,34 @@ local function CheckRaidIcon(plate) SVUI_PLATE.raidicon:Hide() end end + +local function UpdateComboPoints() + local guid = UnitGUID("target") + if (not guid) then return end + local numPoints = GetComboPoints(UnitHasVehicleUI('player') and 'vehicle' or 'player', 'target') + numPoints = numPoints or 0 + if(numPoints > 0) then + if(LastKnownTarget and LastKnownTarget.guid and LastKnownTarget.guid ~= guid) then + LastKnownTarget.frame.combo[1]:Hide() + LastKnownTarget.frame.combo[2]:Hide() + LastKnownTarget.frame.combo[3]:Hide() + LastKnownTarget.frame.combo[4]:Hide() + LastKnownTarget.frame.combo[5]:Hide() + LastKnownTarget = nil + end + end + local plate = ParseByGUID(guid) + if(plate) then + for i=1, MAX_COMBO_POINTS do + if(i <= numPoints) then + plate.frame.combo[i]:Show() + else + plate.frame.combo[i]:Hide() + end + end + LastKnownTarget = plate + end +end --[[ ########################################################## AURA HELPERS @@ -642,7 +680,7 @@ do end MOD:UpdateAurasByUnitID('target') if MOD.UseCombo then - MOD:UNIT_COMBO_POINTS("player") + UpdateComboPoints() end PLATE_ARGS.allowed = nil end @@ -652,7 +690,7 @@ do SVUI_PLATE.highlight:Show() MOD:UpdateAurasByUnitID('mouseover') if MOD.UseCombo then - MOD:UNIT_COMBO_POINTS("player") + UpdateComboPoints() end PLATE_ARGS.allowed = nil end @@ -1311,14 +1349,6 @@ end SCANNER ########################################################## ]]-- -local function ParseByGUID(guid) - for plate, _ in pairs(VisiblePlates) do - if plate and plate:IsShown() and plate.guid == guid then - return plate - end - end -end - do local function ParseByName(sourceName) if not sourceName then return; end @@ -1381,9 +1411,18 @@ function MOD:PLAYER_TARGET_CHANGED() end end +function MOD:UNIT_COMBO_POINTS(event, unit) + if(unit == "player" or unit == "vehicle") then + UpdateComboPoints() + end +end + function MOD:UNIT_AURA(event, unit) if(unit == "target" or unit == "focus") then self:UpdateAurasByUnitID(unit) + -- if(self.UseCombo) then + -- UpdateComboPoints() + -- end end end @@ -1423,40 +1462,6 @@ function MOD:COMBAT_LOG_EVENT_UNFILTERED(event, timestamp, combatevent, hideCast end self:RequestScanUpdate(destGUID, raidIcon, rawName, "UpdateAuras") end - -do - local LastKnownTarget; - - function MOD:UNIT_COMBO_POINTS(unit) - if(unit == "player" or unit == "vehicle") then - local guid = UnitGUID("target") - if (not guid) then return end - local numPoints = GetComboPoints(UnitHasVehicleUI('player') and 'vehicle' or 'player', 'target') - numPoints = numPoints or 0 - if(numPoints > 0) then - if(LastKnownTarget and LastKnownTarget.guid and LastKnownTarget.guid ~= guid) then - LastKnownTarget.frame.combo[1]:Hide() - LastKnownTarget.frame.combo[2]:Hide() - LastKnownTarget.frame.combo[3]:Hide() - LastKnownTarget.frame.combo[4]:Hide() - LastKnownTarget.frame.combo[5]:Hide() - LastKnownTarget = nil - end - end - local plate = ParseByGUID(guid) - if(plate) then - for i=1, MAX_COMBO_POINTS do - if(i <= numPoints) then - plate.frame.combo[i]:Show() - else - plate.frame.combo[i]:Hide() - end - end - LastKnownTarget = plate - end - end - end -end --[[ ########################################################## UPDATE AND BUILD diff --git a/Interface/AddOns/SVUI/packages/stats/SVStats.lua b/Interface/AddOns/SVUI/packages/stats/SVStats.lua index 320fd19..8bdca1e 100644 --- a/Interface/AddOns/SVUI/packages/stats/SVStats.lua +++ b/Interface/AddOns/SVUI/packages/stats/SVStats.lua @@ -33,7 +33,8 @@ local min = math.min; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs local MOD = {}; MOD.Anchors = {}; MOD.Statistics = {}; diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua index e989b35..0daa535 100644 --- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua +++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua @@ -36,7 +36,8 @@ local twipe, tconcat = table.wipe, table.concat; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs local MOD = {}; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/packages/unit/config.lua b/Interface/AddOns/SVUI/packages/unit/config.lua index 7088a03..3224079 100644 --- a/Interface/AddOns/SVUI/packages/unit/config.lua +++ b/Interface/AddOns/SVUI/packages/unit/config.lua @@ -25,7 +25,8 @@ local select = _G.select; GET ADDON DATA AND TEST FOR oUF ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); +local CONFIGS = SuperVillain.Configs --[[ ########################################################## LOCALS diff --git a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua index 8afe358..e3a88bc 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua @@ -55,7 +55,7 @@ local UpdateAltPower = function(self, unit, arg1, arg2) local color = oUF_SuperVillain.colors.power.MANA color = SuperVillain:HexColor(color[1],color[2],color[3]) local altValue = floor(arg1 / arg2 * 100) - local altStr + local altStr = "" if(value:GetText()) then if(select(4, value:GetPoint()) < 0) then altStr = ("|cff%s%d%%|r |cffD7BEA5- |r"):format(color, altValue) @@ -65,7 +65,7 @@ local UpdateAltPower = function(self, unit, arg1, arg2) else altStr = ("|cff%s%d%%|r"):format(color, altValue) end - self.Text:SetFormattedText(altStr) + self.Text:SetText(altStr) else self.Text:SetText() end diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua index 8af570a..a463291 100644 --- a/Interface/AddOns/SVUI/system/alerts.lua +++ b/Interface/AddOns/SVUI/system/alerts.lua @@ -41,7 +41,7 @@ local assert = enforce; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); --[[ ########################################################## LOCAL VARS diff --git a/Interface/AddOns/SVUI/system/database.lua b/Interface/AddOns/SVUI/system/database.lua index 4c22795..969de96 100644 --- a/Interface/AddOns/SVUI/system/database.lua +++ b/Interface/AddOns/SVUI/system/database.lua @@ -34,12 +34,13 @@ local tremove, tcopy, twipe, tsort, tconcat, tdump = table.remove, table.copy, t GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L, G, CONFIGS = unpack(select(2, ...)); +local SuperVillain, L = unpack(select(2, ...)); SuperVillain.Shared = LibStub("LibSharedMedia-3.0") local realm = GetRealmName() local name = UnitName("player") local pkey = ("%s - %s"):format(name, realm) local logoutListener = CreateFrame("Frame", nil) +local CONFIGS = SuperVillain.Configs --[[ ########################################################## DEFINE SHARED MEDIA @@ -960,7 +961,7 @@ end local function importprofile(t, key) local sv = rawget(t, "profile") local dv = rawget(t, "defaults") - local globals = G + local globals = SuperVillain.Global local src = globals.profiles[key] if(not src) then return end for k,v in pairs(sv) do @@ -982,7 +983,7 @@ end local function exportprofile(t, key) local sv = rawget(t, "profile") local dv = rawget(t, "defaults") - local globals = G + local globals = SuperVillain.Global if(not globals.profiles[key]) then globals.profiles[key] = {} end local saved = globals.profiles[key] tablecopy(saved, sv) @@ -994,7 +995,7 @@ local function exportprofile(t, key) end local function removeprofile(t, key) - local globals = G + local globals = SuperVillain.Global if(globals.profiles[key]) then globals.profiles[key] = nil end if(globals.profileKeys[key]) then globals.profileKeys[key] = nil end collectgarbage("collect") @@ -1023,7 +1024,7 @@ end local function SanitizeDatabase() if(not SuperVillain.db) then return end local db = SuperVillain.db - local src = CONFIGS + local src = SuperVillain.Configs for k,v in pairs(db) do if(k ~= "SAFEDATA" and src[k]) then removedefaults(db[k], src[k]) diff --git a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua index 123ded9..d93047b 100644 --- a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua +++ b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua @@ -48,7 +48,8 @@ GET ADDON DATA ########################################################## ]]-- local SVUIAddOnName, PLUGIN = ...; -local SuperVillain, L, G, CONFIGS = unpack(SVUI); +local SuperVillain, L = unpack(SVUI); +local CONFIGS = SuperVillain.Configs local NewHook = hooksecurefunc; local SVUIAddonEventHandler = CreateFrame("Frame", nil) local version = GetAddOnMetadata(..., "Version"); diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua index e2b35e7..f3692af 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua @@ -47,7 +47,8 @@ GET ADDON DATA ########################################################## ]]-- local SVUIAddOnName, PLUGIN = ...; -local SuperVillain, L, G, CONFIGS = unpack(SVUI); +local SuperVillain, L = unpack(SVUI); +local CONFIGS = SuperVillain.Configs local NewHook = hooksecurefunc; local SVUIAddonEventHandler = CreateFrame("Frame", nil) local version = GetAddOnMetadata(..., "Version") diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua index 6f9bda9..a89f812 100644 --- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua +++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua @@ -33,7 +33,8 @@ GET ADDON DATA ########################################################## ]]-- local SVUIAddOnName, PLUGIN = ...; -local SuperVillain, L, G, CONFIGS = unpack(SVUI); +local SuperVillain, L = unpack(SVUI); +local CONFIGS = SuperVillain.Configs local NewHook = hooksecurefunc; local SVUIAddonEventHandler = CreateFrame("Frame", nil) diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua index c743ae0..fb0159b 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua @@ -38,7 +38,8 @@ GET ADDON DATA ########################################################## ]]-- local SVUIAddOnName, PLUGIN = ...; -local SuperVillain, L, G, CONFIGS = unpack(SVUI); +local SuperVillain, L = unpack(SVUI); +local CONFIGS = SuperVillain.Configs local NewHook = hooksecurefunc; local SVUILogEventHandler = CreateFrame("Frame", nil) local version = GetAddOnMetadata(..., "Version"); diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua index ed5dd70..e2d3851 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua @@ -38,7 +38,8 @@ GET ADDON DATA ########################################################## ]]-- local SVUIAddOnName, PLUGIN = ...; -local SuperVillain, L, G, CONFIGS = unpack(SVUI); +local SuperVillain, L = unpack(SVUI); +local CONFIGS = SuperVillain.Configs local NewHook = hooksecurefunc; local SVUIAddonEventHandler = CreateFrame("Frame", nil) local version = GetAddOnMetadata(..., "Version");