diff --git a/Interface/AddOns/SVUI/SVUI.xml b/Interface/AddOns/SVUI/SVUI.xml index 7c53f54..e328db9 100644 --- a/Interface/AddOns/SVUI/SVUI.xml +++ b/Interface/AddOns/SVUI/SVUI.xml @@ -32,12 +32,12 @@ <Include file="packages\stats\SVStats.xml"/> <Script file="packages\dock\SVDock.lua"/> <Include file="packages\aura\SVAura.xml"/> + <Script file="packages\map\SVMap.lua"/> <Include file="packages\plates\SVPlate.xml"/> <Script file="packages\tip\SVTip.lua"/> <Script file="packages\actionbar\SVBar.lua"/> <Script file="packages\actionbar\KeyBind.lua"/> <Include file="packages\unit\SVUnit.xml"/> - <Script file="packages\map\SVMap.lua"/> <Script file="packages\chat\SVChat.lua"/> <Include file="packages\bag\SVBag.xml"/> <Script file="packages\override\SVOverride.lua"/> diff --git a/Interface/AddOns/SVUI/libs/libdatabroker-1-1/Changelog-libdatabroker-1-1-v1.1.4.txt b/Interface/AddOns/SVUI/libs/libdatabroker-1-1/Changelog-libdatabroker-1-1-v1.1.4.txt deleted file mode 100644 index d5b31ed..0000000 --- a/Interface/AddOns/SVUI/libs/libdatabroker-1-1/Changelog-libdatabroker-1-1-v1.1.4.txt +++ /dev/null @@ -1,33 +0,0 @@ -tag v1.1.4 -ddb0519a000c69ddf3a28c3f9fe2e62bb3fd00c5 -Tekkub <tekkub@gmail.com> -2008-11-06 22:03:04 -0700 - -Build 1.1.4 - - --------------------- - -Tekkub: - Add pairs and ipairs iters, since we can't use the normal iters on our dataobjs - Simplify readme, all docs have been moved into GitHub wiki pages - Documentation on how to use LDB data (for display addons) - Add StatBlockCore forum link - Add link to Fortress thread - And rearrange the addon list a bit too - Make field lists into nice pretty tables - Add list of who is using LDB - Always with the typos, I hate my fingers - Add tooltiptext and OnTooltipShow to data addon spec - Readme rejiggering - Add in some documentation on how to push data into LDB - Meh, fuck you textile - Adding readme - Pass current dataobj with attr change callbacks to avoid excessive calls to :GetDataObjectByName -Tekkub Stoutwrithe: - Make passed dataobj actually work - I always forget the 'then' - Minor memory optimization - - Only hold upvalues to locals in the functions called frequently - - Retain the metatable across future lib upgrades (the one in v1 will be lost) - Allow caller to pass a pre-populated table to NewDataObject diff --git a/Interface/AddOns/SVUI/libs/libdatabroker-1-1/LibDataBroker-1.1.lua b/Interface/AddOns/SVUI/libs/libdatabroker-1-1/LibDataBroker-1.1.lua deleted file mode 100644 index f47c0cd..0000000 --- a/Interface/AddOns/SVUI/libs/libdatabroker-1-1/LibDataBroker-1.1.lua +++ /dev/null @@ -1,90 +0,0 @@ - -assert(LibStub, "LibDataBroker-1.1 requires LibStub") -assert(LibStub:GetLibrary("CallbackHandler-1.0", true), "LibDataBroker-1.1 requires CallbackHandler-1.0") - -local lib, oldminor = LibStub:NewLibrary("LibDataBroker-1.1", 4) -if not lib then return end -oldminor = oldminor or 0 - - -lib.callbacks = lib.callbacks or LibStub:GetLibrary("CallbackHandler-1.0"):New(lib) -lib.attributestorage, lib.namestorage, lib.proxystorage = lib.attributestorage or {}, lib.namestorage or {}, lib.proxystorage or {} -local attributestorage, namestorage, callbacks = lib.attributestorage, lib.namestorage, lib.callbacks - -if oldminor < 2 then - lib.domt = { - __metatable = "access denied", - __index = function(self, key) return attributestorage[self] and attributestorage[self][key] end, - } -end - -if oldminor < 3 then - lib.domt.__newindex = function(self, key, value) - if not attributestorage[self] then attributestorage[self] = {} end - if attributestorage[self][key] == value then return end - attributestorage[self][key] = value - local name = namestorage[self] - if not name then return end - callbacks:Fire("LibDataBroker_AttributeChanged", name, key, value, self) - callbacks:Fire("LibDataBroker_AttributeChanged_"..name, name, key, value, self) - callbacks:Fire("LibDataBroker_AttributeChanged_"..name.."_"..key, name, key, value, self) - callbacks:Fire("LibDataBroker_AttributeChanged__"..key, name, key, value, self) - end -end - -if oldminor < 2 then - function lib:NewDataObject(name, dataobj) - if self.proxystorage[name] then return end - - if dataobj then - assert(type(dataobj) == "table", "Invalid dataobj, must be nil or a table") - self.attributestorage[dataobj] = {} - for i,v in pairs(dataobj) do - self.attributestorage[dataobj][i] = v - dataobj[i] = nil - end - end - dataobj = setmetatable(dataobj or {}, self.domt) - self.proxystorage[name], self.namestorage[dataobj] = dataobj, name - self.callbacks:Fire("LibDataBroker_DataObjectCreated", name, dataobj) - return dataobj - end -end - -if oldminor < 1 then - function lib:DataObjectIterator() - return pairs(self.proxystorage) - end - - function lib:GetDataObjectByName(dataobjectname) - return self.proxystorage[dataobjectname] - end - - function lib:GetNameByDataObject(dataobject) - return self.namestorage[dataobject] - end -end - -if oldminor < 4 then - local next = pairs(attributestorage) - function lib:pairs(dataobject_or_name) - local t = type(dataobject_or_name) - assert(t == "string" or t == "table", "Usage: ldb:pairs('dataobjectname') or ldb:pairs(dataobject)") - - local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name - assert(attributestorage[dataobj], "Data object not found") - - return next, attributestorage[dataobj], nil - end - - local ipairs_iter = ipairs(attributestorage) - function lib:ipairs(dataobject_or_name) - local t = type(dataobject_or_name) - assert(t == "string" or t == "table", "Usage: ldb:ipairs('dataobjectname') or ldb:ipairs(dataobject)") - - local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name - assert(attributestorage[dataobj], "Data object not found") - - return ipairs_iter, attributestorage[dataobj], 0 - end -end diff --git a/Interface/AddOns/SVUI/libs/libdatabroker-1-1/README.textile b/Interface/AddOns/SVUI/libs/libdatabroker-1-1/README.textile deleted file mode 100644 index ef16fed..0000000 --- a/Interface/AddOns/SVUI/libs/libdatabroker-1-1/README.textile +++ /dev/null @@ -1,13 +0,0 @@ -LibDataBroker is a small WoW addon library designed to provide a "MVC":http://en.wikipedia.org/wiki/Model-view-controller interface for use in various addons. -LDB's primary goal is to "detach" plugins for TitanPanel and FuBar from the display addon. -Plugins can provide data into a simple table, and display addons can receive callbacks to refresh their display of this data. -LDB also provides a place for addons to register "quicklaunch" functions, removing the need for authors to embed many large libraries to create minimap buttons. -Users who do not wish to be "plagued" by these buttons simply do not install an addon to render them. - -Due to it's simple generic design, LDB can be used for any design where you wish to have an addon notified of changes to a table. - -h2. Links - -* "API documentation":http://github.com/tekkub/libdatabroker-1-1/wikis/api -* "Data specifications":http://github.com/tekkub/libdatabroker-1-1/wikis/data-specifications -* "Addons using LDB":http://github.com/tekkub/libdatabroker-1-1/wikis/addons-using-ldb diff --git a/Interface/AddOns/SVUI/libs/libdatabroker-1.1/Changelog-libdatabroker-1-1-v1.1.4.txt b/Interface/AddOns/SVUI/libs/libdatabroker-1.1/Changelog-libdatabroker-1-1-v1.1.4.txt new file mode 100644 index 0000000..d5b31ed --- /dev/null +++ b/Interface/AddOns/SVUI/libs/libdatabroker-1.1/Changelog-libdatabroker-1-1-v1.1.4.txt @@ -0,0 +1,33 @@ +tag v1.1.4 +ddb0519a000c69ddf3a28c3f9fe2e62bb3fd00c5 +Tekkub <tekkub@gmail.com> +2008-11-06 22:03:04 -0700 + +Build 1.1.4 + + +-------------------- + +Tekkub: + Add pairs and ipairs iters, since we can't use the normal iters on our dataobjs + Simplify readme, all docs have been moved into GitHub wiki pages + Documentation on how to use LDB data (for display addons) + Add StatBlockCore forum link + Add link to Fortress thread + And rearrange the addon list a bit too + Make field lists into nice pretty tables + Add list of who is using LDB + Always with the typos, I hate my fingers + Add tooltiptext and OnTooltipShow to data addon spec + Readme rejiggering + Add in some documentation on how to push data into LDB + Meh, fuck you textile + Adding readme + Pass current dataobj with attr change callbacks to avoid excessive calls to :GetDataObjectByName +Tekkub Stoutwrithe: + Make passed dataobj actually work + I always forget the 'then' + Minor memory optimization + - Only hold upvalues to locals in the functions called frequently + - Retain the metatable across future lib upgrades (the one in v1 will be lost) + Allow caller to pass a pre-populated table to NewDataObject diff --git a/Interface/AddOns/SVUI/libs/libdatabroker-1.1/LibDataBroker-1.1.lua b/Interface/AddOns/SVUI/libs/libdatabroker-1.1/LibDataBroker-1.1.lua new file mode 100644 index 0000000..f47c0cd --- /dev/null +++ b/Interface/AddOns/SVUI/libs/libdatabroker-1.1/LibDataBroker-1.1.lua @@ -0,0 +1,90 @@ + +assert(LibStub, "LibDataBroker-1.1 requires LibStub") +assert(LibStub:GetLibrary("CallbackHandler-1.0", true), "LibDataBroker-1.1 requires CallbackHandler-1.0") + +local lib, oldminor = LibStub:NewLibrary("LibDataBroker-1.1", 4) +if not lib then return end +oldminor = oldminor or 0 + + +lib.callbacks = lib.callbacks or LibStub:GetLibrary("CallbackHandler-1.0"):New(lib) +lib.attributestorage, lib.namestorage, lib.proxystorage = lib.attributestorage or {}, lib.namestorage or {}, lib.proxystorage or {} +local attributestorage, namestorage, callbacks = lib.attributestorage, lib.namestorage, lib.callbacks + +if oldminor < 2 then + lib.domt = { + __metatable = "access denied", + __index = function(self, key) return attributestorage[self] and attributestorage[self][key] end, + } +end + +if oldminor < 3 then + lib.domt.__newindex = function(self, key, value) + if not attributestorage[self] then attributestorage[self] = {} end + if attributestorage[self][key] == value then return end + attributestorage[self][key] = value + local name = namestorage[self] + if not name then return end + callbacks:Fire("LibDataBroker_AttributeChanged", name, key, value, self) + callbacks:Fire("LibDataBroker_AttributeChanged_"..name, name, key, value, self) + callbacks:Fire("LibDataBroker_AttributeChanged_"..name.."_"..key, name, key, value, self) + callbacks:Fire("LibDataBroker_AttributeChanged__"..key, name, key, value, self) + end +end + +if oldminor < 2 then + function lib:NewDataObject(name, dataobj) + if self.proxystorage[name] then return end + + if dataobj then + assert(type(dataobj) == "table", "Invalid dataobj, must be nil or a table") + self.attributestorage[dataobj] = {} + for i,v in pairs(dataobj) do + self.attributestorage[dataobj][i] = v + dataobj[i] = nil + end + end + dataobj = setmetatable(dataobj or {}, self.domt) + self.proxystorage[name], self.namestorage[dataobj] = dataobj, name + self.callbacks:Fire("LibDataBroker_DataObjectCreated", name, dataobj) + return dataobj + end +end + +if oldminor < 1 then + function lib:DataObjectIterator() + return pairs(self.proxystorage) + end + + function lib:GetDataObjectByName(dataobjectname) + return self.proxystorage[dataobjectname] + end + + function lib:GetNameByDataObject(dataobject) + return self.namestorage[dataobject] + end +end + +if oldminor < 4 then + local next = pairs(attributestorage) + function lib:pairs(dataobject_or_name) + local t = type(dataobject_or_name) + assert(t == "string" or t == "table", "Usage: ldb:pairs('dataobjectname') or ldb:pairs(dataobject)") + + local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name + assert(attributestorage[dataobj], "Data object not found") + + return next, attributestorage[dataobj], nil + end + + local ipairs_iter = ipairs(attributestorage) + function lib:ipairs(dataobject_or_name) + local t = type(dataobject_or_name) + assert(t == "string" or t == "table", "Usage: ldb:ipairs('dataobjectname') or ldb:ipairs(dataobject)") + + local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name + assert(attributestorage[dataobj], "Data object not found") + + return ipairs_iter, attributestorage[dataobj], 0 + end +end diff --git a/Interface/AddOns/SVUI/libs/libdatabroker-1.1/README.textile b/Interface/AddOns/SVUI/libs/libdatabroker-1.1/README.textile new file mode 100644 index 0000000..ef16fed --- /dev/null +++ b/Interface/AddOns/SVUI/libs/libdatabroker-1.1/README.textile @@ -0,0 +1,13 @@ +LibDataBroker is a small WoW addon library designed to provide a "MVC":http://en.wikipedia.org/wiki/Model-view-controller interface for use in various addons. +LDB's primary goal is to "detach" plugins for TitanPanel and FuBar from the display addon. +Plugins can provide data into a simple table, and display addons can receive callbacks to refresh their display of this data. +LDB also provides a place for addons to register "quicklaunch" functions, removing the need for authors to embed many large libraries to create minimap buttons. +Users who do not wish to be "plagued" by these buttons simply do not install an addon to render them. + +Due to it's simple generic design, LDB can be used for any design where you wish to have an addon notified of changes to a table. + +h2. Links + +* "API documentation":http://github.com/tekkub/libdatabroker-1-1/wikis/api +* "Data specifications":http://github.com/tekkub/libdatabroker-1-1/wikis/data-specifications +* "Addons using LDB":http://github.com/tekkub/libdatabroker-1-1/wikis/addons-using-ldb diff --git a/Interface/AddOns/SVUI/libs/libs.xml b/Interface/AddOns/SVUI/libs/libs.xml index 2939c19..0715887 100644 --- a/Interface/AddOns/SVUI/libs/libs.xml +++ b/Interface/AddOns/SVUI/libs/libs.xml @@ -4,6 +4,6 @@ <Script file="CallbackHandler-1.0\CallbackHandler-1.0.lua"/> <Script file="LibSharedMedia-3.0\LibSharedMedia-3.0.lua"/> <Script file="LibActionButton-1.0\LibActionButton-1.0.lua"/> - <Script file="libdatabroker-1.1\LibDataBroker-1.1.lua"/> + <Script file="LibDataBroker-1.1\LibDataBroker-1.1.lua"/> <Include file="oUF_Villain\oUF_Villain.xml"/> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua index 4c28c10..236ccfd 100644 --- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua +++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua @@ -790,7 +790,7 @@ do MOD:Layout(self.isBank, self.isReagent) return end - if(SV.SVGear.db.misc.setoverlay) then + if(SV.db.SVGear.misc.setoverlay) then for i = 1, numSlots do if self.Bags[id] and self.Bags[id][i] then UpdateEquipmentInfo(self.Bags[id][i], id, i) @@ -870,7 +870,7 @@ do container = MOD.BagFrame for _,id in ipairs(container.BagIDs) do numSlots = GetContainerNumSlots(id) - if(SV.SVGear.db.misc.setoverlay) then + if(SV.db.SVGear.misc.setoverlay) then for i=1,numSlots do if container.Bags[id] and container.Bags[id][i] then UpdateEquipmentInfo(container.Bags[id][i], id, i) @@ -889,7 +889,7 @@ do container = MOD.BankFrame for _,id in ipairs(container.BagIDs) do numSlots = GetContainerNumSlots(id) - if(SV.SVGear.db.misc.setoverlay) then + if(SV.db.SVGear.misc.setoverlay) then for i=1,numSlots do if container.Bags[id] and container.Bags[id][i] then UpdateEquipmentInfo(container.Bags[id][i], id, i) @@ -908,7 +908,7 @@ do container = MOD.ReagentFrame for _,id in ipairs(container.BagIDs) do numSlots = GetContainerNumSlots(id) - if(SV.SVGear.db.misc.setoverlay) then + if(SV.db.SVGear.misc.setoverlay) then for i=1,numSlots do if container.Bags[id] and container.Bags[id][i] then UpdateEquipmentInfo(container.Bags[id][i], id, i) diff --git a/Interface/AddOns/SVUI/packages/map/SVMap.lua b/Interface/AddOns/SVUI/packages/map/SVMap.lua index 6c1a82b..547b5b1 100644 --- a/Interface/AddOns/SVUI/packages/map/SVMap.lua +++ b/Interface/AddOns/SVUI/packages/map/SVMap.lua @@ -56,6 +56,18 @@ LOCAL VARS local temp = SLASH_CALENDAR1:gsub("/", ""); local calendar_string = temp:gsub("^%l", upper) local cColor = RAID_CLASS_COLORS[SV.class]; +local MMBHolder, MMBBar; + +local NewHook = hooksecurefunc +local Initialized = false +--[[ +########################################################## +DATA UPVALUES +########################################################## +]]-- +local NARR_TEXT = "Meanwhile"; +local NARR_PREFIX = "In "; +local NARR_ENABLE = true; local MM_COLOR = {"VERTICAL", 0.65, 0.65, 0.65, 0.95, 0.95, 0.95} local MM_BRDR = 0 local MM_SIZE = 240 @@ -63,19 +75,17 @@ local MM_OFFSET_TOP = (MM_SIZE * 0.07) local MM_OFFSET_BOTTOM = (MM_SIZE * 0.11) local MM_WIDTH = MM_SIZE + (MM_BRDR * 2) local MM_HEIGHT = (MM_SIZE - (MM_OFFSET_TOP + MM_OFFSET_BOTTOM) + (MM_BRDR * 2)) -local MMBHolder, MMBBar, SetMiniMapCoords; -local SVUI_MinimapFrame = CreateFrame("Frame", "SVUI_MinimapFrame", UIParent) -SVUI_MinimapFrame:SetFrameStrata("BACKGROUND") -SVUI_MinimapFrame.backdrop = SVUI_MinimapFrame:CreateTexture(nil, "BACKGROUND", nil, -2) -local SVUI_MinimapZonetext = CreateFrame("Frame", "SVUI_MinimapZonetext", SVUI_MinimapFrame) -local SVUI_MinimapNarrator = CreateFrame("Frame", "SVUI_MinimapNarrator", SVUI_MinimapFrame) -local NewHook = hooksecurefunc -local Initialized = false ---[[ -########################################################## -LOCAL FUNCTIONS -########################################################## -]]-- +--local +--[[ + /$$$$$$$ /$$ /$$ /$$$$$$$$/$$$$$$$$/$$$$$$ /$$ /$$ /$$$$$$ +| $$__ $$| $$ | $$|__ $$__/__ $$__/$$__ $$| $$$ | $$ /$$__ $$ +| $$ \ $$| $$ | $$ | $$ | $$ | $$ \ $$| $$$$| $$| $$ \__/ +| $$$$$$$ | $$ | $$ | $$ | $$ | $$ | $$| $$ $$ $$| $$$$$$ +| $$__ $$| $$ | $$ | $$ | $$ | $$ | $$| $$ $$$$ \____ $$ +| $$ \ $$| $$ | $$ | $$ | $$ | $$ | $$| $$\ $$$ /$$ \ $$ +| $$$$$$$/| $$$$$$/ | $$ | $$ | $$$$$$/| $$ \ $$| $$$$$$/ +|_______/ \______/ |__/ |__/ \______/ |__/ \__/ \______/ +--]] local MMB_OnEnter = function(self) if(not MOD.db.minimapbar.mouseover or MOD.db.minimapbar.styleType == "NOANCHOR") then return end UIFrameFadeIn(SVUI_MiniMapButtonBar, 0.2, SVUI_MiniMapButtonBar:GetAlpha(), 1) @@ -90,25 +100,6 @@ local MMB_OnLeave = function(self) if self:GetName() ~= "SVUI_MiniMapButtonBar" then self:SetBackdropBorderColor(0, 0, 0) end -end - -local MiniMap_MouseUp = function(self, btn) - local position = self:GetPoint() - if btn == "RightButton" then - local xoff = -1 - if position:match("RIGHT") then xoff = -16 end - ToggleDropDownMenu(1, nil, MiniMapTrackingDropDown, self, xoff, -3) - else - Minimap_OnClick(self) - end -end - -local MiniMap_MouseWheel = function(self, delta) - if delta > 0 then - _G.MinimapZoomIn:Click() - elseif delta < 0 then - _G.MinimapZoomOut:Click() - end end do @@ -280,8 +271,79 @@ do end end +local function CheckMovement() + if(not WorldMapFrame:IsShown()) then return end + if GetUnitSpeed("player") ~= 0 then + WorldMapFrame:SetAlpha(MOD.db.mapAlpha) + else + WorldMapFrame:SetAlpha(1) + end +end + +local function UpdateMapCoords() + local xF, yF = "|cffffffffx: |r%.1f", "|cffffffffy: |r%.1f" + local skip = IsInInstance() + local c, d = GetPlayerMapPosition("player") + if(not skip and not IsIndoors() and c ~= 0 and d ~= 0) then + c = parsefloat(100 * c, 2) + d = parsefloat(100 * d, 2) + if(MM_XY_COORD == "SIMPLE") then + xF, yF = "%.1f", "%.1f"; + end + if c ~= 0 and d ~= 0 then + SVUI_MiniMapCoords.playerXCoords:SetFormattedText(xF, c) + SVUI_MiniMapCoords.playerYCoords:SetFormattedText(yF, d) + if(SVUI_WorldMapCoords and WorldMapFrame:IsShown()) then + SVUI_WorldMapCoords.playerCoords:SetText(PLAYER..": "..c..", "..d) + end + else + SVUI_MiniMapCoords.playerXCoords:SetText("") + SVUI_MiniMapCoords.playerYCoords:SetText("") + if(SVUI_WorldMapCoords and WorldMapFrame:IsShown()) then + SVUI_WorldMapCoords.playerCoords:SetText("") + end + end + if(not WorldMapFrame:IsShown() or not SVUI_WorldMapCoords) then return end + local e = WorldMapDetailFrame:GetEffectiveScale() + local f = WorldMapDetailFrame:GetWidth() + local g = WorldMapDetailFrame:GetHeight() + local h, i = WorldMapDetailFrame:GetCenter() + local c, d = GetCursorPosition() + local j = (c / e - (h - (f / 2))) / f; + local k = (i + (g / 2)-d / e) / g; + if j >= 0 and k >= 0 and j <= 1 and k <= 1 then + j = parsefloat(100 * j, 2) + k = parsefloat(100 * k, 2) + SVUI_WorldMapCoords.mouseCoords:SetText(MOUSE_LABEL..": "..j..", "..k) + else + SVUI_WorldMapCoords.mouseCoords:SetText("") + end + else + SVUI_MiniMapCoords.playerXCoords:SetText("") + SVUI_MiniMapCoords.playerYCoords:SetText("") + if(SVUI_WorldMapCoords and WorldMapFrame:IsShown()) then + SVUI_WorldMapCoords.playerCoords:SetText("") + end + end + if(MOD.db.mapAlpha < 100) then + CheckMovement() + end +end + +--[[ + /$$ /$$ /$$$$$$ /$$$$$$$ /$$ /$$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$ +| $$ /$ | $$ /$$__ $$| $$__ $$| $$ | $$__ $$| $$$ /$$$ /$$__ $$| $$__ $$ +| $$ /$$$| $$| $$ \ $$| $$ \ $$| $$ | $$ \ $$| $$$$ /$$$$| $$ \ $$| $$ \ $$ +| $$/$$ $$ $$| $$ | $$| $$$$$$$/| $$ | $$ | $$| $$ $$/$$ $$| $$$$$$$$| $$$$$$$/ +| $$$$_ $$$$| $$ | $$| $$__ $$| $$ | $$ | $$| $$ $$$| $$| $$__ $$| $$____/ +| $$$/ \ $$$| $$ | $$| $$ \ $$| $$ | $$ | $$| $$\ $ | $$| $$ | $$| $$ +| $$/ \ $$| $$$$$$/| $$ | $$| $$$$$$$$| $$$$$$$/| $$ \/ | $$| $$ | $$| $$ +|__/ \__/ \______/ |__/ |__/|________/|_______/ |__/ |__/|__/ |__/|__/ +--]] + local function SetLargeWorldMap() - if InCombatLockdown() then return end + if InCombatLockdown() then return end + if MOD.db.tinyWorldMap == true then WorldMapFrame:SetParent(SV.UIParent) WorldMapFrame:EnableMouse(false) @@ -293,13 +355,15 @@ local function SetLargeWorldMap() if WorldMapFrame:GetAttribute('UIPanelLayout-allowOtherPanels') ~= true then SetUIPanelAttribute(WorldMapFrame, "allowOtherPanels", true) end - end + end + WorldMapFrameSizeUpButton:Hide() WorldMapFrameSizeDownButton:Show() end local function SetQuestWorldMap() - if InCombatLockdown() then return end + if InCombatLockdown() then return end + if MOD.db.tinyWorldMap == true then WorldMapFrame:SetParent(SV.UIParent) WorldMapFrame:EnableMouse(false) @@ -310,7 +374,8 @@ local function SetQuestWorldMap() if WorldMapFrame:GetAttribute('UIPanelLayout-allowOtherPanels') ~= true then SetUIPanelAttribute(WorldMapFrame, "allowOtherPanels", true) end - end + end + WorldMapFrameSizeUpButton:Hide() WorldMapFrameSizeDownButton:Show() end @@ -321,16 +386,7 @@ local function SetSmallWorldMap() WorldMapLevelDropDown:Point("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", -10, -4) WorldMapFrameSizeUpButton:Show() WorldMapFrameSizeDownButton:Hide() -end - -local function AdjustMapLevel() - if InCombatLockdown()then return end - WorldMapFrame:SetFrameLevel(2) - WorldMapDetailFrame:SetFrameLevel(4) - WorldMapFrame:SetFrameStrata('HIGH') - WorldMapArchaeologyDigSites:SetFrameLevel(6) - WorldMapArchaeologyDigSites:SetFrameStrata('DIALOG') -end +end local function AdjustMapSize() if InCombatLockdown() then return end @@ -353,70 +409,17 @@ local function AdjustMapSize() end BlackoutWorld:SetTexture(0, 0, 0, 1) end - AdjustMapLevel() -end - -local function CheckMovement() - if(not WorldMapFrame:IsShown()) then return end - if GetUnitSpeed("player") ~= 0 then - WorldMapFrame:SetAlpha(MOD.db.mapAlpha) - else - WorldMapFrame:SetAlpha(1) - end -end - -local function UpdateMapCoords() - local xF, yF = "|cffffffffx: |r%.1f", "|cffffffffy: |r%.1f" - local skip = IsInInstance() - local c, d = GetPlayerMapPosition("player") - if(not skip and not IsIndoors() and c ~= 0 and d ~= 0) then - c = parsefloat(100 * c, 2) - d = parsefloat(100 * d, 2) - if(MOD.db.playercoords == "SIMPLE") then - xF, yF = "%.1f", "%.1f"; - end - if c ~= 0 and d ~= 0 then - SVUI_MiniMapCoords.playerXCoords:SetFormattedText(xF, c) - SVUI_MiniMapCoords.playerYCoords:SetFormattedText(yF, d) - if(SVUI_WorldMapCoords and WorldMapFrame:IsShown()) then - SVUI_WorldMapCoords.playerCoords:SetText(PLAYER..": "..c..", "..d) - end - else - SVUI_MiniMapCoords.playerXCoords:SetText("") - SVUI_MiniMapCoords.playerYCoords:SetText("") - if(SVUI_WorldMapCoords and WorldMapFrame:IsShown()) then - SVUI_WorldMapCoords.playerCoords:SetText("") - end - end - if(not WorldMapFrame:IsShown() or not SVUI_WorldMapCoords) then return end - local e = WorldMapDetailFrame:GetEffectiveScale() - local f = WorldMapDetailFrame:GetWidth() - local g = WorldMapDetailFrame:GetHeight() - local h, i = WorldMapDetailFrame:GetCenter() - local c, d = GetCursorPosition() - local j = (c / e - (h - (f / 2))) / f; - local k = (i + (g / 2)-d / e) / g; - if j >= 0 and k >= 0 and j <= 1 and k <= 1 then - j = parsefloat(100 * j, 2) - k = parsefloat(100 * k, 2) - SVUI_WorldMapCoords.mouseCoords:SetText(MOUSE_LABEL..": "..j..", "..k) - else - SVUI_WorldMapCoords.mouseCoords:SetText("") - end - else - SVUI_MiniMapCoords.playerXCoords:SetText("") - SVUI_MiniMapCoords.playerYCoords:SetText("") - if(SVUI_WorldMapCoords and WorldMapFrame:IsShown()) then - SVUI_WorldMapCoords.playerCoords:SetText("") - end - end - if(MOD.db.mapAlpha < 100) then - CheckMovement() - end -end + + WorldMapFrame:SetFrameLevel(2) + WorldMapDetailFrame:SetFrameLevel(4) + WorldMapFrame:SetFrameStrata('HIGH') + WorldMapArchaeologyDigSites:SetFrameLevel(6) + WorldMapArchaeologyDigSites:SetFrameStrata('DIALOG') +end local function UpdateWorldMapConfig() - if InCombatLockdown()then return end + if InCombatLockdown()then return end + if(not MOD.WorldMapHooked) then NewHook("WorldMap_ToggleSizeUp", AdjustMapSize) NewHook("WorldMap_ToggleSizeDown", SetSmallWorldMap) @@ -427,7 +430,7 @@ local function UpdateWorldMapConfig() MOD.WorldMapHooked = true end - if(not MOD.db.playercoords or MOD.db.playercoords == "HIDE") then + if(not MM_XY_COORD or MM_XY_COORD == "HIDE") then if MOD.CoordTimer then SV.Timers:RemoveLoop(MOD.CoordTimer) MOD.CoordTimer = nil; @@ -441,225 +444,191 @@ local function UpdateWorldMapConfig() UpdateMapCoords() end AdjustMapSize() -end - -local ResetDropDownList_Hook = function(self) - DropDownList1:ClearAllPoints() - DropDownList1:Point("TOPRIGHT",self,"BOTTOMRIGHT",-17,-4) -end - -local WorldMapFrameOnShow_Hook = function() - MOD:RegisterEvent("PLAYER_REGEN_DISABLED"); - if InCombatLockdown()then return end - if(not SV.SVMap.db.tinyWorldMap and not Initialized) then - WorldMap_ToggleSizeUp() - Initialized = true - end - AdjustMapLevel() -end - -local WorldMapFrameOnHide_Hook = function() - MOD:UnregisterEvent("PLAYER_REGEN_DISABLED") end --[[ ########################################################## -CORE FUNCTIONS +HANDLERS ########################################################## ]]-- -MOD.narrative = ""; -MOD.locationPrefix = ""; -do - local function _createCoords() - local x, y = GetPlayerMapPosition("player") - x = tonumber(parsefloat(100 * x, 0)) - y = tonumber(parsefloat(100 * y, 0)) - return x, y - end - - local function Tour_OnEnter(self,...) - if InCombatLockdown() then - GameTooltip:Hide() - else - GameTooltip:SetOwner(self, "ANCHOR_BOTTOM", 0, -4) - GameTooltip:ClearAllPoints() - GameTooltip:SetPoint("BOTTOM", self, "BOTTOM", 0, 0) - GameTooltip:AddLine(" ") - GameTooltip:AddDoubleLine(L["Click : "], L["Toggle WorldMap"], 0.7, 0.7, 1, 0.7, 0.7, 1) - GameTooltip:AddDoubleLine(L["ShiftClick : "], L["Announce your position in chat"],0.7, 0.7, 1, 0.7, 0.7, 1) - GameTooltip:Show() - end - end - - local function Tour_OnLeave(self,...) - GameTooltip:Hide() - end - - local function Tour_OnClick(self, btn) - local zoneText = GetRealZoneText() or UNKNOWN; - if IsShiftKeyDown() then - local edit_box = ChatEdit_ChooseBoxForSend() - local x, y = _createCoords() - local message - local coords = x..", "..y - if zoneText ~= GetSubZoneText() then - message = format("%s: %s (%s)", zoneText, GetSubZoneText(), coords) - else - message = format("%s (%s)", zoneText, coords) - end - ChatEdit_ActivateChat(edit_box) - edit_box:Insert(message) - else - ToggleFrame(WorldMapFrame) - end - GameTooltip:Hide() - end - - local Calendar_OnClick = function(self) - GameTimeFrame:Click(); - end - - local Tracking_OnClick = function(self) - local position = self:GetPoint() +local MiniMap_MouseUp = function(self, btn) + local position = self:GetPoint() + if btn == "RightButton" then local xoff = -1 if position:match("RIGHT") then xoff = -16 end ToggleDropDownMenu(1, nil, MiniMapTrackingDropDown, self, xoff, -3) + else + Minimap_OnClick(self) end +end - local Basic_OnEnter = function(self) - GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) - GameTooltip:ClearLines() - GameTooltip:AddLine(self.TText, 1, 1, 1) - GameTooltip:Show() - end - - local Basic_OnLeave = function(self) - GameTooltip:Hide() +local MiniMap_MouseWheel = function(self, delta) + if delta > 0 then + _G.MinimapZoomIn:Click() + elseif delta < 0 then + _G.MinimapZoomOut:Click() end +end - function SetMiniMapCoords() - if(not SVUI_MiniMapCoords) then - local CoordsHolder = CreateFrame("Frame", "SVUI_MiniMapCoords", Minimap) - CoordsHolder:SetFrameLevel(Minimap:GetFrameLevel() + 1) - CoordsHolder:SetFrameStrata(Minimap:GetFrameStrata()) - CoordsHolder:SetPoint("TOPLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 0, -4) - CoordsHolder:SetPoint("TOPRIGHT", SVUI_MinimapFrame, "BOTTOMRIGHT", 0, -4) - CoordsHolder:SetHeight(22) - CoordsHolder:EnableMouse(true) - CoordsHolder:SetScript("OnEnter",Tour_OnEnter) - CoordsHolder:SetScript("OnLeave",Tour_OnLeave) - CoordsHolder:SetScript("OnMouseDown",Tour_OnClick) - - CoordsHolder.playerXCoords = CoordsHolder:CreateFontString(nil, "OVERLAY") - CoordsHolder.playerXCoords:SetPoint("BOTTOMLEFT", CoordsHolder, "BOTTOMLEFT", 0, 0) - CoordsHolder.playerXCoords:SetWidth(70) - CoordsHolder.playerXCoords:SetHeight(22) - CoordsHolder.playerXCoords:SetFontTemplate(SV.Media.font.numbers, 12, "OUTLINE") - CoordsHolder.playerXCoords:SetTextColor(cColor.r, cColor.g, cColor.b) - - CoordsHolder.playerYCoords = CoordsHolder:CreateFontString(nil, "OVERLAY") - CoordsHolder.playerYCoords:SetPoint("BOTTOMLEFT", CoordsHolder.playerXCoords, "BOTTOMRIGHT", 4, 0) - CoordsHolder.playerXCoords:SetWidth(70) - CoordsHolder.playerYCoords:SetHeight(22) - CoordsHolder.playerYCoords:SetFontTemplate(SV.Media.font.numbers, 12, "OUTLINE") - CoordsHolder.playerYCoords:SetTextColor(cColor.r, cColor.g, cColor.b) - - local calendarButton = CreateFrame("Button", "SVUI_CalendarButton", CoordsHolder) - calendarButton:SetSize(22,22) - calendarButton:SetPoint("RIGHT", CoordsHolder, "RIGHT", 0, 0) - calendarButton:RemoveTextures() - calendarButton:SetNormalTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-CALENDAR") - calendarButton:SetPushedTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-CALENDAR") - calendarButton:SetHighlightTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-CALENDAR") - calendarButton.TText = "Calendar" - calendarButton:RegisterForClicks("AnyUp") - calendarButton:SetScript("OnEnter", Basic_OnEnter) - calendarButton:SetScript("OnLeave", Basic_OnLeave) - calendarButton:SetScript("OnClick", Calendar_OnClick) - - local trackingButton = CreateFrame("Button", "SVUI_TrackingButton", CoordsHolder) - trackingButton:SetSize(22,22) - trackingButton:SetPoint("RIGHT", calendarButton, "LEFT", -4, 0) - trackingButton:RemoveTextures() - trackingButton:SetNormalTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-TRACKING") - trackingButton:SetPushedTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-TRACKING") - trackingButton:SetHighlightTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-TRACKING") - trackingButton.TText = "Tracking" - trackingButton:RegisterForClicks("AnyUp") - trackingButton:SetScript("OnEnter", Basic_OnEnter) - trackingButton:SetScript("OnLeave", Basic_OnLeave) - trackingButton:SetScript("OnClick", Tracking_OnClick) - end - end +local Calendar_OnClick = function(self) + GameTimeFrame:Click(); +end + +local Tracking_OnClick = function(self) + local position = self:GetPoint() + local xoff = -1 + if position:match("RIGHT") then xoff = -16 end + ToggleDropDownMenu(1, nil, MiniMapTrackingDropDown, self, xoff, -3) end -local function UpdateMinimapNarration() - SVUI_MinimapNarrator.Text:SetText(MOD.narrative) +local Basic_OnEnter = function(self) + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) + GameTooltip:ClearLines() + GameTooltip:AddLine(self.TText, 1, 1, 1) + GameTooltip:Show() end -local function UpdateMinimapLocation() - SVUI_MinimapZonetext.Text:SetText(MOD.locationPrefix .. strsub(GetMinimapZoneText(), 1, 25)) +local Basic_OnLeave = function(self) + GameTooltip:Hide() +end + +local Tour_OnEnter = function(self, ...) + if InCombatLockdown() then + GameTooltip:Hide() + else + GameTooltip:SetOwner(self, "ANCHOR_BOTTOM", 0, -4) + GameTooltip:ClearAllPoints() + GameTooltip:SetPoint("BOTTOM", self, "BOTTOM", 0, 0) + GameTooltip:AddLine(" ") + GameTooltip:AddDoubleLine(L["Click : "], L["Toggle WorldMap"], 0.7, 0.7, 1, 0.7, 0.7, 1) + GameTooltip:AddDoubleLine(L["ShiftClick : "], L["Announce your position in chat"],0.7, 0.7, 1, 0.7, 0.7, 1) + GameTooltip:Show() + end end -local function UpdateMinimapTexts() - MOD.narrative = ""; - MOD.locationPrefix = ""; - if(not MOD.db.locationText or MOD.db.locationText == "HIDE") then - SVUI_MinimapNarrator:Hide(); - SVUI_MinimapZonetext:Hide(); - elseif(MOD.db.locationText == "SIMPLE") then - SVUI_MinimapNarrator:Hide(); - SVUI_MinimapZonetext:Show(); - UpdateMinimapLocation() - UpdateMinimapNarration() +local Tour_OnLeave = function(self, ...) + GameTooltip:Hide() +end + +local Tour_OnClick = function(self, btn) + if IsShiftKeyDown() then + local zoneText = GetRealZoneText() or UNKNOWN; + local subZone = GetSubZoneText() or UNKNOWN; + local edit_box = ChatEdit_ChooseBoxForSend(); + local x, y = GetPlayerMapPosition("player"); + x = tonumber(parsefloat(100 * x, 0)); + y = tonumber(parsefloat(100 * y, 0)); + local coords = ("%d, %d"):format(x, y); + + ChatEdit_ActivateChat(edit_box) + + if(zoneText ~= subZone) then + local message = ("%s: %s (%s)"):format(zoneText, subZone, coords) + edit_box:Insert(message) + else + local message = ("%s (%s)"):format(zoneText, coords) + edit_box:Insert(message) + end else - SVUI_MinimapNarrator:Show(); - SVUI_MinimapZonetext:Show(); - MOD.narrative = L['Meanwhile...']; - MOD.locationPrefix = L["..at "]; - UpdateMinimapLocation() - UpdateMinimapNarration() + ToggleFrame(WorldMapFrame) end + GameTooltip:Hide() +end +--[[ +########################################################## +HOOKS +########################################################## +]]-- +local _hook_WorldMapZoneDropDownButton_OnClick = function(self) + DropDownList1:ClearAllPoints() + DropDownList1:Point("TOPRIGHT",self,"BOTTOMRIGHT",-17,-4) end -local function UpdateSizing() - MM_COLOR = SV.Media.gradient[MOD.db.bordercolor] - MM_BRDR = MOD.db.bordersize or 0 - MM_SIZE = MOD.db.size or 240 - MM_OFFSET_TOP = (MM_SIZE * 0.07) - MM_OFFSET_BOTTOM = (MM_SIZE * 0.11) - MM_WIDTH = MM_SIZE + (MM_BRDR * 2) - MM_HEIGHT = MOD.db.customshape and (MM_SIZE - (MM_OFFSET_TOP + MM_OFFSET_BOTTOM) + (MM_BRDR * 2)) or MM_WIDTH +local _hook_WorldMapFrame_OnShow = function() + MOD:RegisterEvent("PLAYER_REGEN_DISABLED"); + + if InCombatLockdown()then return end + + if(not SV.db.SVMap.tinyWorldMap and not Initialized) then + WorldMap_ToggleSizeUp() + Initialized = true + end + + WorldMapFrame:SetFrameLevel(2) + WorldMapDetailFrame:SetFrameLevel(4) + WorldMapFrame:SetFrameStrata('HIGH') + WorldMapArchaeologyDigSites:SetFrameLevel(6) + WorldMapArchaeologyDigSites:SetFrameStrata('DIALOG') end +local _hook_WorldMapFrame_OnHide = function() + MOD:UnregisterEvent("PLAYER_REGEN_DISABLED") +end + +local _hook_DropDownList1 = function(self) + local parentScale = UIParent:GetScale() + if(self:GetScale() ~= parentScale) then + self:SetScale(parentScale) + end +end +--[[ +########################################################## +CORE FUNCTIONS +########################################################## +]]-- function MOD:RefreshMiniMap() if(not self.db.enable) then return; end if(InCombatLockdown()) then self.CombatLocked = true return end - UpdateSizing() - if(SVUI_MinimapFrame and SVUI_MinimapFrame:IsShown()) then + + self:UpdateLocals() + + NARR_TEXT = ""; + NARR_PREFIX = ""; + + if(self.Holder and self.Holder:IsShown()) then --local minimapRotationEnabled = GetCVar("rotateMinimap") ~= "0" - SVUI_MinimapFrame:Size(MM_WIDTH, MM_HEIGHT) - SVUI_MinimapFrame.backdrop:SetGradient(unpack(MM_COLOR)) + self.Holder:Size(MM_WIDTH, MM_HEIGHT) + self.Holder.backdrop:SetGradient(unpack(MM_COLOR)) Minimap:Size(MM_SIZE,MM_SIZE) if MOD.db.customshape then - Minimap:SetPoint("BOTTOMLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", MM_BRDR, -(MM_OFFSET_BOTTOM - MM_BRDR)) - Minimap:SetPoint("TOPRIGHT", SVUI_MinimapFrame, "TOPRIGHT", -MM_BRDR, (MM_OFFSET_TOP - MM_BRDR)) + Minimap:SetPoint("BOTTOMLEFT", self.Holder, "BOTTOMLEFT", MM_BRDR, -(MM_OFFSET_BOTTOM - MM_BRDR)) + Minimap:SetPoint("TOPRIGHT", self.Holder, "TOPRIGHT", -MM_BRDR, (MM_OFFSET_TOP - MM_BRDR)) Minimap:SetMaskTexture('Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP_MASK_RECTANGLE') else Minimap:SetHitRectInsets(0, 0, 0, 0) - Minimap:FillInner(SVUI_MinimapFrame, MM_BRDR, MM_BRDR) + Minimap:FillInner(self.Holder, MM_BRDR, MM_BRDR) Minimap:SetMaskTexture('Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP_MASK_SQUARE') end - Minimap:SetParent(SVUI_MinimapFrame) + Minimap:SetParent(self.Holder) Minimap:SetZoom(1) Minimap:SetZoom(0) end - SVUI_MinimapZonetext:SetSize(MM_WIDTH,28) - SVUI_MinimapZonetext.Text:SetSize(MM_WIDTH,32) - UpdateMinimapTexts() + self.Zone:SetSize(MM_WIDTH,28) + self.Zone.Text:SetSize(MM_WIDTH,32) + + if(not NARR_ENABLE or NARR_ENABLE == "HIDE") then + self.Narrator:Hide(); + self.Zone:Hide(); + else + if(NARR_ENABLE == "SIMPLE") then + self.Narrator:Hide(); + self.Zone:Show(); + self.Narrator.Text:SetText(NARR_TEXT) + else + self.Narrator:Show(); + self.Zone:Show(); + NARR_TEXT = L['Meanwhile...']; + NARR_PREFIX = L["..at "]; + self.Narrator.Text:SetText(NARR_TEXT) + end + local zone = GetMinimapZoneText(); + zone = zone:sub(1, 25); + local zoneText = ("%s%s"):format(NARR_PREFIX, zone); + self.Zone.Text:SetText(zoneText) + end if SVUI_AurasAnchor then SVUI_AurasAnchor:Height(MM_HEIGHT) @@ -678,12 +647,90 @@ function MOD:RefreshMiniMap() TimeManagerClockButton:Die() end - SetMiniMapCoords() UpdateWorldMapConfig() end +--[[ +########################################################## +EVENTS +########################################################## +]]-- +function MOD:ZONE_CHANGED() + local zone = GetRealZoneText() or UNKNOWN + zone = zone:sub(1, 25) + local zoneText = ("%s%s"):format(NARR_PREFIX, zone) + self.Zone.Text:SetText(zoneText) +end + +function MOD:ZONE_CHANGED_NEW_AREA() + local zone = GetRealZoneText() or UNKNOWN + zone = zone:sub(1, 25) + local zoneText = ("%s%s"):format(NARR_PREFIX, zone) + self.Zone.Text:SetText(zoneText) +end + +function MOD:ADDON_LOADED(event, addon) + if TimeManagerClockButton then + TimeManagerClockButton:Die() + end + self:UnregisterEvent("ADDON_LOADED") + if addon == "Blizzard_FeedbackUI" then + FeedbackUIButton:Die() + end + self:UpdateMinimapButtonSettings() +end + +function MOD:PLAYER_REGEN_ENABLED() + if(WorldMapFrame:IsShown()) then + WorldMapFrameSizeDownButton:Enable() + WorldMapFrameSizeUpButton:Enable() + end + if(self.CombatLocked) then + self:RefreshMiniMap() + self.CombatLocked = nil + end +end + +function MOD:PLAYER_REGEN_DISABLED() + WorldMapFrameSizeDownButton:Disable() + WorldMapFrameSizeUpButton:Disable() +end + +function MOD:PET_BATTLE_CLOSE() + self:UpdateMinimapButtonSettings() +end +--[[ +########################################################## +BUILD FUNCTION / UPDATE +########################################################## +]]-- +function MOD:UpdateLocals() + local db = self.db + if not db then return end + + MM_XY_COORD = db.playercoords; + WM_TINY = db.tinyWorldMap; + NARR_ENABLE = db.locationText; + MM_COLOR = SV.Media.gradient[db.bordercolor] + MM_BRDR = db.bordersize or 0 + MM_SIZE = db.size or 240 + MM_OFFSET_TOP = (MM_SIZE * 0.07) + MM_OFFSET_BOTTOM = (MM_SIZE * 0.11) + MM_WIDTH = MM_SIZE + (MM_BRDR * 2) + MM_HEIGHT = db.customshape and (MM_SIZE - (MM_OFFSET_TOP + MM_OFFSET_BOTTOM) + (MM_BRDR * 2)) or MM_WIDTH +end -local function CreateMiniMapElements() - UpdateSizing() +function MOD:ReLoad() + if(not self.db.enable) then return; end + self:RefreshMiniMap() +end + +function MOD:Load() + if(not self.db.enable) then + Minimap:SetMaskTexture('Textures\\MinimapMask') + return + end + + self:UpdateLocals() Minimap:SetPlayerTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP_ARROW") Minimap:SetCorpsePOIArrowTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP_CORPSE_ARROW") @@ -691,16 +738,19 @@ local function CreateMiniMapElements() Minimap:SetBlipTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP_ICONS") Minimap:SetClampedToScreen(false) - SVUI_MinimapFrame:Point("TOPRIGHT", SV.UIParent, "TOPRIGHT", -10, -10) - SVUI_MinimapFrame:Size(MM_WIDTH, MM_HEIGHT) - SVUI_MinimapFrame.backdrop:ClearAllPoints() - SVUI_MinimapFrame.backdrop:WrapOuter(SVUI_MinimapFrame, 2) - SVUI_MinimapFrame.backdrop:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - SVUI_MinimapFrame.backdrop:SetGradient(unpack(MM_COLOR)) - SVUI_MinimapFrame:SetPanelTemplate("Blackout") - - local border = CreateFrame("Frame", nil, SVUI_MinimapFrame) - border:WrapOuter(SVUI_MinimapFrame.backdrop) + local mapHolder = CreateFrame("Frame", "SVUI_MinimapFrame", UIParent) + mapHolder:SetFrameStrata("BACKGROUND") + mapHolder.backdrop = mapHolder:CreateTexture(nil, "BACKGROUND", nil, -2) + mapHolder:Point("TOPRIGHT", SV.UIParent, "TOPRIGHT", -10, -10) + mapHolder:Size(MM_WIDTH, MM_HEIGHT) + mapHolder.backdrop:ClearAllPoints() + mapHolder.backdrop:WrapOuter(mapHolder, 2) + mapHolder.backdrop:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + mapHolder.backdrop:SetGradient(unpack(MM_COLOR)) + mapHolder:SetPanelTemplate("Blackout") + + local border = CreateFrame("Frame", nil, mapHolder) + border:WrapOuter(mapHolder.backdrop) border.left = border:CreateTexture(nil, "BACKGROUND", nil, -1) border.left:SetTexture(0, 0, 0) border.left:SetPoint("TOPLEFT") @@ -722,14 +772,15 @@ local function CreateMiniMapElements() border.bottom:SetPoint("BOTTOMRIGHT") border.bottom:SetHeight(1) - -- MOD:RefreshMiniMap() + mapHolder.border = border + if TimeManagerClockButton then TimeManagerClockButton:Die() end Minimap:SetQuestBlobRingAlpha(0) Minimap:SetArchBlobRingAlpha(0) - Minimap:SetParent(SVUI_MinimapFrame) + Minimap:SetParent(mapHolder) Minimap:SetFrameStrata("LOW") Minimap:SetFrameLevel(Minimap:GetFrameLevel() + 2) ShowUIPanel(SpellBookFrame) @@ -744,21 +795,21 @@ local function CreateMiniMapElements() MinimapZoneTextButton:Hide() MiniMapTracking:Hide() MiniMapMailFrame:ClearAllPoints() - MiniMapMailFrame:Point("TOPRIGHT", SVUI_MinimapFrame, 3, 4) + MiniMapMailFrame:Point("TOPRIGHT", mapHolder, 3, 4) MiniMapMailBorder:Hide() MiniMapMailIcon:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-MAIL") MiniMapWorldMapButton:Hide() MiniMapInstanceDifficulty:ClearAllPoints() MiniMapInstanceDifficulty:SetParent(Minimap) - MiniMapInstanceDifficulty:Point("BOTTOMLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 0, 0) + MiniMapInstanceDifficulty:Point("BOTTOMLEFT", mapHolder, "BOTTOMLEFT", 0, 0) GuildInstanceDifficulty:ClearAllPoints() GuildInstanceDifficulty:SetParent(Minimap) - GuildInstanceDifficulty:Point("BOTTOMLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 0, 0) + GuildInstanceDifficulty:Point("BOTTOMLEFT", mapHolder, "BOTTOMLEFT", 0, 0) MiniMapChallengeMode:ClearAllPoints() MiniMapChallengeMode:SetParent(Minimap) - MiniMapChallengeMode:Point("BOTTOMLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 8, -8) + MiniMapChallengeMode:Point("BOTTOMLEFT", mapHolder, "BOTTOMLEFT", 8, -8) QueueStatusMinimapButton:ClearAllPoints() - QueueStatusMinimapButton:Point("BOTTOMLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 6, 5) + QueueStatusMinimapButton:Point("BOTTOMLEFT", mapHolder, "BOTTOMLEFT", 6, 5) QueueStatusMinimapButton:SetPanelTemplate("Button", false, 1, -2, -2) QueueStatusFrame:SetClampedToScreen(true) QueueStatusMinimapButtonBorder:Hide() @@ -768,9 +819,9 @@ local function CreateMiniMapElements() MiniMapChallengeMode:Point("BOTTOMLEFT", QueueStatusMinimapButton, "BOTTOMLEFT", 0, 0) end) QueueStatusMinimapButton:SetScript("OnHide", function() - MiniMapInstanceDifficulty:Point("BOTTOMLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 0, 0) - GuildInstanceDifficulty:Point("BOTTOMLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 0, 0) - MiniMapChallengeMode:Point("BOTTOMLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 8, -8) + MiniMapInstanceDifficulty:Point("BOTTOMLEFT", mapHolder, "BOTTOMLEFT", 0, 0) + GuildInstanceDifficulty:Point("BOTTOMLEFT", mapHolder, "BOTTOMLEFT", 0, 0) + MiniMapChallengeMode:Point("BOTTOMLEFT", mapHolder, "BOTTOMLEFT", 8, -8) end) if FeedbackUIButton then FeedbackUIButton:Die() @@ -778,35 +829,39 @@ local function CreateMiniMapElements() local mwfont = SV.Media.font.dialog - SVUI_MinimapNarrator:Point("TOPLEFT", SVUI_MinimapFrame, "TOPLEFT", 2, -2) - SVUI_MinimapNarrator:SetSize(100, 22) - SVUI_MinimapNarrator:SetFixedPanelTemplate("Component", true) - SVUI_MinimapNarrator:SetPanelColor("yellow") - SVUI_MinimapNarrator:SetBackdropColor(1, 1, 0, 1) - SVUI_MinimapNarrator:SetFrameLevel(Minimap:GetFrameLevel() + 2) - SVUI_MinimapNarrator:SetParent(Minimap) - - SVUI_MinimapNarrator.Text = SVUI_MinimapNarrator:CreateFontString(nil, "ARTWORK", nil, 7) - SVUI_MinimapNarrator.Text:SetFontTemplate(mwfont, 12, "OUTLINE", "CENTER", "MIDDLE") - SVUI_MinimapNarrator.Text:SetAllPoints(SVUI_MinimapNarrator) - SVUI_MinimapNarrator.Text:SetTextColor(1, 1, 1) - SVUI_MinimapNarrator.Text:SetShadowColor(0, 0, 0, 0.3) - SVUI_MinimapNarrator.Text:SetShadowOffset(2, -2) - - SVUI_MinimapZonetext:Point("BOTTOMRIGHT", SVUI_MinimapFrame, "BOTTOMRIGHT", 2, -3) - SVUI_MinimapZonetext:SetSize(MM_WIDTH, 28) - SVUI_MinimapZonetext:SetFrameLevel(Minimap:GetFrameLevel() + 1) - SVUI_MinimapZonetext:SetParent(Minimap) - - SVUI_MinimapZonetext.Text = SVUI_MinimapZonetext:CreateFontString(nil, "ARTWORK", nil, 7) - SVUI_MinimapZonetext.Text:SetFontTemplate(mwfont, 12, "OUTLINE", "RIGHT", "MIDDLE") - SVUI_MinimapZonetext.Text:Point("RIGHT", SVUI_MinimapZonetext) - SVUI_MinimapZonetext.Text:SetSize(MM_WIDTH, 32) - SVUI_MinimapZonetext.Text:SetTextColor(1, 1, 0) - SVUI_MinimapZonetext.Text:SetShadowColor(0, 0, 0, 0.3) - SVUI_MinimapZonetext.Text:SetShadowOffset(-2, 2) - - UpdateMinimapTexts() + local narr = CreateFrame("Frame", nil, mapHolder) + narr:Point("TOPLEFT", mapHolder, "TOPLEFT", 2, -2) + narr:SetSize(100, 22) + narr:SetFixedPanelTemplate("Component", true) + narr:SetPanelColor("yellow") + narr:SetBackdropColor(1, 1, 0, 1) + narr:SetFrameLevel(Minimap:GetFrameLevel() + 2) + narr:SetParent(Minimap) + + narr.Text = narr:CreateFontString(nil, "ARTWORK", nil, 7) + narr.Text:SetFontTemplate(mwfont, 12, "OUTLINE", "CENTER", "MIDDLE") + narr.Text:SetAllPoints(narr) + narr.Text:SetTextColor(1, 1, 1) + narr.Text:SetShadowColor(0, 0, 0, 0.3) + narr.Text:SetShadowOffset(2, -2) + + self.Narrator = narr + + local zt = CreateFrame("Frame", nil, mapHolder) + zt:Point("BOTTOMRIGHT", mapHolder, "BOTTOMRIGHT", 2, -3) + zt:SetSize(MM_WIDTH, 28) + zt:SetFrameLevel(Minimap:GetFrameLevel() + 1) + zt:SetParent(Minimap) + + zt.Text = zt:CreateFontString(nil, "ARTWORK", nil, 7) + zt.Text:SetFontTemplate(mwfont, 12, "OUTLINE", "RIGHT", "MIDDLE") + zt.Text:Point("RIGHT", zt) + zt.Text:SetSize(MM_WIDTH, 32) + zt.Text:SetTextColor(1, 1, 0) + zt.Text:SetShadowColor(0, 0, 0, 0.3) + zt.Text:SetShadowOffset(-2, 2) + + self.Zone = zt Minimap:EnableMouseWheel(true) Minimap:SetScript("OnMouseWheel", MiniMap_MouseWheel) @@ -817,12 +872,8 @@ local function CreateMiniMapElements() PetJournalParent:SetAttribute("UIPanelLayout-"..name, value); end PetJournalParent:SetAttribute("UIPanelLayout-defined", true); - SV:SetSVMovable(SVUI_MinimapFrame, L["Minimap"]) - - MOD:RefreshMiniMap() -end + SV:SetSVMovable(mapHolder, L["Minimap"]) -local function LoadWorldMap() setfenv(WorldMapFrame_OnShow, setmetatable({ UpdateMicroButtons = SV.fubar }, { __index = _G })) if(SV.GameVersion < 60000) then @@ -830,7 +881,7 @@ local function LoadWorldMap() WorldMapZoomOutButton:Point("LEFT",WorldMapZoneDropDown,"RIGHT",0,4) WorldMapLevelUpButton:Point("TOPLEFT",WorldMapLevelDropDown,"TOPRIGHT",-2,8) WorldMapLevelDownButton:Point("BOTTOMLEFT",WorldMapLevelDropDown,"BOTTOMRIGHT",-2,2) - WorldMapZoneDropDownButton:HookScript('OnClick', ResetDropDownList_Hook) + WorldMapZoneDropDownButton:HookScript('OnClick', _hook_WorldMapZoneDropDownButton_OnClick) end WorldMapFrame:SetParent(SV.UIParent) @@ -838,8 +889,8 @@ local function LoadWorldMap() WorldMapFrame:SetFrameStrata('HIGH') WorldMapDetailFrame:SetFrameLevel(6) - WorldMapFrame:HookScript('OnShow', WorldMapFrameOnShow_Hook) - WorldMapFrame:HookScript('OnHide', WorldMapFrameOnHide_Hook) + WorldMapFrame:HookScript('OnShow', _hook_WorldMapFrame_OnShow) + WorldMapFrame:HookScript('OnHide', _hook_WorldMapFrame_OnHide) local CoordsHolder = CreateFrame('Frame', 'SVUI_WorldMapCoords', WorldMapFrame) CoordsHolder:SetFrameLevel(WorldMapDetailFrame:GetFrameLevel()+1) @@ -855,79 +906,66 @@ local function LoadWorldMap() CoordsHolder.mouseCoords:SetPoint("BOTTOMLEFT",CoordsHolder.playerCoords,"TOPLEFT",0,5) CoordsHolder.mouseCoords:SetText(MOUSE_LABEL..": 0, 0") - DropDownList1:HookScript('OnShow',function(self) - if(DropDownList1:GetScale() ~= UIParent:GetScale() and SV.SVMap.db.tinyWorldMap) then - DropDownList1:SetScale(UIParent:GetScale()) - end - end) + DropDownList1:HookScript('OnShow', _hook_DropDownList1) WorldFrame:SetAllPoints() -end ---[[ -########################################################## -HOOKED / REGISTERED FUNCTIONS -########################################################## -]]-- -function MOD:ADDON_LOADED(event, addon) - if TimeManagerClockButton then - TimeManagerClockButton:Die() - end - self:UnregisterEvent("ADDON_LOADED") - if addon == "Blizzard_FeedbackUI" then - FeedbackUIButton:Die() - end - self:UpdateMinimapButtonSettings() -end - -function MOD:PLAYER_REGEN_ENABLED() - if(WorldMapFrame:IsShown()) then - WorldMapFrameSizeDownButton:Enable() - WorldMapFrameSizeUpButton:Enable() - end - if(self.CombatLocked) then - self:RefreshMiniMap() - self.CombatLocked = nil - end -end -function MOD:PLAYER_REGEN_DISABLED() - WorldMapFrameSizeDownButton:Disable() - WorldMapFrameSizeUpButton:Disable() -end - -function MOD:PET_BATTLE_CLOSE() - self:UpdateMinimapButtonSettings() -end ---[[ -########################################################## -BUILD FUNCTION / UPDATE -########################################################## -]]-- -function MOD:ReLoad() - if(not self.db.enable) then return; end - self:RefreshMiniMap() -end - -function MOD:Load() - if(not self.db.enable) then - Minimap:SetMaskTexture('Textures\\MinimapMask') - return - end - - CreateMiniMapElements() - - self:RegisterEvent("PLAYER_ENTERING_WORLD", UpdateMinimapLocation) - self:RegisterEvent('PLAYER_REGEN_ENABLED') - self:RegisterEvent('PLAYER_REGEN_DISABLED') - self:RegisterEvent("ZONE_CHANGED_NEW_AREA", UpdateMinimapLocation) - self:RegisterEvent("ZONE_CHANGED", UpdateMinimapLocation) - self:RegisterEvent("ZONE_CHANGED_INDOORS", UpdateMinimapLocation) - self:RegisterEvent('ADDON_LOADED') - --self:RegisterEvent("PET_BATTLE_CLOSE") + SV:AddToDisplayAudit(mapHolder) + + local CoordsHolder = CreateFrame("Frame", "SVUI_MiniMapCoords", Minimap) + CoordsHolder:SetFrameLevel(Minimap:GetFrameLevel() + 1) + CoordsHolder:SetFrameStrata(Minimap:GetFrameStrata()) + CoordsHolder:SetPoint("TOPLEFT", mapHolder, "BOTTOMLEFT", 0, -4) + CoordsHolder:SetPoint("TOPRIGHT", mapHolder, "BOTTOMRIGHT", 0, -4) + CoordsHolder:SetHeight(22) + CoordsHolder:EnableMouse(true) + CoordsHolder:SetScript("OnEnter",Tour_OnEnter) + CoordsHolder:SetScript("OnLeave",Tour_OnLeave) + CoordsHolder:SetScript("OnMouseDown",Tour_OnClick) + + CoordsHolder.playerXCoords = CoordsHolder:CreateFontString(nil, "OVERLAY") + CoordsHolder.playerXCoords:SetPoint("BOTTOMLEFT", CoordsHolder, "BOTTOMLEFT", 0, 0) + CoordsHolder.playerXCoords:SetWidth(70) + CoordsHolder.playerXCoords:SetHeight(22) + CoordsHolder.playerXCoords:SetFontTemplate(SV.Media.font.numbers, 12, "OUTLINE") + CoordsHolder.playerXCoords:SetTextColor(cColor.r, cColor.g, cColor.b) + + CoordsHolder.playerYCoords = CoordsHolder:CreateFontString(nil, "OVERLAY") + CoordsHolder.playerYCoords:SetPoint("BOTTOMLEFT", CoordsHolder.playerXCoords, "BOTTOMRIGHT", 4, 0) + CoordsHolder.playerXCoords:SetWidth(70) + CoordsHolder.playerYCoords:SetHeight(22) + CoordsHolder.playerYCoords:SetFontTemplate(SV.Media.font.numbers, 12, "OUTLINE") + CoordsHolder.playerYCoords:SetTextColor(cColor.r, cColor.g, cColor.b) + + local calendarButton = CreateFrame("Button", "SVUI_CalendarButton", CoordsHolder) + calendarButton:SetSize(22,22) + calendarButton:SetPoint("RIGHT", CoordsHolder, "RIGHT", 0, 0) + calendarButton:RemoveTextures() + calendarButton:SetNormalTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-CALENDAR") + calendarButton:SetPushedTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-CALENDAR") + calendarButton:SetHighlightTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-CALENDAR") + calendarButton.TText = "Calendar" + calendarButton:RegisterForClicks("AnyUp") + calendarButton:SetScript("OnEnter", Basic_OnEnter) + calendarButton:SetScript("OnLeave", Basic_OnLeave) + calendarButton:SetScript("OnClick", Calendar_OnClick) + + local trackingButton = CreateFrame("Button", "SVUI_TrackingButton", CoordsHolder) + trackingButton:SetSize(22,22) + trackingButton:SetPoint("RIGHT", calendarButton, "LEFT", -4, 0) + trackingButton:RemoveTextures() + trackingButton:SetNormalTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-TRACKING") + trackingButton:SetPushedTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-TRACKING") + trackingButton:SetHighlightTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-TRACKING") + trackingButton.TText = "Tracking" + trackingButton:RegisterForClicks("AnyUp") + trackingButton:SetScript("OnEnter", Basic_OnEnter) + trackingButton:SetScript("OnLeave", Basic_OnLeave) + trackingButton:SetScript("OnClick", Tracking_OnClick) if(self.db.minimapbar.enable == true) then - MMBHolder = CreateFrame("Frame", "SVUI_MiniMapButtonHolder", SVUI_MinimapFrame) + MMBHolder = CreateFrame("Frame", "SVUI_MiniMapButtonHolder", mapHolder) MMBHolder:Point("TOPRIGHT", SVUI_MiniMapCoords, "BOTTOMRIGHT", 0, -4) - MMBHolder:Size(SVUI_MinimapFrame:GetWidth(), 32) + MMBHolder:Size(mapHolder:GetWidth(), 32) MMBHolder:SetFrameStrata("BACKGROUND") MMBBar = CreateFrame("Frame", "SVUI_MiniMapButtonBar", MMBHolder) MMBBar:SetFrameStrata("LOW") @@ -937,11 +975,17 @@ function MOD:Load() MMBBar:SetScript("OnLeave", MMB_OnLeave) SV:SetSVMovable(MMBHolder, L["Minimap Button Bar"]) self:UpdateMinimapButtonSettings() - end + end - LoadWorldMap() - SV:AddToDisplayAudit(SVUI_MinimapFrame) - self:ReLoad() + self.Holder = mapHolder + + self:RefreshMiniMap() + + self:RegisterEvent('ADDON_LOADED') + self:RegisterEvent('PLAYER_REGEN_ENABLED') + self:RegisterEvent('PLAYER_REGEN_DISABLED') + self:RegisterEvent("ZONE_CHANGED") + self:RegisterEvent("ZONE_CHANGED_NEW_AREA") end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.lua b/Interface/AddOns/SVUI/packages/override/SVOverride.lua index 03f76d7..5872aa5 100644 --- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua @@ -437,7 +437,7 @@ local MirrorBarToggleHandler = function(_, event, arg, ...) end local MirrorBarUpdateHandler = function(_, event) - if not GetCVarBool("lockActionBars") and SV.SVBar.db.enable then + if not GetCVarBool("lockActionBars") and SV.db.SVBar.enable then SetCVar("lockActionBars", 1) end if(event == "PLAYER_ENTERING_WORLD") then @@ -959,7 +959,7 @@ local LootComplexEventsHandler = function(_, event, arg1, arg2) rollFrame:SetPoint("CENTER",WorldFrame,"CENTER") rollFrame:Show() AlertFrame_FixAnchors() - if SV.SVHenchmen.db.autoRoll and UnitLevel('player') == MAX_PLAYER_LEVEL and quality == 2 and not bindOnPickUp then + if SV.db.SVHenchmen.autoRoll and UnitLevel('player') == MAX_PLAYER_LEVEL and quality == 2 and not bindOnPickUp then if canBreak then RollOnLoot(arg1,3) else diff --git a/Interface/AddOns/SVUI/packages/stats/stats/experience.lua b/Interface/AddOns/SVUI/packages/stats/stats/experience.lua index b7c1dc6..3d28a5b 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/experience.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/experience.lua @@ -68,7 +68,7 @@ local function Experience_OnEvent(self, ...) self.text:SetAllPoints(self) self.text:SetJustifyH("CENTER") self.barframe:Hide() - self.text:SetFontTemplate(LSM:Fetch("font",SV.SVStats.db.font),SV.SVStats.db.fontSize,SV.SVStats.db.fontOutline) + self.text:SetFontTemplate(LSM:Fetch("font",SV.db.SVStats.font),SV.db.SVStats.fontSize,SV.db.SVStats.fontOutline) end local f, g = getUnitXP("player") local h = GetXPExhaustion() @@ -90,7 +90,7 @@ local function ExperienceBar_OnEvent(self, ...) if (not self.barframe:IsShown())then self.barframe:Show() self.barframe.icon.texture:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\STAT-XP") - self.text:SetFontTemplate(LSM:Fetch("font",SV.SVStats.db.font),SV.SVStats.db.fontSize,"NONE") + self.text:SetFontTemplate(LSM:Fetch("font",SV.db.SVStats.font),SV.db.SVStats.fontSize,"NONE") end if not self.barframe.bar.extra:IsShown() then self.barframe.bar.extra:Show() diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua index b38654b..bc8d31a 100644 --- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua +++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua @@ -208,103 +208,6 @@ local ClearMaskColors = function(self) self[8]:SetTexture(0, 0, 0) end --- local _hook_GameTooltip_ShowCompareItem = function(self, shift) --- if not self then self = GameTooltip end --- local _,link = self:GetItem() --- if not link then return; end --- local shoppingTooltip1, shoppingTooltip2, shoppingTooltip3 = unpack(self.shoppingTooltips) --- local item1 = nil; --- local item2 = nil; --- local item3 = nil; --- local side = "left" - --- if shoppingTooltip1:SetHyperlinkCompareItem(link, 1, shift, self) then item1 = true end --- if shoppingTooltip2:SetHyperlinkCompareItem(link, 2, shift, self) then item2 = true end --- if shoppingTooltip3:SetHyperlinkCompareItem(link, 3, shift, self) then item3 = true end - --- local rightDist = 0; --- local leftPos = self:GetLeft() --- local rightPos = self:GetRight() - --- if not rightPos then rightPos = 0 end --- if not leftPos then leftPos = 0 end - --- rightDist = GetScreenWidth() - rightPos; - --- if(leftPos and (rightDist < leftPos)) then --- side = "left" --- else --- side = "right" --- end - --- if(self:GetAnchorType() and (self:GetAnchorType() ~= "ANCHOR_PRESERVE")) then --- local totalWidth = 0; --- if item1 then --- totalWidth = totalWidth + shoppingTooltip1:GetWidth() --- end --- if item2 then --- totalWidth = totalWidth + shoppingTooltip2:GetWidth() --- end --- if item3 then --- totalWidth = totalWidth + shoppingTooltip3:GetWidth() --- end --- if(side == "left" and (totalWidth > leftPos)) then --- self:SetAnchorType(self:GetAnchorType(), (totalWidth - leftPos), 0) --- elseif(side == "right" and ((rightPos + totalWidth) > GetScreenWidth())) then --- self:SetAnchorType(self:GetAnchorType(), -((rightPos + totalWidth) - GetScreenWidth()), 0) --- end --- end - --- if item3 then --- shoppingTooltip3:SetOwner(self, "ANCHOR_NONE") --- shoppingTooltip3:ClearAllPoints() --- if(side and side == "left") then --- shoppingTooltip3:SetPoint("TOPRIGHT", self, "TOPLEFT", -2, -10) --- else --- shoppingTooltip3:SetPoint("TOPLEFT", self, "TOPRIGHT", 2, -10) --- end --- shoppingTooltip3:SetHyperlinkCompareItem(link, 3, shift, self) --- shoppingTooltip3:Show() --- end - --- if item1 then --- if item3 then --- shoppingTooltip1:SetOwner(shoppingTooltip3, "ANCHOR_NONE") --- else --- shoppingTooltip1:SetOwner(self, "ANCHOR_NONE") --- end --- shoppingTooltip1:ClearAllPoints() - --- if(side and side == "left") then --- if item3 then --- shoppingTooltip1:SetPoint("TOPRIGHT", shoppingTooltip3, "TOPLEFT", -2, 0) --- else --- shoppingTooltip1:SetPoint("TOPRIGHT", self, "TOPLEFT", -2, -10) --- end --- else --- if item3 then --- shoppingTooltip1:SetPoint("TOPLEFT", shoppingTooltip3, "TOPRIGHT", 2, 0) --- else --- shoppingTooltip1:SetPoint("TOPLEFT", self, "TOPRIGHT", 2, -10) --- end --- end --- shoppingTooltip1:SetHyperlinkCompareItem(link, 1, shift, self) --- shoppingTooltip1:Show() - --- if item2 then --- shoppingTooltip2:SetOwner(shoppingTooltip1, "ANCHOR_NONE") --- shoppingTooltip2:ClearAllPoints() --- if (side and side == "left") then --- shoppingTooltip2:SetPoint("TOPRIGHT", shoppingTooltip1, "TOPLEFT", -2, 0) --- else --- shoppingTooltip2:SetPoint("TOPLEFT", shoppingTooltip1, "TOPRIGHT", 2, 0) --- end --- shoppingTooltip2:SetHyperlinkCompareItem(link, 2, shift, self) --- shoppingTooltip2:Show() --- end --- end --- end - function MOD:INSPECT_READY(_,guid) if MOD.lastGUID ~= guid then return end local unit = "mouseover" diff --git a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua index 52650b3..5f516e4 100644 --- a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua +++ b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua @@ -1377,6 +1377,18 @@ function MOD:KillBlizzardRaidFrames() end end +function MOD:GROUP_ROSTER_UPDATE() + self:KillBlizzardRaidFrames() + if(IsInGroup()) then + if(not self:IsEventRegistered("ZONE_CHANGED_NEW_AREA")) then + self:ZONE_CHANGED_NEW_AREA() + self:RegisterEvent("ZONE_CHANGED_NEW_AREA") + end + else + self:UnregisterEvent("ZONE_CHANGED_NEW_AREA") + end; +end + function MOD:PLAYER_REGEN_DISABLED() for _,frame in pairs(self.Headers) do if frame and frame.forceShow then diff --git a/Interface/AddOns/SVUI/packages/unit/frames.lua b/Interface/AddOns/SVUI/packages/unit/frames.lua index 3e0a74c..dad25bf 100644 --- a/Interface/AddOns/SVUI/packages/unit/frames.lua +++ b/Interface/AddOns/SVUI/packages/unit/frames.lua @@ -44,7 +44,7 @@ if(not MOD) then return end LOCAL DATA ########################################################## ]]-- -local CONSTRUCTORS, GROUP_UPDATES = {}, {} +local CONSTRUCTORS, GROUP_UPDATES, PROXY_UPDATES = {}, {}, {} local lastArenaFrame, lastBossFrame local sortMapping = { ["DOWN_RIGHT"] = {[1]="TOP",[2]="TOPLEFT",[3]="LEFT",[4]="RIGHT",[5]="LEFT",[6]=1,[7]=-1,[8]=false}, @@ -1108,7 +1108,7 @@ local Raid10Visibility = function(self, event) if(event == "PLAYER_REGEN_ENABLED") then self:UnregisterEvent("PLAYER_REGEN_ENABLED") end - if not InCombatLockdown()then + if not InCombatLockdown() then if(instance and (instanceType == "raid") and (maxPlayers == 10)) then UnregisterStateDriver(self, "visibility") self:Show() @@ -1212,8 +1212,8 @@ GROUP_UPDATES["raid10"] = function(self) frame:Point("LEFT", SV.UIParent, "LEFT", 4, 0) SV:SetSVMovable(frame, L["Raid 10 Frames"], nil, nil, nil, "ALL, RAID"..10) frame:RegisterEvent("PLAYER_ENTERING_WORLD") - frame:RegisterEvent("ZONE_CHANGED_NEW_AREA") frame:SetScript("OnEvent", Raid10Visibility) + PROXY_UPDATES["raid10"] = function() Raid10Visibility(frame) end; frame.positioned = true end Raid10Visibility(frame) @@ -1241,8 +1241,8 @@ GROUP_UPDATES["raid25"] = function(self) frame:Point("LEFT", SV.UIParent, "LEFT", 4, 0) SV:SetSVMovable(frame, L["Raid 25 Frames"], nil, nil, nil, "ALL, RAID"..25) frame:RegisterEvent("PLAYER_ENTERING_WORLD") - frame:RegisterEvent("ZONE_CHANGED_NEW_AREA") frame:SetScript("OnEvent", Raid25Visibility) + PROXY_UPDATES["raid25"] = function() Raid25Visibility(frame) end; frame.positioned = true end Raid25Visibility(frame) @@ -1270,8 +1270,8 @@ GROUP_UPDATES["raid40"] = function(self) frame:Point("LEFT", SV.UIParent, "LEFT", 4, 0) SV:SetSVMovable(frame, L["Raid 40 Frames"], nil, nil, nil, "ALL, RAID"..40) frame:RegisterEvent("PLAYER_ENTERING_WORLD") - frame:RegisterEvent("ZONE_CHANGED_NEW_AREA") frame:SetScript("OnEvent", Raid40Visibility) + PROXY_UPDATES["raid40"] = function() Raid40Visibility(frame) end; frame.positioned = true end Raid40Visibility(frame) @@ -1402,10 +1402,10 @@ GROUP_UPDATES["raidpet"] = function(self) raidPets:ClearAllPoints() raidPets:Point("BOTTOMLEFT", SV.UIParent, "BOTTOMLEFT", 4, 433) SV:SetSVMovable(raidPets, L["Raid Pet Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") - raidPets.positioned = true; raidPets:RegisterEvent("PLAYER_ENTERING_WORLD") - raidPets:RegisterEvent("ZONE_CHANGED_NEW_AREA") raidPets:SetScript("OnEvent", RaidPetVisibility) + PROXY_UPDATES["raidpet"] = function() RaidPetVisibility(raidPets) end; + raidPets.positioned = true; end RaidPetVisibility(raidPets) local key = "raidpet" @@ -1546,10 +1546,10 @@ GROUP_UPDATES["party"] = function(self) group:ClearAllPoints() group:Point("LEFT",SV.UIParent,"LEFT",40,0) SV:SetSVMovable(group, L['Party Frames'], nil, nil, nil, 'ALL,PARTY,ARENA'); - group.positioned = true; group:RegisterEvent("PLAYER_ENTERING_WORLD") - group:RegisterEvent("ZONE_CHANGED_NEW_AREA") group:SetScript("OnEvent", PartyVisibility) + PROXY_UPDATES["party"] = function() PartyVisibility(group) end; + group.positioned = true; end PartyVisibility(group) local key = "party" @@ -2027,6 +2027,23 @@ end LOAD/UPDATE METHOD ########################################################## ]]-- +function MOD:ZONE_CHANGED_NEW_AREA() + if(not IsInGroup()) then return end; + if(IsInRaid()) then + local members = GetNumGroupMembers() + if(members > 25) then + PROXY_UPDATES["raid40"]() + elseif(members > 10) then + PROXY_UPDATES["raid25"]() + else + PROXY_UPDATES["raid10"]() + end + PROXY_UPDATES["raidpet"]() + elseif(IsInParty()) then + PROXY_UPDATES["party"]() + end; +end + function MOD:SetGroupFrame(key, filter, template1, forceUpdate, template2) if(InCombatLockdown()) then self:RegisterEvent("PLAYER_REGEN_ENABLED"); return end if(not self.db.enable or not self.db[key]) then return end diff --git a/Interface/AddOns/SVUI/scripts/mounts.lua b/Interface/AddOns/SVUI/scripts/mounts.lua index 694d69a..1dc8adb 100644 --- a/Interface/AddOns/SVUI/scripts/mounts.lua +++ b/Interface/AddOns/SVUI/scripts/mounts.lua @@ -36,8 +36,8 @@ GET ADDON DATA local SVUI_ADDON_NAME, SV = ... local SVLib = LibStub("LibSuperVillain-1.0") local L = SVLib:Lang() --- SVUI_Cache.Mounts.types --- SVUI_Cache.Mounts.names +-- MountCache.types +-- MountCache.names --[[ ########################################################## LOCAL VARIABLES @@ -66,36 +66,36 @@ local function UpdateMountCheckboxes(button, index) bar["SPECIAL"].index = index bar["SPECIAL"].name = creatureName - if(SVUI_Cache.Mounts.names["GROUND"] == creatureName) then - if(SVUI_Cache.Mounts.types["GROUND"] ~= index) then - SVUI_Cache.Mounts.types["GROUND"] = index + if(MountCache.names["GROUND"] == creatureName) then + if(MountCache.types["GROUND"] ~= index) then + MountCache.types["GROUND"] = index end bar["GROUND"]:SetChecked(1) else bar["GROUND"]:SetChecked(0) end - if(SVUI_Cache.Mounts.names["FLYING"] == creatureName) then - if(SVUI_Cache.Mounts.types["FLYING"] ~= index) then - SVUI_Cache.Mounts.types["FLYING"] = index + if(MountCache.names["FLYING"] == creatureName) then + if(MountCache.types["FLYING"] ~= index) then + MountCache.types["FLYING"] = index end bar["FLYING"]:SetChecked(1) else bar["FLYING"]:SetChecked(0) end - if(SVUI_Cache.Mounts.names["SWIMMING"] == creatureName) then - if(SVUI_Cache.Mounts.types["SWIMMING"] ~= index) then - SVUI_Cache.Mounts.types["SWIMMING"] = index + if(MountCache.names["SWIMMING"] == creatureName) then + if(MountCache.types["SWIMMING"] ~= index) then + MountCache.types["SWIMMING"] = index end bar["SWIMMING"]:SetChecked(1) else bar["SWIMMING"]:SetChecked(0) end - if(SVUI_Cache.Mounts.names["SPECIAL"] == creatureName) then - if(SVUI_Cache.Mounts.types["SPECIAL"] ~= index) then - SVUI_Cache.Mounts.types["SPECIAL"] = index + if(MountCache.names["SPECIAL"] == creatureName) then + if(MountCache.types["SPECIAL"] ~= index) then + MountCache.types["SPECIAL"] = index end bar["SPECIAL"]:SetChecked(1) else @@ -109,24 +109,24 @@ local function UpdateMountCache() local num = GetNumCompanions("MOUNT") for index = 1, num, 1 do local _, info, id = GetCompanionInfo("MOUNT", index) - if(SVUI_Cache.Mounts.names["GROUND"] == info) then - if(SVUI_Cache.Mounts.types["GROUND"] ~= index) then - SVUI_Cache.Mounts.types["GROUND"] = index + if(MountCache.names["GROUND"] == info) then + if(MountCache.types["GROUND"] ~= index) then + MountCache.types["GROUND"] = index end end - if(SVUI_Cache.Mounts.names["FLYING"] == info) then - if(SVUI_Cache.Mounts.types["FLYING"] ~= index) then - SVUI_Cache.Mounts.types["FLYING"] = index + if(MountCache.names["FLYING"] == info) then + if(MountCache.types["FLYING"] ~= index) then + MountCache.types["FLYING"] = index end end - if(SVUI_Cache.Mounts.names["SWIMMING"] == info) then - if(SVUI_Cache.Mounts.types["SWIMMING"] ~= index) then - SVUI_Cache.Mounts.types["SWIMMING"] = index + if(MountCache.names["SWIMMING"] == info) then + if(MountCache.types["SWIMMING"] ~= index) then + MountCache.types["SWIMMING"] = index end end - if(SVUI_Cache.Mounts.names["SPECIAL"] == info) then - if(SVUI_Cache.Mounts.types["SPECIAL"] ~= index) then - SVUI_Cache.Mounts.types["SPECIAL"] = index + if(MountCache.names["SPECIAL"] == info) then + if(MountCache.types["SPECIAL"] ~= index) then + MountCache.types["SPECIAL"] = index end end end @@ -160,29 +160,29 @@ local function UpdateCurrentMountSelection() ttSummary = "" local creatureName - if(SVUI_Cache.Mounts.types["FLYING"]) then - creatureName = SVUI_Cache.Mounts.names["FLYING"] + if(MountCache.types["FLYING"]) then + creatureName = MountCache.names["FLYING"] if(creatureName) then ttSummary = ttSummary .. "\nFlying: " .. creatureName end end - if(SVUI_Cache.Mounts.types["SWIMMING"]) then - creatureName = SVUI_Cache.Mounts.names["SWIMMING"] + if(MountCache.types["SWIMMING"]) then + creatureName = MountCache.names["SWIMMING"] if(creatureName) then ttSummary = ttSummary .. "\nSwimming: " .. creatureName end end - if(SVUI_Cache.Mounts.types["GROUND"]) then - creatureName = SVUI_Cache.Mounts.names["GROUND"] + if(MountCache.types["GROUND"]) then + creatureName = MountCache.names["GROUND"] if(creatureName) then ttSummary = ttSummary .. "\nGround: " .. creatureName end end - if(SVUI_Cache.Mounts.types["SPECIAL"]) then - creatureName = SVUI_Cache.Mounts.names["SPECIAL"] + if(MountCache.types["SPECIAL"]) then + creatureName = MountCache.names["SPECIAL"] if(creatureName) then ttSummary = ttSummary .. "\nSpecial: " .. creatureName end @@ -196,11 +196,11 @@ local CheckButton_OnClick = function(self) if(index) then if(self:GetChecked() == 1) then - SVUI_Cache.Mounts.types[key] = index - SVUI_Cache.Mounts.names[key] = name + MountCache.types[key] = index + MountCache.names[key] = name else - SVUI_Cache.Mounts.types[key] = false - SVUI_Cache.Mounts.names[key] = "" + MountCache.types[key] = false + MountCache.names[key] = "" end Update_MountCheckButtons() UpdateCurrentMountSelection() @@ -235,20 +235,21 @@ ADDING CHECKBOXES TO JOURNAL ########################################################## ]]-- local function SetMountCheckButtons() - if not SVUI_Cache["Mounts"] then - SVUI_Cache["Mounts"] = { - ["types"] = { - ["GROUND"] = false, - ["FLYING"] = false, - ["SWIMMING"] = false, - ["SPECIAL"] = false - }, - ["names"] = { - ["GROUND"] = "", - ["FLYING"] = "", - ["SWIMMING"] = "", - ["SPECIAL"] = "" - } + MountCache = SVLib:NewCache("Mounts") + if not MountCache.types then + MountCache.types = { + ["GROUND"] = false, + ["FLYING"] = false, + ["SWIMMING"] = false, + ["SPECIAL"] = false + } + end + if not MountCache.names then + MountCache.names = { + ["GROUND"] = "", + ["FLYING"] = "", + ["SWIMMING"] = "", + ["SPECIAL"] = "" } end @@ -363,7 +364,7 @@ SLASH FUNCTION ########################################################## ]]-- function SVUILetsRide() - local checkList = SVUI_Cache.Mounts.types + local checkList = MountCache.types local letsFly, letsSwim, letsSeahorse, vjZone, IbelieveIcantFly local maxMounts = GetNumCompanions("MOUNT") if(not maxMounts or IsMounted()) then diff --git a/Interface/AddOns/SVUI/scripts/reactions.lua b/Interface/AddOns/SVUI/scripts/reactions.lua index a665ebf..ce7a82b 100644 --- a/Interface/AddOns/SVUI/scripts/reactions.lua +++ b/Interface/AddOns/SVUI/scripts/reactions.lua @@ -102,7 +102,7 @@ WEARING NON COMBAT GEAR ]]-- local StupidHatHandler = CreateFrame("Frame") local StupidHatHandler_OnEvent = function(self, event) - if event ~= "ZONE_CHANGED_NEW_AREA" or not IsInInstance() then return end + if(not IsInInstance()) then return end local item = {} for i = 1, 17 do if Reactions.StupidHat[i] ~= nil then diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua index f5f36ee..efa03e1 100644 --- a/Interface/AddOns/SVUI/system/alerts.lua +++ b/Interface/AddOns/SVUI/system/alerts.lua @@ -51,17 +51,17 @@ LOCAL VARS ]]-- local BUFFER = {}; local function UpdateActionBarOptions() - if InCombatLockdown() or not SV.SVBar.db.IsLoaded then return end - if (SV.SVBar.db.Bar2.enable ~= InterfaceOptionsActionBarsPanelBottomRight:GetChecked()) then + if InCombatLockdown() or not SV.db.SVBar.IsLoaded then return end + if (SV.db.SVBar.Bar2.enable ~= InterfaceOptionsActionBarsPanelBottomRight:GetChecked()) then InterfaceOptionsActionBarsPanelBottomRight:Click() end - if (SV.SVBar.db.Bar3.enable ~= InterfaceOptionsActionBarsPanelRightTwo:GetChecked()) then + if (SV.db.SVBar.Bar3.enable ~= InterfaceOptionsActionBarsPanelRightTwo:GetChecked()) then InterfaceOptionsActionBarsPanelRightTwo:Click() end - if (SV.SVBar.db.Bar4.enable ~= InterfaceOptionsActionBarsPanelRight:GetChecked()) then + if (SV.db.SVBar.Bar4.enable ~= InterfaceOptionsActionBarsPanelRight:GetChecked()) then InterfaceOptionsActionBarsPanelRight:Click() end - if (SV.SVBar.db.Bar5.enable ~= InterfaceOptionsActionBarsPanelBottomLeft:GetChecked()) then + if (SV.db.SVBar.Bar5.enable ~= InterfaceOptionsActionBarsPanelBottomLeft:GetChecked()) then InterfaceOptionsActionBarsPanelBottomLeft:Click() end SV.SVBar:RefreshBar("Bar1") @@ -208,11 +208,11 @@ SV.SystemAlert["BAR6_CONFIRMATION"] = { button1 = YES, button2 = NO, OnAccept = function(a) - if SV.SVBar.db["BAR6"].enable ~= true then - SV.SVBar.db.Bar6.enable = true; + if SV.db.SVBar["BAR6"].enable ~= true then + SV.db.SVBar.Bar6.enable = true; UpdateActionBarOptions() else - SV.SVBar.db.Bar6.enable = false; + SV.db.SVBar.Bar6.enable = false; UpdateActionBarOptions() end end, diff --git a/Interface/AddOns/SVUI/system/setup.lua b/Interface/AddOns/SVUI/system/setup.lua index 43449c5..961cc36 100644 --- a/Interface/AddOns/SVUI/system/setup.lua +++ b/Interface/AddOns/SVUI/system/setup.lua @@ -1208,10 +1208,10 @@ local function ShowLayout(show40) end local function BarShuffle() - local bar2 = SV.SVBar.db.Bar2.enable; + local bar2 = SV.db.SVBar.Bar2.enable; local base = 30; - local bS = SV.SVBar.db.Bar1.buttonspacing; - local tH = SV.SVBar.db.Bar1.buttonsize + (base - bS); + local bS = SV.db.SVBar.Bar1.buttonspacing; + local tH = SV.db.SVBar.Bar1.buttonsize + (base - bS); local b2h = bar2 and tH or base; local sph = (400 - b2h); if not SVUI_Cache.anchors then SVUI_Cache.anchors = {} end @@ -1454,26 +1454,26 @@ local function SetUserScreen(rez, preserve) SV.db.SVDock.dockLeftHeight = 180; SV.db.SVDock.dockRightWidth = 350; SV.db.SVDock.dockRightHeight = 180; - SV.SVAura.db.wrapAfter = 10 - SV.SVUnit.db.fontSize = 10; - SV.SVUnit.db.player.width = 200; - SV.SVUnit.db.player.castbar.width = 200; - SV.SVUnit.db.player.classbar.fill = "fill" - SV.SVUnit.db.player.health.tags = "[health:color][health:current]" - SV.SVUnit.db.target.width = 200; - SV.SVUnit.db.target.castbar.width = 200; - SV.SVUnit.db.target.health.tags = "[health:color][health:current]" - SV.SVUnit.db.pet.power.enable = false; - SV.SVUnit.db.pet.width = 200; - SV.SVUnit.db.pet.height = 26; - SV.SVUnit.db.targettarget.debuffs.enable = false; - SV.SVUnit.db.targettarget.power.enable = false; - SV.SVUnit.db.targettarget.width = 200; - SV.SVUnit.db.targettarget.height = 26; - SV.SVUnit.db.boss.width = 200; - SV.SVUnit.db.boss.castbar.width = 200; - SV.SVUnit.db.arena.width = 200; - SV.SVUnit.db.arena.castbar.width = 200 + SV.db.SVAura.wrapAfter = 10 + SV.db.SVUnit.fontSize = 10; + SV.db.SVUnit.player.width = 200; + SV.db.SVUnit.player.castbar.width = 200; + SV.db.SVUnit.player.classbar.fill = "fill" + SV.db.SVUnit.player.health.tags = "[health:color][health:current]" + SV.db.SVUnit.target.width = 200; + SV.db.SVUnit.target.castbar.width = 200; + SV.db.SVUnit.target.health.tags = "[health:color][health:current]" + SV.db.SVUnit.pet.power.enable = false; + SV.db.SVUnit.pet.width = 200; + SV.db.SVUnit.pet.height = 26; + SV.db.SVUnit.targettarget.debuffs.enable = false; + SV.db.SVUnit.targettarget.power.enable = false; + SV.db.SVUnit.targettarget.width = 200; + SV.db.SVUnit.targettarget.height = 26; + SV.db.SVUnit.boss.width = 200; + SV.db.SVUnit.boss.castbar.width = 200; + SV.db.SVUnit.arena.width = 200; + SV.db.SVUnit.arena.castbar.width = 200 end if not mungs then UFMoveBottomQuadrant(true) @@ -1535,9 +1535,9 @@ local function SetColorTheme(style, preserve) SV.db.LAYOUT.mediastyle = style; if(style == "default") then - SV.SVUnit.db.healthclass = true; + SV.db.SVUnit.healthclass = true; else - SV.SVUnit.db.healthclass = false; + SV.db.SVUnit.healthclass = false; end if(not mungs) then @@ -1568,7 +1568,7 @@ local function SetUnitframeLayout(style, preserve) SV.db.LAYOUT.unitstyle = style if(SV.db.LAYOUT.mediastyle == "default") then - SV.SVUnit.db.healthclass = true; + SV.db.SVUnit.healthclass = true; end if(not mungs) then diff --git a/Interface/AddOns/SVUI/system/slash.lua b/Interface/AddOns/SVUI/system/slash.lua index e8df230..1213c4e 100644 --- a/Interface/AddOns/SVUI/system/slash.lua +++ b/Interface/AddOns/SVUI/system/slash.lua @@ -49,7 +49,7 @@ local function SVUIMasterCommand(msg) SV.Setup:Install() elseif (msg == "move" or msg == "mentalo") then SV:UseMentalo() - elseif (msg == "kb" or msg == "bind") and SV.SVBar.db.enable then + elseif (msg == "kb" or msg == "bind") and SV.db.SVBar.enable then SV.SVBar:ToggleKeyBindingMode() elseif (msg == "reset" or msg == "resetui") then SV:ResetAllUI() diff --git a/Interface/AddOns/SVUI/system/timers.lua b/Interface/AddOns/SVUI/system/timers.lua index 935c6b0..bd040d7 100644 --- a/Interface/AddOns/SVUI/system/timers.lua +++ b/Interface/AddOns/SVUI/system/timers.lua @@ -79,6 +79,20 @@ local ExeTimerManager_OnUpdate = function(self, elapsed) end end +local function CallbackCheck(id) + return function() return Timers.Queue[id] == nil end +end + +function Timers:ExecuteCallbackTimer(timeOutFunction, duration) + if(type(duration) == "number" and type(timeOutFunction) == "function") then + self.TimerCount = self.TimerCount + 1 + local id = "LOOP" .. self.TimerCount; + self.Queue[id] = {t = duration, f = timeOutFunction} + return CallbackCheck(id) + end + return false +end + function Timers:ExecuteTimer(timeOutFunction, duration, idCheck) if(type(duration) == "number" and type(timeOutFunction) == "function") then if(idCheck and self.Queue[idCheck]) then diff --git a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua index e4b1cae..34eaa9b 100644 --- a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua +++ b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua @@ -443,7 +443,7 @@ LOCAL FUNCTIONS ########################################################## ]]-- local function ServiceMessage(msg) - local msgFrom = MOD.db.prefix == true and "Minion Answering Service" or ""; + local msgFrom = PLUGIN.db.prefix == true and "Minion Answering Service" or ""; print("|cffffcc1a" .. msgFrom .. ":|r", msg) end diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua index d2d76bd..06aa8f5 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua @@ -549,7 +549,7 @@ end function PLUGIN:UpdateZoneStatus() local zoneText = GetRealZoneText() or GetZoneText() if(not zoneText or zoneText == "") then - SV.Timers:ExecuteTimer(PLUGIN.UpdateZoneStatus, 5) + self.ZoneTimer = SV.Timers:ExecuteTimer(PLUGIN.UpdateZoneStatus, 5) return end if(zoneText ~= ACTIVE_ZONE) then diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua index c9f7a50..26a4ac9 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua @@ -46,73 +46,73 @@ local function CommonFontSizeUpdate() local STANDARDFONTSIZE = SV.db.media.fonts.size; local smallfont = STANDARDFONTSIZE - 2; local largefont = STANDARDFONTSIZE + 2; - SV.SVAura.db.fontSize = STANDARDFONTSIZE; - SV.SVStats.db.fontSize = STANDARDFONTSIZE; - SV.SVUnit.db.fontSize = STANDARDFONTSIZE; - SV.SVUnit.db.auraFontSize = smallfont; + SV.db.SVAura.fontSize = STANDARDFONTSIZE; + SV.db.SVStats.fontSize = STANDARDFONTSIZE; + SV.db.SVUnit.fontSize = STANDARDFONTSIZE; + SV.db.SVUnit.auraFontSize = smallfont; - SV.SVBar.db.fontSize = smallfont; - SV.SVPlate.db.fontSize = smallfont; + SV.db.SVBar.fontSize = smallfont; + SV.db.SVPlate.fontSize = smallfont; - SV.SVLaborer.db.fontSize = largefont; + SV.db.SVLaborer.fontSize = largefont; - SV.SVUnit.db.player.health.fontSize = largefont; - SV.SVUnit.db.player.power.fontSize = largefont; - SV.SVUnit.db.player.name.fontSize = largefont; - SV.SVUnit.db.player.aurabar.fontSize = STANDARDFONTSIZE; + SV.db.SVUnit.player.health.fontSize = largefont; + SV.db.SVUnit.player.power.fontSize = largefont; + SV.db.SVUnit.player.name.fontSize = largefont; + SV.db.SVUnit.player.aurabar.fontSize = STANDARDFONTSIZE; - SV.SVUnit.db.target.health.fontSize = largefont; - SV.SVUnit.db.target.power.fontSize = largefont; - SV.SVUnit.db.target.name.fontSize = largefont; - SV.SVUnit.db.target.aurabar.fontSize = STANDARDFONTSIZE; + SV.db.SVUnit.target.health.fontSize = largefont; + SV.db.SVUnit.target.power.fontSize = largefont; + SV.db.SVUnit.target.name.fontSize = largefont; + SV.db.SVUnit.target.aurabar.fontSize = STANDARDFONTSIZE; - SV.SVUnit.db.focus.health.fontSize = largefont; - SV.SVUnit.db.focus.power.fontSize = largefont; - SV.SVUnit.db.focus.name.fontSize = largefont; - SV.SVUnit.db.focus.aurabar.fontSize = STANDARDFONTSIZE; + SV.db.SVUnit.focus.health.fontSize = largefont; + SV.db.SVUnit.focus.power.fontSize = largefont; + SV.db.SVUnit.focus.name.fontSize = largefont; + SV.db.SVUnit.focus.aurabar.fontSize = STANDARDFONTSIZE; - SV.SVUnit.db.targettarget.health.fontSize = largefont; - SV.SVUnit.db.targettarget.power.fontSize = largefont; - SV.SVUnit.db.targettarget.name.fontSize = largefont; + SV.db.SVUnit.targettarget.health.fontSize = largefont; + SV.db.SVUnit.targettarget.power.fontSize = largefont; + SV.db.SVUnit.targettarget.name.fontSize = largefont; - SV.SVUnit.db.focustarget.health.fontSize = largefont; - SV.SVUnit.db.focustarget.power.fontSize = largefont; - SV.SVUnit.db.focustarget.name.fontSize = largefont; + SV.db.SVUnit.focustarget.health.fontSize = largefont; + SV.db.SVUnit.focustarget.power.fontSize = largefont; + SV.db.SVUnit.focustarget.name.fontSize = largefont; - SV.SVUnit.db.pet.health.fontSize = largefont; - SV.SVUnit.db.pet.power.fontSize = largefont; - SV.SVUnit.db.pet.name.fontSize = largefont; + SV.db.SVUnit.pet.health.fontSize = largefont; + SV.db.SVUnit.pet.power.fontSize = largefont; + SV.db.SVUnit.pet.name.fontSize = largefont; - SV.SVUnit.db.pettarget.health.fontSize = largefont; - SV.SVUnit.db.pettarget.power.fontSize = largefont; - SV.SVUnit.db.pettarget.name.fontSize = largefont; + SV.db.SVUnit.pettarget.health.fontSize = largefont; + SV.db.SVUnit.pettarget.power.fontSize = largefont; + SV.db.SVUnit.pettarget.name.fontSize = largefont; - SV.SVUnit.db.party.health.fontSize = largefont; - SV.SVUnit.db.party.power.fontSize = largefont; - SV.SVUnit.db.party.name.fontSize = largefont; + SV.db.SVUnit.party.health.fontSize = largefont; + SV.db.SVUnit.party.power.fontSize = largefont; + SV.db.SVUnit.party.name.fontSize = largefont; - SV.SVUnit.db.boss.health.fontSize = largefont; - SV.SVUnit.db.boss.power.fontSize = largefont; - SV.SVUnit.db.boss.name.fontSize = largefont; + SV.db.SVUnit.boss.health.fontSize = largefont; + SV.db.SVUnit.boss.power.fontSize = largefont; + SV.db.SVUnit.boss.name.fontSize = largefont; - SV.SVUnit.db.arena.health.fontSize = largefont; - SV.SVUnit.db.arena.power.fontSize = largefont; - SV.SVUnit.db.arena.name.fontSize = largefont; + SV.db.SVUnit.arena.health.fontSize = largefont; + SV.db.SVUnit.arena.power.fontSize = largefont; + SV.db.SVUnit.arena.name.fontSize = largefont; - SV.SVUnit.db.raid10.health.fontSize = largefont; - SV.SVUnit.db.raid10.power.fontSize = largefont; - SV.SVUnit.db.raid10.name.fontSize = largefont; + SV.db.SVUnit.raid10.health.fontSize = largefont; + SV.db.SVUnit.raid10.power.fontSize = largefont; + SV.db.SVUnit.raid10.name.fontSize = largefont; - SV.SVUnit.db.raid25.health.fontSize = largefont; - SV.SVUnit.db.raid25.power.fontSize = largefont; - SV.SVUnit.db.raid25.name.fontSize = largefont; + SV.db.SVUnit.raid25.health.fontSize = largefont; + SV.db.SVUnit.raid25.power.fontSize = largefont; + SV.db.SVUnit.raid25.name.fontSize = largefont; - SV.SVUnit.db.raid40.health.fontSize = largefont; - SV.SVUnit.db.raid40.power.fontSize = largefont; - SV.SVUnit.db.raid40.name.fontSize = largefont; + SV.db.SVUnit.raid40.health.fontSize = largefont; + SV.db.SVUnit.raid40.power.fontSize = largefont; + SV.db.SVUnit.raid40.name.fontSize = largefont; - SV.SVUnit.db.tank.health.fontSize = largefont; - SV.SVUnit.db.assist.health.fontSize = largefont; + SV.db.SVUnit.tank.health.fontSize = largefont; + SV.db.SVUnit.assist.health.fontSize = largefont; SV:RefreshSystemFonts() end @@ -190,7 +190,7 @@ SV.Options.args.primary = { SV:ToggleConfig() GameTooltip:Hide() end, - disabled = function() return not SV.SVBar.db.enable end + disabled = function() return not SV.db.SVBar.enable end } }, }, @@ -274,16 +274,16 @@ SV.Options.args.common = { type = "toggle", name = L['Loot Frame'], desc = L['Enable/Disable the loot frame.'], - get = function()return SV.SVOverride.db.loot end, - set = function(j,value)SV.SVOverride.db.loot = value;SV:StaticPopup_Show("RL_CLIENT")end + get = function()return SV.db.SVOverride.loot end, + set = function(j,value)SV.db.SVOverride.loot = value;SV:StaticPopup_Show("RL_CLIENT")end }, lootRoll = { order = 2, type = "toggle", name = L['Loot Roll'], desc = L['Enable/Disable the loot roll frame.'], - get = function()return SV.SVOverride.db.lootRoll end, - set = function(j,value)SV.SVOverride.db.lootRoll = value;SV:StaticPopup_Show("RL_CLIENT")end + get = function()return SV.db.SVOverride.lootRoll end, + set = function(j,value)SV.db.SVOverride.lootRoll = value;SV:StaticPopup_Show("RL_CLIENT")end }, lootRollWidth = { order = 3, @@ -293,7 +293,7 @@ SV.Options.args.common = { min = 100, max = 328, step = 1, - get = function()return SV.SVOverride.db.lootRollWidth end, + get = function()return SV.db.SVOverride.lootRollWidth end, set = function(a,b) OVR:ChangeDBVar(b,a[#a]); end, }, lootRollHeight = { @@ -304,7 +304,7 @@ SV.Options.args.common = { min = 14, max = 58, step = 1, - get = function()return SV.SVOverride.db.lootRollHeight end, + get = function()return SV.db.SVOverride.lootRollHeight end, set = function(a,b) OVR:ChangeDBVar(b,a[#a]); end, }, } @@ -657,8 +657,8 @@ SV.Options.args.common = { order = 3, type = 'group', name = L['Gear Managment'], - get = function(a)return SV.SVGear.db[a[#a]]end, - set = function(a,b)SV.SVGear.db[a[#a]]=b;GEAR:ReLoad()end, + get = function(a)return SV.db.SVGear[a[#a]]end, + set = function(a,b)SV.db.SVGear[a[#a]]=b;GEAR:ReLoad()end, args={ intro={ order = 1, @@ -683,15 +683,15 @@ SV.Options.args.common = { order=1, name=L["Enable"], desc=L['Enable/Disable the specialization switch.'], - get=function(e)return SV.SVGear.db.specialization.enable end, - set=function(e,value) SV.SVGear.db.specialization.enable = value end + get=function(e)return SV.db.SVGear.specialization.enable end, + set=function(e,value) SV.db.SVGear.specialization.enable = value end }, primary={ type="select", order=2, name=L["Primary Talent"], desc=L["Choose the equipment set to use for your primary specialization."], - disabled=function()return not SV.SVGear.db.specialization.enable end, + disabled=function()return not SV.db.SVGear.specialization.enable end, values=function() local h={["none"]=L["No Change"]} for i=1,GetNumEquipmentSets()do @@ -707,7 +707,7 @@ SV.Options.args.common = { order=3, name=L["Secondary Talent"], desc=L["Choose the equipment set to use for your secondary specialization."], - disabled=function()return not SV.SVGear.db.specialization.enable end, + disabled=function()return not SV.db.SVGear.specialization.enable end, values=function() local h={["none"]=L["No Change"]} for i=1,GetNumEquipmentSets()do @@ -733,15 +733,15 @@ SV.Options.args.common = { order = 1, name = L["Enable"], desc = L["Enable/Disable the battleground switch."], - get = function(e)return SV.SVGear.db.battleground.enable end, - set = function(e,value)SV.SVGear.db.battleground.enable = value end + get = function(e)return SV.db.SVGear.battleground.enable end, + set = function(e,value)SV.db.SVGear.battleground.enable = value end }, equipmentset = { type = "select", order = 2, name = L["Equipment Set"], desc = L["Choose the equipment set to use when you enter a battleground or arena."], - disabled = function()return not SV.SVGear.db.battleground.enable end, + disabled = function()return not SV.db.SVGear.battleground.enable end, values = function() local h = {["none"] = L["No Change"]} for i = 1,GetNumEquipmentSets()do @@ -764,8 +764,8 @@ SV.Options.args.common = { name = DURABILITY, guiInline = true, order = 5, - get = function(e)return SV.SVGear.db.durability[e[#e]]end, - set = function(e,value)SV.SVGear.db.durability[e[#e]] = value;GEAR:ReLoad()end, + get = function(e)return SV.db.SVGear.durability[e[#e]]end, + set = function(e,value)SV.db.SVGear.durability[e[#e]] = value;GEAR:ReLoad()end, args = { enable = { type = "toggle", @@ -778,7 +778,7 @@ SV.Options.args.common = { order = 2, name = L["Damaged Only"], desc = L["Only show durability information for items that are damaged."], - disabled = function()return not SV.SVGear.db.durability.enable end + disabled = function()return not SV.db.SVGear.durability.enable end } } }, @@ -792,8 +792,8 @@ SV.Options.args.common = { name = STAT_AVERAGE_ITEM_LEVEL, guiInline = true, order = 7, - get = function(e)return SV.SVGear.db.itemlevel[e[#e]]end, - set = function(e,value)SV.SVGear.db.itemlevel[e[#e]] = value;GEAR:ReLoad()end, + get = function(e)return SV.db.SVGear.itemlevel[e[#e]]end, + set = function(e,value)SV.db.SVGear.itemlevel[e[#e]] = value;GEAR:ReLoad()end, args = { enable = { type = "toggle", @@ -808,9 +808,9 @@ SV.Options.args.common = { name = L["Miscellaneous"], guiInline = true, order = 8, - get = function(e)return SV.SVGear.db.misc[e[#e]]end, - set = function(e,value)SV.SVGear.db.misc[e[#e]] = value end, - disabled = function()return not SV.SVBag.db.enable end, + get = function(e)return SV.db.SVGear.misc[e[#e]]end, + set = function(e,value)SV.db.SVGear.misc[e[#e]] = value end, + disabled = function()return not SV.db.SVBag.enable end, args = { setoverlay = { type = "toggle", @@ -818,7 +818,7 @@ SV.Options.args.common = { name = L["Equipment Set Overlay"], desc = L["Show the associated equipment sets for the items in your bags (or bank)."], set = function(e,value) - SV.SVGear.db.misc[e[#e]] = value; + SV.db.SVGear.misc[e[#e]] = value; BAG:ToggleEquipmentOverlay() end } diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/aura.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/aura.lua index cecaa21..1cb3b47 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/aura.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/aura.lua @@ -160,7 +160,7 @@ SV.Options.args.SVAura = { type = "group", name = BUFFOPTIONS_LABEL, childGroups = "tab", - get = function(a)return SV.SVAura.db[a[#a]]end, + get = function(a)return SV.db.SVAura[a[#a]]end, set = function(a,b) MOD:ChangeDBVar(b,a[#a]); MOD:UpdateAuraHeader(SVUI_PlayerBuffs, "buffs") @@ -176,15 +176,15 @@ SV.Options.args.SVAura = { order = 2, type = "toggle", name = L["Enable"], - get = function(a)return SV.SVAura.db.enable end, - set = function(a,b)SV.SVAura.db.enable = b;SV:StaticPopup_Show("RL_CLIENT")end + get = function(a)return SV.db.SVAura.enable end, + set = function(a,b)SV.db.SVAura.enable = b;SV:StaticPopup_Show("RL_CLIENT")end }, disableBlizzard = { order = 3, type = "toggle", name = L["Disabled Blizzard"], - get = function(a)return SV.SVAura.db.disableBlizzard end, - set = function(a,b)SV.SVAura.db.disableBlizzard = b;SV:StaticPopup_Show("RL_CLIENT")end + get = function(a)return SV.db.SVAura.disableBlizzard end, + set = function(a,b)SV.db.SVAura.disableBlizzard = b;SV:StaticPopup_Show("RL_CLIENT")end }, auraGroups = { order = 4, @@ -271,7 +271,7 @@ SV.Options.args.SVAura = { order = 20, type = "group", name = L["Hyper Buffs"], - get = function(b)return SV.SVAura.db.hyperBuffs[b[#b]]end, + get = function(b)return SV.db.SVAura.hyperBuffs[b[#b]]end, set = function(a,b)MOD:ChangeDBVar(b,a[#a],"hyperBuffs");MOD:ToggleConsolidatedBuffs();MAP:ReLoad();MOD:UpdateAuraHeader(SVUI_PlayerBuffs, "buffs")end, args = { enable = { @@ -279,14 +279,14 @@ SV.Options.args.SVAura = { type = "toggle", name = L["Enable"], desc = L["Display the consolidated buffs bar."], - disabled = function()return not SV.SVMap.db.enable end, + disabled = function()return not SV.db.SVMap.enable end, }, filter = { order = 2, name = L["Filter Hyper"], desc = L["Only show consolidated icons on the consolidated bar that your class/spec is interested in. This is useful for raid leading."], type = "toggle", - disabled = function()return not SV.SVAura.db.hyperBuffs.enable end, + disabled = function()return not SV.db.SVAura.hyperBuffs.enable end, } } }, @@ -294,7 +294,7 @@ SV.Options.args.SVAura = { order = 30, type = "group", name = L["Buffs"], - get = function(b)return SV.SVAura.db.buffs[b[#b]]end, + get = function(b)return SV.db.SVAura.buffs[b[#b]]end, set = function(a,b)MOD:ChangeDBVar(b,a[#a],"buffs");MOD:UpdateAuraHeader(SVUI_PlayerBuffs, "buffs")end, args = auraOptionsTemplate }, @@ -302,7 +302,7 @@ SV.Options.args.SVAura = { order = 40, type = "group", name = L["Debuffs"], - get = function(b)return SV.SVAura.db.debuffs[b[#b]]end, + get = function(b)return SV.db.SVAura.debuffs[b[#b]]end, set = function(a,b)MOD:ChangeDBVar(b,a[#a],"debuffs");MOD:UpdateAuraHeader(SVUI_PlayerDebuffs, "debuffs")end, args = auraOptionsTemplate } diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua index d0aacd2..a74d4a7 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua @@ -45,7 +45,7 @@ SV.Options.args.SVBag = { type = 'group', name = L['Bags'], childGroups = "tab", - get = function(a)return SV.SVBag.db[a[#a]]end, + get = function(a)return SV.db.SVBag[a[#a]]end, set = function(a,b)MOD:ChangeDBVar(b,a[#a]) end, args = { intro = { @@ -58,8 +58,8 @@ SV.Options.args.SVBag = { type = "toggle", name = L["Enable"], desc = L["Enable/Disable the all-in-one bag."], - get = function(a)return SV.SVBag.db.enable end, - set = function(a,b)SV.SVBag.db.enable = b;SV:StaticPopup_Show("RL_CLIENT")end + get = function(a)return SV.db.SVBag.enable end, + set = function(a,b)SV.db.SVBag.enable = b;SV:StaticPopup_Show("RL_CLIENT")end }, bagGroups={ order = 3, @@ -72,7 +72,7 @@ SV.Options.args.SVBag = { type = "group", guiInline = true, name = L["General"], - disabled = function()return not SV.SVBag.db.enable end, + disabled = function()return not SV.db.SVBag.enable end, args = { bagSize = { order = 1, @@ -109,7 +109,7 @@ SV.Options.args.SVBag = { max = 700, step = 1, set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout()end, - disabled = function()return SV.SVBag.db.alignToChat end + disabled = function()return SV.db.SVBag.alignToChat end }, bankWidth = { order = 5, @@ -120,7 +120,7 @@ SV.Options.args.SVBag = { max = 700, step = 1, set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout(true)end, - disabled = function()return SV.SVBag.db.alignToChat end + disabled = function()return SV.db.SVBag.alignToChat end }, currencyFormat = { order = 6, @@ -147,7 +147,7 @@ SV.Options.args.SVBag = { type = "input", width = "full", multiline = true, - set = function(a,b) SV.SVBag.db[a[#a]] = b end + set = function(a,b) SV.db.SVBag[a[#a]] = b end } } }, @@ -156,7 +156,7 @@ SV.Options.args.SVBag = { type = "group", guiInline = true, name = L["Bag/Bank Positioning"], - disabled = function()return not SV.SVBag.db.enable end, + disabled = function()return not SV.db.SVBag.enable end, args = { alignToChat = { order = 1, @@ -170,9 +170,9 @@ SV.Options.args.SVBag = { type = "group", name = L["Bag Position"], guiInline = true, - get = function(key) return SV.SVBag.db.bags[key[#key]] end, + get = function(key) return SV.db.SVBag.bags[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], "bags"); MOD:ModifyBags() end, - disabled = function() return not SV.SVBag.db.enable end, + disabled = function() return not SV.db.SVBag.enable end, args = { point = { order = 1, @@ -205,9 +205,9 @@ SV.Options.args.SVBag = { type = "group", name = L["Bank Position"], guiInline = true, - get = function(key) return SV.SVBag.db.bank[key[#key]] end, + get = function(key) return SV.db.SVBag.bank[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], "bank"); MOD:ModifyBags() end, - disabled = function() return not SV.SVBag.db.enable end, + disabled = function() return not SV.db.SVBag.enable end, args = { point = { order = 1, @@ -243,7 +243,7 @@ SV.Options.args.SVBag = { type = "group", name = L["Bag-Bar"], guiInline = true, - get = function(key) return SV.SVBag.db.bagBar[key[#key]] end, + get = function(key) return SV.db.SVBag.bagBar[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], "bagBar"); MOD:ModifyBagBar() end, args={ enable = { @@ -251,7 +251,7 @@ SV.Options.args.SVBag = { type = "toggle", name = L["Enable"], desc = L["Enable/Disable the Bag-Bar."], - get = function() return SV.SVBag.db.bagBar.enable end, + get = function() return SV.db.SVBag.bagBar.enable end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], "bagBar"); SV:StaticPopup_Show("RL_CLIENT")end }, mouseover = { diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua index 2e39c38..6e07bca 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua @@ -49,9 +49,9 @@ local function BarConfigLoader() type = "group", order = (d + 10), guiInline = false, - disabled = function()return not SV.SVBar.db.enable end, + disabled = function()return not SV.db.SVBar.enable end, get = function(key) - return SV.SVBar.db["Bar"..d][key[#key]] + return SV.db.SVBar["Bar"..d][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], "Bar"..d); @@ -67,14 +67,14 @@ local function BarConfigLoader() order = 2, name = L["Background"], type = "toggle", - disabled = function()return not SV.SVBar.db["Bar"..d].enable end, + disabled = function()return not SV.db.SVBar["Bar"..d].enable end, }, mouseover = { order = 3, name = L["Mouse Over"], desc = L["The frame is not shown unless you mouse over the frame."], type = "toggle", - disabled = function()return not SV.SVBar.db["Bar"..d].enable end, + disabled = function()return not SV.db.SVBar["Bar"..d].enable end, }, restorePosition = { order = 4, @@ -86,14 +86,14 @@ local function BarConfigLoader() SV:ResetMovables("Bar "..d) MOD:RefreshBar("Bar"..d) end, - disabled = function()return not SV.SVBar.db["Bar"..d].enable end, + disabled = function()return not SV.db.SVBar["Bar"..d].enable end, }, adjustGroup = { name = L["Bar Adjustments"], type = "group", order = 5, guiInline = true, - disabled = function()return not SV.SVBar.db["Bar"..d].enable end, + disabled = function()return not SV.db.SVBar["Bar"..d].enable end, args = { point = { order = 1, @@ -154,16 +154,16 @@ local function BarConfigLoader() type = "group", order = 6, guiInline = true, - disabled = function()return not SV.SVBar.db["Bar"..d].enable end, + disabled = function()return not SV.db.SVBar["Bar"..d].enable end, args = { useCustomPaging = { order = 1, type = "toggle", name = L["Enable"], desc = L["Allow the use of custom paging for this bar"], - get = function()return SV.SVBar.db["Bar"..d].useCustomPaging end, + get = function()return SV.db.SVBar["Bar"..d].useCustomPaging end, set = function(e, f) - SV.SVBar.db["Bar"..d].useCustomPaging = f; + SV.db.SVBar["Bar"..d].useCustomPaging = f; MOD.db["Bar"..d].useCustomPaging = f; MOD:UpdateBarPagingDefaults(); MOD:RefreshBar("Bar"..d) @@ -186,23 +186,23 @@ local function BarConfigLoader() width = "full", name = L["Paging"], desc = L["|cffFF0000ADVANCED:|r Set the paging attributes for this bar"], - get = function(e)return SV.SVBar.db["Bar"..d].customPaging[SV.class] end, + get = function(e)return SV.db.SVBar["Bar"..d].customPaging[SV.class] end, set = function(e, f) - SV.SVBar.db["Bar"..d].customPaging[SV.class] = f; + SV.db.SVBar["Bar"..d].customPaging[SV.class] = f; MOD.db["Bar"..d].customPaging[SV.class] = f; MOD:UpdateBarPagingDefaults(); MOD:RefreshBar("Bar"..d) end, - disabled = function()return not SV.SVBar.db["Bar"..d].useCustomPaging end, + disabled = function()return not SV.db.SVBar["Bar"..d].useCustomPaging end, }, useCustomVisibility = { order = 4, type = "toggle", name = L["Enable"], desc = L["Allow the use of custom paging for this bar"], - get = function()return SV.SVBar.db["Bar"..d].useCustomVisibility end, + get = function()return SV.db.SVBar["Bar"..d].useCustomVisibility end, set = function(e, f) - SV.SVBar.db["Bar"..d].useCustomVisibility = f; + SV.db.SVBar["Bar"..d].useCustomVisibility = f; MOD.db["Bar"..d].useCustomVisibility = f; MOD:UpdateBarPagingDefaults(); MOD:RefreshBar("Bar"..d) @@ -225,14 +225,14 @@ local function BarConfigLoader() width = "full", name = L["Visibility"], desc = L["|cffFF0000ADVANCED:|r Set the visibility attributes for this bar"], - get = function(e)return SV.SVBar.db["Bar"..d].customVisibility end, + get = function(e)return SV.db.SVBar["Bar"..d].customVisibility end, set = function(e, f) - SV.SVBar.db["Bar"..d].customVisibility = f; + SV.db.SVBar["Bar"..d].customVisibility = f; MOD.db["Bar"..d].customVisibility = f; MOD:UpdateBarPagingDefaults(); MOD:RefreshBar("Bar"..d) end, - disabled = function()return not SV.SVBar.db["Bar"..d].useCustomVisibility end, + disabled = function()return not SV.db.SVBar["Bar"..d].useCustomVisibility end, }, } @@ -247,9 +247,9 @@ local function BarConfigLoader() type = "group", order = 100, guiInline = false, - disabled = function()return not SV.SVBar.db.enable end, + disabled = function()return not SV.db.SVBar.enable end, get = function(key) - return SV.SVBar.db["Micro"][key[#key]] + return SV.db.SVBar["Micro"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], "Micro"); @@ -265,7 +265,7 @@ local function BarConfigLoader() order = 2, name = L["Mouse Over"], desc = L["The frame is not shown unless you mouse over the frame."], - disabled = function()return not SV.SVBar.db["Micro"].enable end, + disabled = function()return not SV.db.SVBar["Micro"].enable end, type = "toggle" }, buttonsize = { @@ -276,7 +276,7 @@ local function BarConfigLoader() min = 15, max = 60, step = 1, - disabled = function()return not SV.SVBar.db["Micro"].enable end, + disabled = function()return not SV.db.SVBar["Micro"].enable end, }, buttonspacing = { order = 4, @@ -286,7 +286,7 @@ local function BarConfigLoader() min = 1, max = 10, step = 1, - disabled = function()return not SV.SVBar.db["Micro"].enable end, + disabled = function()return not SV.db.SVBar["Micro"].enable end, }, } }; @@ -297,8 +297,8 @@ local function BarConfigLoader() type = "group", order = 200, guiInline = false, - disabled = function()return not SV.SVBar.db.enable end, - get = function(e)return SV.SVBar.db["Pet"][e[#e]]end, + disabled = function()return not SV.db.SVBar.enable end, + get = function(e)return SV.db.SVBar["Pet"][e[#e]]end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], "Pet"); MOD:RefreshBar("Pet") @@ -313,14 +313,14 @@ local function BarConfigLoader() order = 2, name = L["Background"], type = "toggle", - disabled = function()return not SV.SVBar.db["Pet"].enable end, + disabled = function()return not SV.db.SVBar["Pet"].enable end, }, mouseover = { order = 3, name = L["Mouse Over"], desc = L["The frame is not shown unless you mouse over the frame."], type = "toggle", - disabled = function()return not SV.SVBar.db["Pet"].enable end, + disabled = function()return not SV.db.SVBar["Pet"].enable end, }, restorePosition = { order = 4, @@ -332,14 +332,14 @@ local function BarConfigLoader() SV:ResetMovables("Pet Bar") MOD:RefreshBar("Pet") end, - disabled = function()return not SV.SVBar.db["Pet"].enable end, + disabled = function()return not SV.db.SVBar["Pet"].enable end, }, adjustGroup = { name = L["Bar Adjustments"], type = "group", order = 5, guiInline = true, - disabled = function()return not SV.SVBar.db["Pet"].enable end, + disabled = function()return not SV.db.SVBar["Pet"].enable end, args = { point = { order = 1, @@ -374,7 +374,7 @@ local function BarConfigLoader() min = 15, max = 60, step = 1, - disabled = function()return not SV.SVBar.db.enable end + disabled = function()return not SV.db.SVBar.enable end }, buttonspacing = { order = 5, @@ -384,7 +384,7 @@ local function BarConfigLoader() min = 1, max = 10, step = 1, - disabled = function()return not SV.SVBar.db.enable end + disabled = function()return not SV.db.SVBar.enable end }, alpha = { order = 6, @@ -408,9 +408,9 @@ local function BarConfigLoader() type = "toggle", name = L["Enable"], desc = L["Allow the use of custom paging for this bar"], - get = function()return SV.SVBar.db["Pet"].useCustomVisibility end, + get = function()return SV.db.SVBar["Pet"].useCustomVisibility end, set = function(e,f) - SV.SVBar.db["Pet"].useCustomVisibility = f; + SV.db.SVBar["Pet"].useCustomVisibility = f; MOD.db["Pet"].useCustomVisibility = f; MOD:RefreshBar("Pet") end @@ -431,13 +431,13 @@ local function BarConfigLoader() width = "full", name = L["Visibility"], desc = L["|cffFF0000ADVANCED:|r Set the visibility attributes for this bar"], - get = function(e)return SV.SVBar.db["Pet"].customVisibility end, + get = function(e)return SV.db.SVBar["Pet"].customVisibility end, set = function(e,f) - SV.SVBar.db["Pet"].customVisibility = f; + SV.db.SVBar["Pet"].customVisibility = f; MOD.db["Pet"].customVisibility = f; MOD:RefreshBar("Pet") end, - disabled = function()return not SV.SVBar.db["Pet"].useCustomVisibility end, + disabled = function()return not SV.db.SVBar["Pet"].useCustomVisibility end, }, } } @@ -450,8 +450,8 @@ local function BarConfigLoader() type = "group", order = 300, guiInline = false, - disabled = function()return not SV.SVBar.db.enable end, - get = function(e)return SV.SVBar.db["Stance"][e[#e]]end, + disabled = function()return not SV.db.SVBar.enable end, + get = function(e)return SV.db.SVBar["Stance"][e[#e]]end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], "Stance"); MOD:RefreshBar("Stance") @@ -466,14 +466,14 @@ local function BarConfigLoader() order = 2, name = L["Background"], type = "toggle", - disabled = function()return not SV.SVBar.db["Stance"].enable end, + disabled = function()return not SV.db.SVBar["Stance"].enable end, }, mouseover = { order = 3, name = L["Mouse Over"], desc = L["The frame is not shown unless you mouse over the frame."], type = "toggle", - disabled = function()return not SV.SVBar.db["Stance"].enable end, + disabled = function()return not SV.db.SVBar["Stance"].enable end, }, restorePosition = { order = 4, @@ -485,14 +485,14 @@ local function BarConfigLoader() SV:ResetMovables("Stance Bar") MOD:RefreshBar("Stance") end, - disabled = function()return not SV.SVBar.db["Stance"].enable end, + disabled = function()return not SV.db.SVBar["Stance"].enable end, }, adjustGroup = { name = L["Bar Adjustments"], type = "group", order = 5, guiInline = true, - disabled = function()return not SV.SVBar.db["Stance"].enable end, + disabled = function()return not SV.db.SVBar["Stance"].enable end, args = { point = { order = 1, @@ -553,7 +553,7 @@ local function BarConfigLoader() type = "group", order = 6, guiInline = true, - disabled = function()return not SV.SVBar.db["Stance"].enable end, + disabled = function()return not SV.db.SVBar["Stance"].enable end, args = { style = { order = 1, @@ -580,9 +580,9 @@ local function BarConfigLoader() type = "toggle", name = L["Enable"], desc = L["Allow the use of custom paging for this bar"], - get = function()return SV.SVBar.db["Stance"].useCustomVisibility end, + get = function()return SV.db.SVBar["Stance"].useCustomVisibility end, set = function(e,f) - SV.SVBar.db["Stance"].useCustomVisibility = f; + SV.db.SVBar["Stance"].useCustomVisibility = f; MOD.db["Stance"].useCustomVisibility = f; MOD:RefreshBar("Stance") end @@ -603,13 +603,13 @@ local function BarConfigLoader() width = "full", name = L["Visibility"], desc = L["|cffFF0000ADVANCED:|r Set the visibility attributes for this bar"], - get = function(e)return SV.SVBar.db["Stance"].customVisibility end, + get = function(e)return SV.db.SVBar["Stance"].customVisibility end, set = function(e,f) - SV.SVBar.db["Stance"].customVisibility = f; + SV.db.SVBar["Stance"].customVisibility = f; MOD.db["Stance"].customVisibility = f; MOD:RefreshBar("Stance") end, - disabled = function()return not SV.SVBar.db["Stance"].useCustomVisibility end, + disabled = function()return not SV.db.SVBar["Stance"].useCustomVisibility end, }, } } @@ -622,7 +622,7 @@ SV.Options.args.SVBar = { name = L["ActionBars"], childGroups = "tab", get = function(key) - return SV.SVBar.db[key[#key]] + return SV.db.SVBar[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -633,15 +633,15 @@ SV.Options.args.SVBar = { order = 1, type = "toggle", name = L["Enable"], - get = function(e)return SV.SVBar.db[e[#e]]end, - set = function(e, f)SV.SVBar.db[e[#e]] = f;SV:StaticPopup_Show("RL_CLIENT")end + get = function(e)return SV.db.SVBar[e[#e]]end, + set = function(e, f)SV.db.SVBar[e[#e]] = f;SV:StaticPopup_Show("RL_CLIENT")end }, barGroup = { order = 2, type = "group", name = L["Bar Options"], childGroups = "tree", - disabled = function()return not SV.SVBar.db.enable end, + disabled = function()return not SV.db.SVBar.enable end, args = { commonGroup = { order = 1, @@ -691,11 +691,11 @@ SV.Options.args.SVBar = { desc = L["Color of the actionbutton when out of range."], hasAlpha = true, get = function(key) - local color = SV.SVBar.db[key[#key]] + local color = SV.db.SVBar[key[#key]] return color[1], color[2], color[3], color[4] end, set = function(key, rValue, gValue, bValue, aValue) - SV.SVBar.db[key[#key]] = {rValue, gValue, bValue, aValue} + SV.db.SVBar[key[#key]] = {rValue, gValue, bValue, aValue} MOD:RefreshActionBars() end, }, @@ -706,11 +706,11 @@ SV.Options.args.SVBar = { desc = L["Color of the actionbutton when out of power (Mana, Rage, Focus, Holy Power)."], hasAlpha = true, get = function(key) - local color = SV.SVBar.db[key[#key]] + local color = SV.db.SVBar[key[#key]] return color[1], color[2], color[3], color[4] end, set = function(key, rValue, gValue, bValue, aValue) - SV.SVBar.db[key[#key]] = {rValue, gValue, bValue, aValue} + SV.db.SVBar[key[#key]] = {rValue, gValue, bValue, aValue} MOD:RefreshActionBars() end, }, @@ -725,7 +725,7 @@ SV.Options.args.SVBar = { fontGroup = { order = 2, type = "group", - disabled = function()return not SV.SVBar.db.enable end, + disabled = function()return not SV.db.SVBar.enable end, name = L["Fonts"], args = { font = { diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/chat.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/chat.lua index a8d8443..2231dff 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/chat.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/chat.lua @@ -40,7 +40,7 @@ SET PACKAGE OPTIONS SV.Options.args.SVChat={ type = "group", name = L["Chat"], - get = function(a)return SV.SVChat.db[a[#a]]end, + get = function(a)return SV.db.SVChat[a[#a]]end, set = function(a,b)MOD:ChangeDBVar(b,a[#a]); end, args = { intro = { @@ -52,8 +52,8 @@ SV.Options.args.SVChat={ order = 2, type = "toggle", name = L["Enable"], - get = function(a)return SV.SVChat.db.enable end, - set = function(a,b)SV.SVChat.db.enable = b;SV:StaticPopup_Show("RL_CLIENT")end + get = function(a)return SV.db.SVChat.enable end, + set = function(a,b)SV.db.SVChat.enable = b;SV:StaticPopup_Show("RL_CLIENT")end }, common = { order = 3, @@ -113,7 +113,7 @@ SV.Options.args.SVChat={ type = "select", dialogControl = "LSM30_Sound", name = L["Whisper Alert"], - disabled = function()return not SV.SVChat.db.psst end, + disabled = function()return not SV.db.SVChat.psst end, values = AceGUIWidgetLSMlists.sound, set = function(a,b) MOD:ChangeDBVar(b,a[#a]) end }, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/henchmen.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/henchmen.lua index f0e49e2..d310f4e 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/henchmen.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/henchmen.lua @@ -40,7 +40,7 @@ SET PACKAGE OPTIONS SV.Options.args.SVHenchmen={ type = "group", name = L["Henchmen"], - get = function(a)return SV.SVHenchmen.db[a[#a]]end, + get = function(a)return SV.db.SVHenchmen[a[#a]]end, set = function(a,b)MOD:ChangeDBVar(b,a[#a]); end, args = { intro = { @@ -65,57 +65,57 @@ SV.Options.args.SVHenchmen={ order = 1, type = 'toggle', name = L["Enable Mail Helper"], - get = function(j)return SV.SVHenchmen.db.mailOpener end, - set = function(j,value)SV.SVHenchmen.db.mailOpener = value;MOD:ToggleMailMinions()end + get = function(j)return SV.db.SVHenchmen.mailOpener end, + set = function(j,value)SV.db.SVHenchmen.mailOpener = value;MOD:ToggleMailMinions()end }, autoAcceptInvite = { order = 2, name = L['Accept Invites'], desc = L['Automatically accept invites from guild/friends.'], type = 'toggle', - get = function(j)return SV.SVHenchmen.db.autoAcceptInvite end, - set = function(j,value)SV.SVHenchmen.db.autoAcceptInvite = value end + get = function(j)return SV.db.SVHenchmen.autoAcceptInvite end, + set = function(j,value)SV.db.SVHenchmen.autoAcceptInvite = value end }, vendorGrays = { order = 3, name = L['Vendor Grays'], desc = L['Automatically vendor gray items when visiting a vendor.'], type = 'toggle', - get = function(j)return SV.SVHenchmen.db.vendorGrays end, - set = function(j,value)SV.SVHenchmen.db.vendorGrays = value end + get = function(j)return SV.db.SVHenchmen.vendorGrays end, + set = function(j,value)SV.db.SVHenchmen.vendorGrays = value end }, autoRoll = { order = 4, name = L['Auto Greed/DE'], desc = L['Automatically select greed or disenchant (when available) on green quality items. This will only work if you are the max level.'], type = 'toggle', - get = function(j)return SV.SVHenchmen.db.autoRoll end, - set = function(j,value)SV.SVHenchmen.db.autoRoll = value end, - disabled = function()return not SV.SVOverride.db.lootRoll end + get = function(j)return SV.db.SVHenchmen.autoRoll end, + set = function(j,value)SV.db.SVHenchmen.autoRoll = value end, + disabled = function()return not SV.db.SVOverride.lootRoll end }, pvpautorelease = { order = 5, type = "toggle", name = L['PvP Autorelease'], desc = L['Automatically release body when killed inside a battleground.'], - get = function(j)return SV.SVHenchmen.db.pvpautorelease end, - set = function(j,value)SV.SVHenchmen.db.pvpautorelease = value;SV:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.SVHenchmen.pvpautorelease end, + set = function(j,value)SV.db.SVHenchmen.pvpautorelease = value;SV:StaticPopup_Show("RL_CLIENT")end }, autorepchange = { order = 6, type = "toggle", name = L['Track Reputation'], desc = L['Automatically change your watched faction on the reputation bar to the faction you got reputation points for.'], - get = function(j)return SV.SVHenchmen.db.autorepchange end, - set = function(j,value)SV.SVHenchmen.db.autorepchange = value end + get = function(j)return SV.db.SVHenchmen.autorepchange end, + set = function(j,value)SV.db.SVHenchmen.autorepchange = value end }, skipcinematics = { order = 7, type = "toggle", name = L['Skip Cinematics'], desc = L['Automatically skip any cinematic sequences.'], - get = function(j)return SV.SVHenchmen.db.skipcinematics end, - set = function(j,value)SV.SVHenchmen.db.skipcinematics = value;SV:StaticPopup_Show("RL_CLIENT") end + get = function(j)return SV.db.SVHenchmen.skipcinematics end, + set = function(j,value)SV.db.SVHenchmen.skipcinematics = value;SV:StaticPopup_Show("RL_CLIENT") end }, autoRepair = { order = 8, @@ -127,8 +127,8 @@ SV.Options.args.SVHenchmen={ ['GUILD'] = GUILD, ['PLAYER'] = PLAYER }, - get = function(j)return SV.SVHenchmen.db.autoRepair end, - set = function(j,value)SV.SVHenchmen.db.autoRepair = value end + get = function(j)return SV.db.SVHenchmen.autoRepair end, + set = function(j,value)SV.db.SVHenchmen.autoRepair = value end }, } }, @@ -144,39 +144,39 @@ SV.Options.args.SVHenchmen={ type = "toggle", name = L['Accept Quests'], desc = L['Automatically accepts quests as they are presented to you.'], - get = function(j)return SV.SVHenchmen.db.autoquestaccept end, - set = function(j,value) SV.SVHenchmen.db.autoquestaccept = value end + get = function(j)return SV.db.SVHenchmen.autoquestaccept end, + set = function(j,value) SV.db.SVHenchmen.autoquestaccept = value end }, autoquestcomplete = { order = 2, type = "toggle", name = L['Complete Quests'], desc = L['Automatically complete quests when possible.'], - get = function(j)return SV.SVHenchmen.db.autoquestcomplete end, - set = function(j,value)SV.SVHenchmen.db.autoquestcomplete = value end + get = function(j)return SV.db.SVHenchmen.autoquestcomplete end, + set = function(j,value)SV.db.SVHenchmen.autoquestcomplete = value end }, autoquestreward = { order = 3, type = "toggle", name = L['Select Quest Reward'], desc = L['Automatically select the quest reward with the highest vendor sell value.'], - get = function(j)return SV.SVHenchmen.db.autoquestreward end, - set = function(j,value)SV.SVHenchmen.db.autoquestreward = value end + get = function(j)return SV.db.SVHenchmen.autoquestreward end, + set = function(j,value)SV.db.SVHenchmen.autoquestreward = value end }, autodailyquests = { order = 4, type = "toggle", name = L['Only Automate Dailies'], desc = L['Force the auto accept functions to only respond to daily quests. NOTE: This does not apply to daily heroics for some reason.'], - get = function(j)return SV.SVHenchmen.db.autodailyquests end, - set = function(j,value)SV.SVHenchmen.db.autodailyquests = value end + get = function(j)return SV.db.SVHenchmen.autodailyquests end, + set = function(j,value)SV.db.SVHenchmen.autodailyquests = value end }, autopvpquests = { order = 5, type = "toggle", name = L['Accept PVP Quests'], - get = function(j)return SV.SVHenchmen.db.autopvpquests end, - set = function(j,value)SV.SVHenchmen.db.autopvpquests = value end + get = function(j)return SV.db.SVHenchmen.autopvpquests end, + set = function(j,value)SV.db.SVHenchmen.autopvpquests = value end }, } }, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua index ced9aa4..20a49b5 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua @@ -56,7 +56,7 @@ SV.Options.args.SVMap = { type = 'group', childGroups = "tree", name = L['Minimap'], - get = function(a)return SV.SVMap.db[a[#a]]end, + get = function(a)return SV.db.SVMap[a[#a]]end, set = function(a,b)MOD:ChangeDBVar(b,a[#a]);MOD:ReLoad()end, args={ intro={ @@ -69,8 +69,8 @@ SV.Options.args.SVMap = { order = 2, name = L['Enable'], desc = L['Enable/Disable the Custom Minimap.'], - get = function(a)return SV.SVMap.db.enable end, - set = function(a,b)SV.SVMap.db.enable=b; SV:StaticPopup_Show("RL_CLIENT") end + get = function(a)return SV.db.SVMap.enable end, + set = function(a,b)SV.db.SVMap.enable=b; SV:StaticPopup_Show("RL_CLIENT") end }, common = { order = 3, @@ -78,7 +78,7 @@ SV.Options.args.SVMap = { name = MINIMAP_LABEL, desc = L['General display settings'], guiInline = true, - disabled = function()return not SV.SVMap.db.enable end, + disabled = function()return not SV.db.SVMap.enable end, args = { size = { order = 1, @@ -128,7 +128,7 @@ SV.Options.args.SVMap = { name = "Labels and Info", desc = L['Configure various minimap texts'], guiInline = true, - disabled = function()return not SV.SVMap.db.enable end, + disabled = function()return not SV.db.SVMap.enable end, args = { locationText = { order = 1, @@ -157,9 +157,9 @@ SV.Options.args.SVMap = { order = 7, type = "group", name = "Minimap Buttons", - get = function(j)return SV.SVMap.db.minimapbar[j[#j]]end, + get = function(j)return SV.db.SVMap.minimapbar[j[#j]]end, guiInline = true, - disabled = function()return not SV.SVMap.db.enable end, + disabled = function()return not SV.db.SVMap.enable end, args = { enable = { order = 1, @@ -181,7 +181,7 @@ SV.Options.args.SVMap = { name = L['Button Bar Layout'], desc = L['Change settings for how the minimap buttons are styled.'], set = function(a,b)MOD:ChangeDBVar(b,a[#a],"minimapbar")MOD:UpdateMinimapButtonSettings()end, - disabled = function()return not SV.SVMap.db.minimapbar.enable end, + disabled = function()return not SV.db.SVMap.minimapbar.enable end, values = { ['NOANCHOR'] = L['No Anchor Bar'], ['HORIZONTAL'] = L['Horizontal Anchor Bar'], @@ -198,7 +198,7 @@ SV.Options.args.SVMap = { step = 1, width = "full", set = function(a,b)MOD:ChangeDBVar(b,a[#a],"minimapbar")MOD:UpdateMinimapButtonSettings()end, - disabled = function()return not SV.SVMap.db.minimapbar.enable or SV.SVMap.db.minimapbar.styleType == 'NOANCHOR'end + disabled = function()return not SV.db.SVMap.minimapbar.enable or SV.db.SVMap.minimapbar.styleType == 'NOANCHOR'end }, } }, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/mode.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/mode.lua index eddd0ea..68fcc2c 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/mode.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/mode.lua @@ -35,7 +35,7 @@ local MOD = SV.SVLaborer SV.Options.args.SVLaborer = { type = 'group', name = L['Laborer'], - get = function(key)return SV.SVLaborer.db[key[#key]]end, + get = function(key)return SV.db.SVLaborer[key[#key]]end, set = function(key, value)MOD:ChangeDBVar(value, key[#key]) end, args = { intro = { @@ -48,8 +48,8 @@ SV.Options.args.SVLaborer = { order = 2, name = L['Enable'], desc = L['Enable/Disable the Laborer dock.'], - get = function(key)return SV.SVLaborer.db[key[#key]]end, - set = function(key, value)SV.SVLaborer.db.enable = value;SV:StaticPopup_Show("RL_CLIENT")end + get = function(key)return SV.db.SVLaborer[key[#key]]end, + set = function(key, value)SV.db.SVLaborer.enable = value;SV:StaticPopup_Show("RL_CLIENT")end }, fontSize = { order = 3, @@ -72,7 +72,7 @@ SV.Options.args.SVLaborer = { order = 1, name = L['AutoEquip'], desc = L['Enable/Disable automatically equipping fishing gear.'], - get = function(key)return SV.SVLaborer.db.fishing[key[#key]]end, + get = function(key)return SV.db.SVLaborer.fishing[key[#key]]end, set = function(key, value)MOD:ChangeDBVar(value, key[#key], "fishing")end } } @@ -88,7 +88,7 @@ SV.Options.args.SVLaborer = { order = 1, name = L['AutoEquip'], desc = L['Enable/Disable automatically equipping cooking gear.'], - get = function(key)return SV.SVLaborer.db.cooking[key[#key]]end, + get = function(key)return SV.db.SVLaborer.cooking[key[#key]]end, set = function(key, value)MOD:ChangeDBVar(value, key[#key], "cooking")end } } @@ -98,8 +98,8 @@ SV.Options.args.SVLaborer = { type = "group", name = L["Farming Mode Settings"], guiInline = true, - get = function(key)return SV.SVLaborer.db.farming[key[#key]]end, - set = function(key, value)SV.SVLaborer.db.farming[key[#key]] = value end, + get = function(key)return SV.db.SVLaborer.farming[key[#key]]end, + set = function(key, value)SV.db.SVLaborer.farming[key[#key]] = value end, args = { buttonsize = { type = 'range', diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua index 10c0b15..f073303 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua @@ -139,16 +139,16 @@ SV.Options.args.SVPlate={ intro={order=1,type="description",name=L["NAMEPLATE_DESC"]}, enable={ order=2,type="toggle",name=L["Enable"], - get=function(d)return SV.SVPlate.db[d[#d]]end, - set=function(d,e)SV.SVPlate.db[d[#d]]=e;SV:StaticPopup_Show("RL_CLIENT")end, + get=function(d)return SV.db.SVPlate[d[#d]]end, + set=function(d,e)SV.db.SVPlate[d[#d]]=e;SV:StaticPopup_Show("RL_CLIENT")end, }, common = { order = 1, type = "group", name = L["General"], - get = function(d)return SV.SVPlate.db[d[#d]]end, + get = function(d)return SV.db.SVPlate[d[#d]]end, set = function(d,e)MOD:ChangeDBVar(e,d[#d]);MOD:UpdateAllPlates() end, - disabled = function()return not SV.SVPlate.db.enable end, + disabled = function()return not SV.db.SVPlate.enable end, args = { combatHide = { type = "toggle", @@ -231,7 +231,7 @@ SV.Options.args.SVPlate={ name = L["Reaction Coloring"], guiInline = true, get = function(key) - local color = SV.SVPlate.db.reactions[key[#key]] + local color = SV.db.SVPlate.reactions[key[#key]] if color then return color[1],color[2],color[3],color[4] end @@ -280,8 +280,8 @@ SV.Options.args.SVPlate={ type = "group", order = 2, name = L["Health Bar"], - disabled = function()return not SV.SVPlate.db.enable end, - get = function(d)return SV.SVPlate.db.healthBar[d[#d]]end, + disabled = function()return not SV.db.SVPlate.enable end, + get = function(d)return SV.db.SVPlate.healthBar[d[#d]]end, set = function(d,e)MOD:ChangeDBVar(e,d[#d],"healthBar");MOD:UpdateAllPlates()end, args = { width = { @@ -319,7 +319,7 @@ SV.Options.args.SVPlate={ type = "group", name = L["Fonts"], guiInline = true, - get = function(d)return SV.SVPlate.db.healthBar.text[d[#d]]end, + get = function(d)return SV.db.SVPlate.healthBar.text[d[#d]]end, set = function(d,e)MOD:ChangeDBVar(e,d[#d],"healthBar","text");MOD:UpdateAllPlates()end, args = { enable = { @@ -380,8 +380,8 @@ SV.Options.args.SVPlate={ type = "group", order = 3, name = L["Cast Bar"], - disabled = function()return not SV.SVPlate.db.enable end, - get = function(d)return SV.SVPlate.db.castBar[d[#d]]end, + disabled = function()return not SV.db.SVPlate.enable end, + get = function(d)return SV.db.SVPlate.castBar[d[#d]]end, set = function(d,e)MOD:ChangeDBVar(e,d[#d],"castBar");MOD:UpdateAllPlates()end, args = { height = { @@ -399,7 +399,7 @@ SV.Options.args.SVPlate={ name = L["Colors"], guiInline = true, get = function(key) - local color = SV.SVPlate.db.castBar[key[#key]] + local color = SV.db.SVPlate.castBar[key[#key]] if color then return color[1],color[2],color[3],color[4] end @@ -430,7 +430,7 @@ SV.Options.args.SVPlate={ type = "group", order = 4, name = L["Target Indicator"], - get = function(d)return SV.SVPlate.db.pointer[d[#d]]end, + get = function(d)return SV.db.SVPlate.pointer[d[#d]]end, set = function(d,e)MOD:ChangeDBVar(e,d[#d],"pointer");WorldFrame.elapsed = 3;MOD:UpdateAllPlates()end, args = { enable = { @@ -454,9 +454,9 @@ SV.Options.args.SVPlate={ type = "color", name = L["Color"], order = 3, - disabled = function()return SV.SVPlate.db.pointer.colorMatchHealthBar end, + disabled = function()return SV.db.SVPlate.pointer.colorMatchHealthBar end, get = function(key) - local color = SV.SVPlate.db.pointer[key[#key]] + local color = SV.db.SVPlate.pointer[key[#key]] if color then return color[1],color[2],color[3],color[4] end @@ -473,7 +473,7 @@ SV.Options.args.SVPlate={ type = "group", order = 5, name = L["Raid Icon"], - get = function(d)return SV.SVPlate.db.raidHealIcon[d[#d]]end, + get = function(d)return SV.db.SVPlate.raidHealIcon[d[#d]]end, set = function(d,e)MOD:ChangeDBVar(e,d[#d],"raidHealIcon")MOD:UpdateAllPlates()end, args = { attachTo = { @@ -513,7 +513,7 @@ SV.Options.args.SVPlate={ type = "group", order = 4, name = L["Auras"], - get = function(d)return SV.SVPlate.db.auras[d[#d]]end, + get = function(d)return SV.db.SVPlate.auras[d[#d]]end, set = function(d,e)MOD:ChangeDBVar(e,d[#d],"auras")MOD:UpdateAllPlates()end, args = { numAuras = { @@ -542,7 +542,7 @@ SV.Options.args.SVPlate={ name = L["Configure Selected Filter"], type = "execute", width = "full", - func = function()ns:SetToFilterConfig(SV.SVPlate.db.auras.additionalFilter)end + func = function()ns:SetToFilterConfig(SV.db.SVPlate.auras.additionalFilter)end }, fontGroup = { order = 100, @@ -585,7 +585,7 @@ SV.Options.args.SVPlate={ type = "group", order = 6, name = L["Threat"], - get = function(d)return SV.SVPlate.db.threat[d[#d]]end, + get = function(d)return SV.db.SVPlate.threat[d[#d]]end, set = function(d,e)MOD:ChangeDBVar(e,d[#d],"threat")MOD:UpdateAllPlates()end, args = { enable = { @@ -625,7 +625,7 @@ SV.Options.args.SVPlate={ name = L["Colors"], guiInline = true, get = function(key) - local color = SV.SVPlate.db.threat[key[#key]] + local color = SV.db.SVPlate.threat[key[#key]] if color then return color[1],color[2],color[3],color[4] end @@ -668,7 +668,7 @@ SV.Options.args.SVPlate={ type = "group", order = 200, name = L["Filters"], - disabled = function()return not SV.SVPlate.db.enable end, + disabled = function()return not SV.db.SVPlate.enable end, args = { addname = { type = "input", diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua index 25c0378..be127d2 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua @@ -40,7 +40,7 @@ SV.Options.args.SVStats = { type = "group", name = L["Statistics"], childGroups = "tab", - get = function(key) return SV.SVStats.db[key[#key]] end, + get = function(key) return SV.db.SVStats[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); MOD:Generate() end, args = { intro = { @@ -127,7 +127,7 @@ SV.Options.args.SVStats = { do local orderIncrement = 0; local statValues = MOD.StatListing - local configTable = SV.SVStats.db.panels; + local configTable = SV.db.SVStats.panels; local optionTable = SV.Options.args.SVStats.args.panels.args; for panelName, panelPositions in pairs(configTable)do @@ -149,7 +149,7 @@ do type = 'select', name = L[position] or upper(position), values = statValues, - get = function(key) return SV.SVStats.db.panels[panelName][key[#key]] end, + get = function(key) return SV.db.SVStats.panels[panelName][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], "panels", panelName); MOD:Generate() end } end diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua index 9b1902b..9461217 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua @@ -42,8 +42,8 @@ SV.Options.args.SVTip = { type = "group", name = L["Tooltip"], childGroups = "tab", - get = function(a)return SV.SVTip.db[a[#a]] end, - set = function(a, b)SV.SVTip.db[a[#a]] = b end, + get = function(a)return SV.db.SVTip[a[#a]] end, + set = function(a, b)SV.db.SVTip[a[#a]] = b end, args = { commonGroup = { order = 1, @@ -60,14 +60,14 @@ SV.Options.args.SVTip = { order = 2, type = "toggle", name = L["Enable"], - get = function(a)return SV.SVTip.db[a[#a]]end, - set = function(a, b)SV.SVTip.db[a[#a]] = b;SV:StaticPopup_Show("RL_CLIENT") end + get = function(a)return SV.db.SVTip[a[#a]]end, + set = function(a, b)SV.db.SVTip[a[#a]] = b;SV:StaticPopup_Show("RL_CLIENT") end }, common = { order = 3, type = "group", name = L["General"], - disabled = function() return not SV.SVTip.db.enable end, + disabled = function() return not SV.db.SVTip.enable end, args = { cursorAnchor = { order = 1, @@ -104,8 +104,8 @@ SV.Options.args.SVTip = { type = "toggle", name = L["Spell/Item IDs"], desc = L["Display the spell or item ID when mousing over a spell or item tooltip."], - get = function(a)return SV.SVTip.db.spellID end, - set = function(a, b)SV.SVTip.db.spellID = b;SV:StaticPopup_Show("RL_CLIENT") end, + get = function(a)return SV.db.SVTip.spellID end, + set = function(a, b)SV.db.SVTip.spellID = b;SV:StaticPopup_Show("RL_CLIENT") end, } } @@ -114,8 +114,8 @@ SV.Options.args.SVTip = { order=100, type="group", name=L["Visibility"], - get=function(a)return SV.SVTip.db.visibility[a[#a]]end, - set=function(a,b)SV.SVTip.db.visibility[a[#a]]=b end, + get=function(a)return SV.db.SVTip.visibility[a[#a]]end, + set=function(a,b)SV.db.SVTip.visibility[a[#a]]=b end, args={ combat={order=1,type='toggle',name=COMBAT,desc=L["Hide tooltip while in combat."]}, unitFrames={order=2,type='select',name=L['Unitframes'],desc=L["Don't display the tooltip when mousing over a unitframe."],values={['ALL']=L['Always Hide'],['NONE']=L['Never Hide'],['SHIFT']=SHIFT_KEY,['ALT']=ALT_KEY,['CTRL']=CTRL_KEY}} @@ -125,8 +125,8 @@ SV.Options.args.SVTip = { order=200, type="group", name=L["Health Bar"], - get=function(a)return SV.SVTip.db.healthBar[a[#a]]end, - set=function(a,b)SV.SVTip.db.healthBar[a[#a]]=b end, + get=function(a)return SV.db.SVTip.healthBar[a[#a]]end, + set=function(a,b)SV.db.SVTip.healthBar[a[#a]]=b end, args={ height = { order = 1, @@ -136,7 +136,7 @@ SV.Options.args.SVTip = { max = 15, step = 1, width = "full", - set = function(a,b)SV.SVTip.db.healthBar.height = b;GameTooltipStatusBar:Height(b)end + set = function(a,b)SV.db.SVTip.healthBar.height = b;GameTooltipStatusBar:Height(b)end }, fontGroup = { order = 2, @@ -148,7 +148,7 @@ SV.Options.args.SVTip = { order = 1, type = "toggle", name = L["Text"], - set = function(a,b)SV.SVTip.db.healthBar.text = b;if b then GameTooltipStatusBar.text:Show()else GameTooltipStatusBar.text:Hide()end end + set = function(a,b)SV.db.SVTip.healthBar.text = b;if b then GameTooltipStatusBar.text:Show()else GameTooltipStatusBar.text:Hide()end end }, font = { type = "select", @@ -157,7 +157,7 @@ SV.Options.args.SVTip = { width = "full", name = L["Font"], values = AceGUIWidgetLSMlists.font, - set = function(a,b)SV.SVTip.db.healthBar.font = b;GameTooltipStatusBar.text:SetFontTemplate(LSM:Fetch("font",SV.SVTip.db.healthBar.font), SV.SVTip.db.healthBar.fontSize,"OUTLINE")end + set = function(a,b)SV.db.SVTip.healthBar.font = b;GameTooltipStatusBar.text:SetFontTemplate(LSM:Fetch("font",SV.db.SVTip.healthBar.font), SV.db.SVTip.healthBar.fontSize,"OUTLINE")end }, fontSize = { order = 3, @@ -167,7 +167,7 @@ SV.Options.args.SVTip = { max = 22, step = 1, width = "full", - set = function(a,b)SV.SVTip.db.healthBar.fontSize = b;GameTooltipStatusBar.text:SetFontTemplate(LSM:Fetch("font",SV.SVTip.db.healthBar.font),SV.SVTip.db.healthBar.fontSize,"OUTLINE")end + set = function(a,b)SV.db.SVTip.healthBar.fontSize = b;GameTooltipStatusBar.text:SetFontTemplate(LSM:Fetch("font",SV.db.SVTip.healthBar.font),SV.db.SVTip.healthBar.fontSize,"OUTLINE")end } } } diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua index c481207..4e64969 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua @@ -63,7 +63,7 @@ function ns:SetCastbarConfigGroup(updateFunction, unitName, count) type = "group", name = L["Castbar"], get = function(key) - return SV.SVUnit.db[unitName]["castbar"][key[#key]] + return SV.db.SVUnit[unitName]["castbar"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "castbar") @@ -153,7 +153,7 @@ function ns:SetCastbarConfigGroup(updateFunction, unitName, count) name = L["Match Frame Width"], desc = "Set the castbar width to match its unitframe.", func = function() - SV.SVUnit.db[unitName]["castbar"]["width"] = SV.SVUnit.db[unitName]["width"] + SV.db.SVUnit[unitName]["castbar"]["width"] = SV.db.SVUnit[unitName]["width"] updateFunction(MOD, unitName, count) end }, @@ -193,28 +193,28 @@ function ns:SetCastbarConfigGroup(updateFunction, unitName, count) name = L["Custom Bar Color"], type = "color", get = function(key) - local color = SV.SVUnit.db[unitName]["castbar"]["castingColor"] + local color = SV.db.SVUnit[unitName]["castbar"]["castingColor"] return color[1], color[2], color[3], color[4] end, set = function(key, rValue, gValue, bValue) - SV.SVUnit.db[unitName]["castbar"]["castingColor"] = {rValue, gValue, bValue} + SV.db.SVUnit[unitName]["castbar"]["castingColor"] = {rValue, gValue, bValue} MOD:RefreshUnitFrames() end, - disabled = function() return not SV.SVUnit.db[unitName]["castbar"].useCustomColor end + disabled = function() return not SV.db.SVUnit[unitName]["castbar"].useCustomColor end }, sparkColor = { order = 3, name = L["Custom Spark Color"], type = "color", get = function(key) - local color = SV.SVUnit.db[unitName]["castbar"]["sparkColor"] + local color = SV.db.SVUnit[unitName]["castbar"]["sparkColor"] return color[1], color[2], color[3], color[4] end, set = function(key, rValue, gValue, bValue) - SV.SVUnit.db[unitName]["castbar"]["sparkColor"] = {rValue, gValue, bValue} + SV.db.SVUnit[unitName]["castbar"]["sparkColor"] = {rValue, gValue, bValue} MOD:RefreshUnitFrames() end, - disabled = function() return not SV.SVUnit.db[unitName]["castbar"].useCustomColor end + disabled = function() return not SV.db.SVUnit[unitName]["castbar"].useCustomColor end }, } }, @@ -257,7 +257,7 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam type = "group", name = auraType == "buffs" and L["Buffs"] or L["Debuffs"], get = function(key) - return SV.SVUnit.db[unitName][auraType][key[#key]] + return SV.db.SVUnit[unitName][auraType][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, auraType) @@ -337,9 +337,9 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam type = "toggle", name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display auras that are not yours."], - get = function(l)return SV.SVUnit.db[unitName][auraType].filterPlayer.friendly end, + get = function(l)return SV.db.SVUnit[unitName][auraType].filterPlayer.friendly end, set = function(l, m) - SV.SVUnit.db[unitName][auraType].filterPlayer.friendly = m; + SV.db.SVUnit[unitName][auraType].filterPlayer.friendly = m; updateFunction(MOD, unitName, count) end }, @@ -348,9 +348,9 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam type = "toggle", name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that are not yours."], - get = function(l)return SV.SVUnit.db[unitName][auraType].filterPlayer.enemy end, + get = function(l)return SV.db.SVUnit[unitName][auraType].filterPlayer.enemy end, set = function(l, m) - SV.SVUnit.db[unitName][auraType].filterPlayer.enemy = m; + SV.db.SVUnit[unitName][auraType].filterPlayer.enemy = m; updateFunction(MOD, unitName, count) end } @@ -367,16 +367,16 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam type = "toggle", name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display any auras found on the Blocked filter."], - get = function(l)return SV.SVUnit.db[unitName][auraType].filterBlocked.friendly end, - set = function(l, m)SV.SVUnit.db[unitName][auraType].filterBlocked.friendly = m;updateFunction(MOD, unitName, count)end + get = function(l)return SV.db.SVUnit[unitName][auraType].filterBlocked.friendly end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterBlocked.friendly = m;updateFunction(MOD, unitName, count)end }, enemy = { order = 3, type = "toggle", name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display any auras found on the Blocked filter."], - get = function(l)return SV.SVUnit.db[unitName][auraType].filterBlocked.enemy end, - set = function(l, m)SV.SVUnit.db[unitName][auraType].filterBlocked.enemy = m;updateFunction(MOD, unitName, count)end + get = function(l)return SV.db.SVUnit[unitName][auraType].filterBlocked.enemy end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterBlocked.enemy = m;updateFunction(MOD, unitName, count)end } } } @@ -391,16 +391,16 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam type = "toggle", name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["If no other filter options are being used then it will block anything not on the Allowed filter."], - get = function(l)return SV.SVUnit.db[unitName][auraType].filterAllowed.friendly end, - set = function(l, m)SV.SVUnit.db[unitName][auraType].filterAllowed.friendly = m;updateFunction(MOD, unitName, count)end + get = function(l)return SV.db.SVUnit[unitName][auraType].filterAllowed.friendly end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterAllowed.friendly = m;updateFunction(MOD, unitName, count)end }, enemy = { order = 3, type = "toggle", name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["If no other filter options are being used then it will block anything not on the Allowed filter."], - get = function(l)return SV.SVUnit.db[unitName][auraType].filterAllowed.enemy end, - set = function(l, m)SV.SVUnit.db[unitName][auraType].filterAllowed.enemy = m;updateFunction(MOD, unitName, count)end + get = function(l)return SV.db.SVUnit[unitName][auraType].filterAllowed.enemy end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterAllowed.enemy = m;updateFunction(MOD, unitName, count)end } } } @@ -415,16 +415,16 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam type = "toggle", name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display auras that have no duration."], - get = function(l)return SV.SVUnit.db[unitName][auraType].filterInfinite.friendly end, - set = function(l, m)SV.SVUnit.db[unitName][auraType].filterInfinite.friendly = m;updateFunction(MOD, unitName, count)end + get = function(l)return SV.db.SVUnit[unitName][auraType].filterInfinite.friendly end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterInfinite.friendly = m;updateFunction(MOD, unitName, count)end }, enemy = { order = 3, type = "toggle", name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that have no duration."], - get = function(l)return SV.SVUnit.db[unitName][auraType].filterInfinite.enemy end, - set = function(l, m)SV.SVUnit.db[unitName][auraType].filterInfinite.enemy = m;updateFunction(MOD, unitName, count)end + get = function(l)return SV.db.SVUnit[unitName][auraType].filterInfinite.enemy end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterInfinite.enemy = m;updateFunction(MOD, unitName, count)end } } } @@ -439,16 +439,16 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam type = "toggle", name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."], - get = function(l)return SV.SVUnit.db[unitName][auraType].filterDispellable.friendly end, - set = function(l, m)SV.SVUnit.db[unitName][auraType].filterDispellable.friendly = m;updateFunction(MOD, unitName, count)end + get = function(l)return SV.db.SVUnit[unitName][auraType].filterDispellable.friendly end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterDispellable.friendly = m;updateFunction(MOD, unitName, count)end }, enemy = { order = 3, type = "toggle", name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."], - get = function(l)return SV.SVUnit.db[unitName][auraType].filterDispellable.enemy end, - set = function(l, m)SV.SVUnit.db[unitName][auraType].filterDispellable.enemy = m;updateFunction(MOD, unitName, count)end + get = function(l)return SV.db.SVUnit[unitName][auraType].filterDispellable.enemy end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterDispellable.enemy = m;updateFunction(MOD, unitName, count)end } } } @@ -464,15 +464,15 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam type = "toggle", name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display raid (consolidated) buffs."], - get = function(l)return SV.SVUnit.db[unitName][auraType].filterRaid.friendly end, - set = function(l, m)SV.SVUnit.db[unitName][auraType].filterRaid.friendly = m;updateFunction(MOD, unitName, count)end + get = function(l)return SV.db.SVUnit[unitName][auraType].filterRaid.friendly end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterRaid.friendly = m;updateFunction(MOD, unitName, count)end }, enemy = { order = 3, type = "toggle", name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display raid (consolidated) buffs."], - get = function(l)return SV.SVUnit.db[unitName][auraType].filterRaid.enemy end, - set = function(l, m)SV.SVUnit.db[unitName][auraType].filterRaid.enemy = m;updateFunction(MOD, unitName, count)end + get = function(l)return SV.db.SVUnit[unitName][auraType].filterRaid.enemy end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterRaid.enemy = m;updateFunction(MOD, unitName, count)end } } } @@ -503,11 +503,11 @@ function ns:SetMiscConfigGroup(partyRaid, updateFunction, unitName, count) set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); local tag = "" - local pc = SV.SVUnit.db[unitName]["formatting"].threat and "[threat]" or ""; + local pc = SV.db.SVUnit[unitName]["formatting"].threat and "[threat]" or ""; tag = tag .. pc; - local ap = SV.SVUnit.db[unitName]["formatting"].absorbs and "[absorbs]" or ""; + local ap = SV.db.SVUnit[unitName]["formatting"].absorbs and "[absorbs]" or ""; tag = tag .. ap; - local cp = SV.SVUnit.db[unitName]["formatting"].incoming and "[incoming]" or ""; + local cp = SV.db.SVUnit[unitName]["formatting"].incoming and "[incoming]" or ""; tag = tag .. cp; MOD:ChangeDBVar(tag, "tags", unitName, "misc"); @@ -518,19 +518,19 @@ function ns:SetMiscConfigGroup(partyRaid, updateFunction, unitName, count) order = 1, name = L["Show Incoming Heals"], type = "toggle", - get = function() return SV.SVUnit.db[unitName]["formatting"].incoming end, + get = function() return SV.db.SVUnit[unitName]["formatting"].incoming end, }, absorbs = { order = 2, name = L["Show Absorbs"], type = "toggle", - get = function() return SV.SVUnit.db[unitName]["formatting"].absorbs end, + get = function() return SV.db.SVUnit[unitName]["formatting"].absorbs end, }, threat = { order = 3, name = L["Show Threat"], type = "toggle", - get = function() return SV.SVUnit.db[unitName]["formatting"].threat end, + get = function() return SV.db.SVUnit[unitName]["formatting"].threat end, }, xOffset = { order = 4, @@ -541,7 +541,7 @@ function ns:SetMiscConfigGroup(partyRaid, updateFunction, unitName, count) min = -300, max = 300, step = 1, - get = function() return SV.SVUnit.db[unitName]["formatting"].xOffset end, + get = function() return SV.db.SVUnit[unitName]["formatting"].xOffset end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); end, }, yOffset = { @@ -553,7 +553,7 @@ function ns:SetMiscConfigGroup(partyRaid, updateFunction, unitName, count) min = -300, max = 300, step = 1, - get = function() return SV.SVUnit.db[unitName]["formatting"].yOffset end, + get = function() return SV.db.SVUnit[unitName]["formatting"].yOffset end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); end, }, } @@ -567,7 +567,7 @@ function ns:SetHealthConfigGroup(partyRaid, updateFunction, unitName, count) type = "group", name = L["Health"], get = function(key) - return SV.SVUnit.db[unitName]["health"][key[#key]] + return SV.db.SVUnit[unitName]["health"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "health"); @@ -601,10 +601,10 @@ function ns:SetHealthConfigGroup(partyRaid, updateFunction, unitName, count) set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); local tag = "" - local pc = SV.SVUnit.db[unitName]["formatting"].health_colored and "[health:color]" or ""; + local pc = SV.db.SVUnit[unitName]["formatting"].health_colored and "[health:color]" or ""; tag = tag .. pc; - local pt = SV.SVUnit.db[unitName]["formatting"].health_type; + local pt = SV.db.SVUnit[unitName]["formatting"].health_type; if(pt and pt ~= "none") then tag = tag .. "[health:" .. pt .. "]" end @@ -617,14 +617,14 @@ function ns:SetHealthConfigGroup(partyRaid, updateFunction, unitName, count) order = 1, name = L["Colored"], type = "toggle", - get = function() return SV.SVUnit.db[unitName]["formatting"].health_colored end, + get = function() return SV.db.SVUnit[unitName]["formatting"].health_colored end, desc = L["Use various name coloring methods"] }, health_type = { order = 3, name = L["Text Format"], type = "select", - get = function() return SV.SVUnit.db[unitName]["formatting"].health_type end, + get = function() return SV.db.SVUnit[unitName]["formatting"].health_type end, desc = L["TEXT_FORMAT_DESC"], values = textStringFormats, } @@ -656,7 +656,7 @@ function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) type = "group", name = L["Power"], get = function(key) - return SV.SVUnit.db[unitName]["power"][key[#key]] + return SV.db.SVUnit[unitName]["power"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "power"); @@ -699,14 +699,14 @@ function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); local tag = "" - local cp = SV.SVUnit.db[unitName]["formatting"].power_class and "[classpower]" or ""; + local cp = SV.db.SVUnit[unitName]["formatting"].power_class and "[classpower]" or ""; tag = tag .. cp; - local ap = SV.SVUnit.db[unitName]["formatting"].power_alt and "[altpower]" or ""; + local ap = SV.db.SVUnit[unitName]["formatting"].power_alt and "[altpower]" or ""; tag = tag .. ap; - local pc = SV.SVUnit.db[unitName]["formatting"].power_colored and "[power:color]" or ""; + local pc = SV.db.SVUnit[unitName]["formatting"].power_colored and "[power:color]" or ""; tag = tag .. pc; - local pt = SV.SVUnit.db[unitName]["formatting"].power_type; + local pt = SV.db.SVUnit[unitName]["formatting"].power_type; if(pt and pt ~= "none") then tag = tag .. "[power:" .. pt .. "]" end @@ -719,26 +719,26 @@ function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) order = 1, name = L["Colored"], type = "toggle", - get = function() return SV.SVUnit.db[unitName]["formatting"].power_colored end, + get = function() return SV.db.SVUnit[unitName]["formatting"].power_colored end, desc = L["Use various name coloring methods"] }, power_class = { order = 1, name = L["Show Class Power"], type = "toggle", - get = function() return SV.SVUnit.db[unitName]["formatting"].power_class end, + get = function() return SV.db.SVUnit[unitName]["formatting"].power_class end, }, power_alt = { order = 1, name = L["Show Alt Power"], type = "toggle", - get = function() return SV.SVUnit.db[unitName]["formatting"].power_alt end, + get = function() return SV.db.SVUnit[unitName]["formatting"].power_alt end, }, power_type = { order = 3, name = L["Text Format"], type = "select", - get = function() return SV.SVUnit.db[unitName]["formatting"].power_type end, + get = function() return SV.db.SVUnit[unitName]["formatting"].power_type end, desc = L["TEXT_FORMAT_DESC"], values = textStringFormats, } @@ -753,7 +753,7 @@ function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) order = 2, name = L["Attach Text to Power"], get = function(key) - return SV.SVUnit.db[unitName]["power"].attachTextToPower + return SV.db.SVUnit[unitName]["power"].attachTextToPower end, set = function(key, value) MOD:ChangeDBVar(value, "attachTextToPower", unitName, "power"); @@ -771,7 +771,7 @@ function ns:SetNameConfigGroup(updateFunction, unitName, count) type = "group", name = L["Name"], get = function(key) - return SV.SVUnit.db[unitName]["name"][key[#key]] + return SV.db.SVUnit[unitName]["name"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "name"); @@ -858,11 +858,11 @@ function ns:SetNameConfigGroup(updateFunction, unitName, count) set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); local tag = "" - tag = SV.SVUnit.db[unitName]["formatting"].name_colored and "[name:color]" or ""; + tag = SV.db.SVUnit[unitName]["formatting"].name_colored and "[name:color]" or ""; - local length = SV.SVUnit.db[unitName]["formatting"].name_length; + local length = SV.db.SVUnit[unitName]["formatting"].name_length; tag = tag .. "[name:" .. length .. "]" - local lvl = SV.SVUnit.db[unitName]["formatting"].smartlevel and "[smartlevel]" or ""; + local lvl = SV.db.SVUnit[unitName]["formatting"].smartlevel and "[smartlevel]" or ""; tag = tag .. lvl MOD:ChangeDBVar(tag, "tags", unitName, "name"); @@ -873,14 +873,14 @@ function ns:SetNameConfigGroup(updateFunction, unitName, count) order = 1, name = L["Colored"], type = "toggle", - get = function() return SV.SVUnit.db[unitName]["formatting"].name_colored end, + get = function() return SV.db.SVUnit[unitName]["formatting"].name_colored end, desc = L["Use various name coloring methods"] }, smartlevel = { order = 2, name = L["Unit Level"], type = "toggle", - get = function() return SV.SVUnit.db[unitName]["formatting"].smartlevel end, + get = function() return SV.db.SVUnit[unitName]["formatting"].smartlevel end, desc = L["Display the units level"] }, name_length = { @@ -889,7 +889,7 @@ function ns:SetNameConfigGroup(updateFunction, unitName, count) desc = L["TEXT_FORMAT_DESC"], type = "range", width = "full", - get = function() return SV.SVUnit.db[unitName]["formatting"].name_length end, + get = function() return SV.db.SVUnit[unitName]["formatting"].name_length end, min = 1, max = 30, step = 1 @@ -902,7 +902,7 @@ function ns:SetNameConfigGroup(updateFunction, unitName, count) end local function getAvailablePortraitConfig(unit) - local db = SV.SVUnit.db[unit].portrait; + local db = SV.db.SVUnit[unit].portrait; if db.overlay then return {["3D"] = L["3D"]} else @@ -916,7 +916,7 @@ function ns:SetPortraitConfigGroup(updateFunction, unitName, count) type = "group", name = L["Portrait"], get = function(key) - return SV.SVUnit.db[unitName]["portrait"][key[#key]] + return SV.db.SVUnit[unitName]["portrait"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "portrait") @@ -946,7 +946,7 @@ function ns:SetPortraitConfigGroup(updateFunction, unitName, count) type = "toggle", name = L["Overlay"], desc = L["Overlay the healthbar"], - disabled = function() return SV.SVUnit.db[unitName]["portrait"].style == "2D" end + disabled = function() return SV.db.SVUnit[unitName]["portrait"].style == "2D" end }, width = { order = 3, @@ -956,7 +956,7 @@ function ns:SetPortraitConfigGroup(updateFunction, unitName, count) min = 15, max = 150, step = 1, - disabled = function() return SV.SVUnit.db[unitName]["portrait"].overlay == true end + disabled = function() return SV.db.SVUnit[unitName]["portrait"].overlay == true end } } }, @@ -965,7 +965,7 @@ function ns:SetPortraitConfigGroup(updateFunction, unitName, count) type = "group", guiInline = true, name = L["3D Settings"], - disabled = function() return SV.SVUnit.db[unitName]["portrait"].style == "2D" end, + disabled = function() return SV.db.SVUnit[unitName]["portrait"].style == "2D" end, args = { rotation = { order = 1, @@ -992,14 +992,14 @@ function ns:SetPortraitConfigGroup(updateFunction, unitName, count) end function ns:SetIconConfigGroup(updateFunction, unitName, count) - local iconGroup = SV.SVUnit.db[unitName]["icons"] + local iconGroup = SV.db.SVUnit[unitName]["icons"] local grouporder = 1 local k = { order = 5000, type = "group", name = L["Icons"], get = function(key) - return SV.SVUnit.db[unitName]["icons"][key[#key]] + return SV.db.SVUnit[unitName]["icons"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons") @@ -1015,7 +1015,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Raid Marker"], get = function(key) - return SV.SVUnit.db[unitName]["icons"]["raidicon"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["raidicon"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "raidicon") @@ -1039,7 +1039,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Combat"], get = function(key) - return SV.SVUnit.db[unitName]["icons"]["combatIcon"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["combatIcon"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "combatIcon") @@ -1063,7 +1063,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Resting"], get = function(key) - return SV.SVUnit.db[unitName]["icons"]["restIcon"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["restIcon"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "restIcon") @@ -1087,7 +1087,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Class"], get = function(key) - return SV.SVUnit.db[unitName]["icons"]["classicon"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["classicon"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "classicon") @@ -1111,7 +1111,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Elite / Rare"], get = function(key) - return SV.SVUnit.db[unitName]["icons"]["eliteicon"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["eliteicon"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "eliteicon") @@ -1135,7 +1135,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Role"], get = function(key) - return SV.SVUnit.db[unitName]["icons"]["roleIcon"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["roleIcon"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "roleIcon") @@ -1159,7 +1159,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Leader / MasterLooter"], get = function(key) - return SV.SVUnit.db[unitName]["icons"]["raidRoleIcons"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["raidRoleIcons"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "raidRoleIcons") @@ -1185,7 +1185,7 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) type = "group", name = L["Aura Bars"], get = function(key) - return SV.SVUnit.db[unitName]["aurabar"][key[#key]] + return SV.db.SVUnit[unitName]["aurabar"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "aurabar") @@ -1328,15 +1328,15 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) order = 2, type = "toggle", name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display auras that are not yours."], - get = function(l)return SV.SVUnit.db[unitName]["aurabar"].filterPlayer.friendly end, - set = function(l, m)SV.SVUnit.db[unitName]["aurabar"].filterPlayer.friendly = m;updateFunction(MOD, unitName)end + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterPlayer.friendly end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterPlayer.friendly = m;updateFunction(MOD, unitName)end }, enemy = { order = 3, type = "toggle", name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that are not yours."], - get = function(l)return SV.SVUnit.db[unitName]["aurabar"].filterPlayer.enemy end, - set = function(l, m)SV.SVUnit.db[unitName]["aurabar"].filterPlayer.enemy = m;updateFunction(MOD, unitName)end + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterPlayer.enemy end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterPlayer.enemy = m;updateFunction(MOD, unitName)end } } } @@ -1349,15 +1349,15 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) order = 2, type = "toggle", name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display any auras found on the Blocked filter."], - get = function(l)return SV.SVUnit.db[unitName]["aurabar"].filterBlocked.friendly end, - set = function(l, m)SV.SVUnit.db[unitName]["aurabar"].filterBlocked.friendly = m;updateFunction(MOD, unitName)end + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterBlocked.friendly end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterBlocked.friendly = m;updateFunction(MOD, unitName)end }, enemy = { order = 3, type = "toggle", name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display any auras found on the Blocked filter."], - get = function(l)return SV.SVUnit.db[unitName]["aurabar"].filterBlocked.enemy end, - set = function(l, m)SV.SVUnit.db[unitName]["aurabar"].filterBlocked.enemy = m;updateFunction(MOD, unitName)end + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterBlocked.enemy end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterBlocked.enemy = m;updateFunction(MOD, unitName)end } } } @@ -1370,15 +1370,15 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) order = 2, type = "toggle", name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["If no other filter options are being used then it will block anything not on the Allowed filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."], - get = function(l)return SV.SVUnit.db[unitName]["aurabar"].filterAllowed.friendly end, - set = function(l, m)SV.SVUnit.db[unitName]["aurabar"].filterAllowed.friendly = m;updateFunction(MOD, unitName)end + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterAllowed.friendly end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterAllowed.friendly = m;updateFunction(MOD, unitName)end }, enemy = { order = 3, type = "toggle", name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["If no other filter options are being used then it will block anything not on the Allowed filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."], - get = function(l)return SV.SVUnit.db[unitName]["aurabar"].filterAllowed.enemy end, - set = function(l, m)SV.SVUnit.db[unitName]["aurabar"].filterAllowed.enemy = m;updateFunction(MOD, unitName)end + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterAllowed.enemy end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterAllowed.enemy = m;updateFunction(MOD, unitName)end } } } @@ -1391,15 +1391,15 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) order = 2, type = "toggle", name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display auras that have no duration."], - get = function(l)return SV.SVUnit.db[unitName]["aurabar"].filterInfinite.friendly end, - set = function(l, m)SV.SVUnit.db[unitName]["aurabar"].filterInfinite.friendly = m;updateFunction(MOD, unitName)end + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterInfinite.friendly end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterInfinite.friendly = m;updateFunction(MOD, unitName)end }, enemy = { order = 3, type = "toggle", name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that have no duration."], - get = function(l)return SV.SVUnit.db[unitName]["aurabar"].filterInfinite.enemy end, - set = function(l, m)SV.SVUnit.db[unitName]["aurabar"].filterInfinite.enemy = m;updateFunction(MOD, unitName)end + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterInfinite.enemy end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterInfinite.enemy = m;updateFunction(MOD, unitName)end } } } @@ -1412,13 +1412,13 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) order = 2, type = "toggle", name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."], - get = function(l)return SV.SVUnit.db[unitName]["aurabar"].filterDispellable.friendly end, - set = function(l, m)SV.SVUnit.db[unitName]["aurabar"].filterDispellable.friendly = m;updateFunction(MOD, unitName)end}, enemy = { + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterDispellable.friendly end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterDispellable.friendly = m;updateFunction(MOD, unitName)end}, enemy = { order = 3, type = "toggle", name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."], - get = function(l)return SV.SVUnit.db[unitName]["aurabar"].filterDispellable.enemy end, - set = function(l, m)SV.SVUnit.db[unitName]["aurabar"].filterDispellable.enemy = m;updateFunction(MOD, unitName)end} + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterDispellable.enemy end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterDispellable.enemy = m;updateFunction(MOD, unitName)end} } } k.args.filterGroup.args.filters.args.filterRaid = { @@ -1430,13 +1430,13 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) order = 2, type = "toggle", name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display raid buffs such as Blessing of Kings or Mark of the Wild."], - get = function(l)return SV.SVUnit.db[unitName]["aurabar"].filterRaid.friendly end, - set = function(l, m)SV.SVUnit.db[unitName]["aurabar"].filterRaid.friendly = m;updateFunction(MOD, unitName)end}, enemy = { + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterRaid.friendly end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterRaid.friendly = m;updateFunction(MOD, unitName)end}, enemy = { order = 3, type = "toggle", name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display raid buffs such as Blessing of Kings or Mark of the Wild."], - get = function(l)return SV.SVUnit.db[unitName]["aurabar"].filterRaid.enemy end, - set = function(l, m)SV.SVUnit.db[unitName]["aurabar"].filterRaid.enemy = m;updateFunction(MOD, unitName)end} + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterRaid.enemy end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterRaid.enemy = m;updateFunction(MOD, unitName)end} } } k.args.filterGroup.args.filters.args.useFilter = { @@ -1462,7 +1462,7 @@ SV.Options.args.SVUnit = { name = L["UnitFrames"], childGroups = "tree", get = function(key) - return SV.SVUnit.db[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1474,9 +1474,9 @@ SV.Options.args.SVUnit = { type = "toggle", name = L["Enable"], get = function(l) - return SV.SVUnit.db.enable end, + return SV.db.SVUnit.enable end, set = function(l, m) - SV.SVUnit.db.enable = m; + SV.db.SVUnit.enable = m; SV:StaticPopup_Show("RL_CLIENT") end }, @@ -1486,7 +1486,7 @@ SV.Options.args.SVUnit = { name = L["General"], guiInline = true, disabled = function() - return not SV.SVUnit.db.enable + return not SV.db.SVUnit.enable end, args = { commonGroup = { @@ -1501,7 +1501,7 @@ SV.Options.args.SVUnit = { desc = L["Disables the blizzard party/raid frames."], type = "toggle", get = function(key) - return SV.SVUnit.db.disableBlizzard + return SV.db.SVUnit.disableBlizzard end, set = function(key, value) MOD:ChangeDBVar(value, "disableBlizzard"); @@ -1589,7 +1589,7 @@ SV.Options.args.SVUnit = { guiInline = true, name = L["Bars"], get = function(key) - return SV.SVUnit.db[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1713,7 +1713,7 @@ SV.Options.args.SVUnit = { name = L["Class Health"], desc = L["Color health by classcolor or reaction."], get = function(key) - return SV.SVUnit.db[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1726,7 +1726,7 @@ SV.Options.args.SVUnit = { name = L["Health By Value"], desc = L["Color health by amount remaining."], get = function(key) - return SV.SVUnit.db[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1739,7 +1739,7 @@ SV.Options.args.SVUnit = { name = L["Class Backdrop"], desc = L["Color the health backdrop by class or reaction."], get = function(key) - return SV.SVUnit.db[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1752,7 +1752,7 @@ SV.Options.args.SVUnit = { name = L["Overlay Health Color"], desc = L["Force custom health color when using portrait overlays."], get = function(key) - return SV.SVUnit.db[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1765,7 +1765,7 @@ SV.Options.args.SVUnit = { name = L["Overlay Animations"], desc = L["Toggle health animations on portrait overlays."], get = function(key) - return SV.SVUnit.db[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1825,7 +1825,7 @@ SV.Options.args.SVUnit = { name = L["Class Power"], desc = L["Color power by classcolor or reaction."], get = function(key) - return SV.SVUnit.db[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1911,7 +1911,7 @@ SV.Options.args.SVUnit = { name = L["Class Castbars"], desc = L["Color castbars by the class or reaction type of the unit."], get = function(key) - return SV.SVUnit.db[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1971,7 +1971,7 @@ SV.Options.args.SVUnit = { desc = L["Color aurabar debuffs by type."], type = "toggle", get = function(key) - return SV.SVUnit.db[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1984,7 +1984,7 @@ SV.Options.args.SVUnit = { desc = L["Color all buffs that reduce incoming damage."], type = "toggle", get = function(key) - return SV.SVUnit.db[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua index 00fe349..6dc7b4c 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua @@ -44,7 +44,7 @@ SV.Options.args.SVUnit.args.focus = { type = "group", order = 9, childGroups = "tab", - get = function(l)return SV.SVUnit.db["focus"][l[#l]]end, + get = function(l)return SV.db.SVUnit["focus"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "focus");MOD:SetUnitFrame("focus")end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, @@ -96,8 +96,8 @@ SV.Options.args.SVUnit.args.focus = { order = 5, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.SVUnit.db["focus"]["power"].hideonnpc end, - set = function(l, m)SV.SVUnit.db["focus"]["power"].hideonnpc = m;MOD:SetUnitFrame("focus")end + get = function(l)return SV.db.SVUnit["focus"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["focus"]["power"].hideonnpc = m;MOD:SetUnitFrame("focus")end }, threatEnabled = { type = "toggle", @@ -157,7 +157,7 @@ SV.Options.args.SVUnit.args.focustarget = { type = "group", order = 10, childGroups = "tab", - get = function(l)return SV.SVUnit.db["focustarget"][l[#l]]end, + get = function(l)return SV.db.SVUnit["focustarget"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "focustarget");MOD:SetUnitFrame("focustarget")end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, @@ -186,7 +186,7 @@ SV.Options.args.SVUnit.args.focustarget = { name = "", }, rangeCheck = {order = 3, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle"}, - hideonnpc = {type = "toggle", order = 4, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SV.SVUnit.db["focustarget"]["power"].hideonnpc end, set = function(l, m)SV.SVUnit.db["focustarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("focustarget")end}, + hideonnpc = {type = "toggle", order = 4, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SV.db.SVUnit["focustarget"]["power"].hideonnpc end, set = function(l, m)SV.db.SVUnit["focustarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("focustarget")end}, threatEnabled = {type = "toggle", order = 5, name = L["Show Threat"]} } }, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/grid.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/grid.lua index cd131fc..b8f313b 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/grid.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/grid.lua @@ -57,7 +57,7 @@ SV.Options.args.SVUnit.args.grid = { guiInline = true, name = L["General Settings"], get = function(key) - return SV.SVUnit.db.grid[key[#key]] + return SV.db.SVUnit.grid[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key] , "grid"); @@ -76,7 +76,7 @@ SV.Options.args.SVUnit.args.grid = { desc = L["Grid frames will show name texts."], type = "toggle", set = function(key, value) - if(SV.SVUnit.db.grid.size < 30) then MOD:ChangeDBVar(30, "size", "grid"); end + if(SV.db.SVUnit.grid.size < 30) then MOD:ChangeDBVar(30, "size", "grid"); end MOD:ChangeDBVar(value, "shownames", "grid"); MOD:RefreshUnitFrames(); end @@ -99,7 +99,7 @@ SV.Options.args.SVUnit.args.grid = { guiInline = true, name = L["Allowed Frames"], get = function(key) - return SV.SVUnit.db.grid[key[#key]] + return SV.db.SVUnit.grid[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key] , "grid"); @@ -111,56 +111,56 @@ SV.Options.args.SVUnit.args.grid = { order = 1, name = L['Party Grid'], desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.SVUnit.db.party.gridAllowed end, - set = function(key, value) SV.SVUnit.db.party.gridAllowed = value; MOD:SetGroupFrame("party") end, + get = function(key) return SV.db.SVUnit.party.gridAllowed end, + set = function(key, value) SV.db.SVUnit.party.gridAllowed = value; MOD:SetGroupFrame("party") end, }, partypets = { type = 'toggle', order = 2, name = L['Party Pets Grid'], desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.SVUnit.db.party.petsGroup.gridAllowed end, - set = function(key, value) SV.SVUnit.db.party.petsGroup.gridAllowed = value; MOD:SetGroupFrame("party") end, + get = function(key) return SV.db.SVUnit.party.petsGroup.gridAllowed end, + set = function(key, value) SV.db.SVUnit.party.petsGroup.gridAllowed = value; MOD:SetGroupFrame("party") end, }, partytargets = { type = 'toggle', order = 3, name = L['Party Targets Grid'], desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.SVUnit.db.party.targetsGroup.gridAllowed end, - set = function(key, value) SV.SVUnit.db.party.targetsGroup.gridAllowed = value; MOD:SetGroupFrame("party") end, + get = function(key) return SV.db.SVUnit.party.targetsGroup.gridAllowed end, + set = function(key, value) SV.db.SVUnit.party.targetsGroup.gridAllowed = value; MOD:SetGroupFrame("party") end, }, raid10 = { type = 'toggle', order = 4, name = L['Raid 10 Grid'], desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.SVUnit.db.raid10.gridAllowed end, - set = function(key, value) SV.SVUnit.db.raid10.gridAllowed = value; MOD:SetGroupFrame("raid10") end, + get = function(key) return SV.db.SVUnit.raid10.gridAllowed end, + set = function(key, value) SV.db.SVUnit.raid10.gridAllowed = value; MOD:SetGroupFrame("raid10") end, }, raid25 = { type = 'toggle', order = 5, name = L['Raid 25 Grid'], desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.SVUnit.db.raid25.gridAllowed end, - set = function(key, value) SV.SVUnit.db.raid25.gridAllowed = value; MOD:SetGroupFrame("raid25") end, + get = function(key) return SV.db.SVUnit.raid25.gridAllowed end, + set = function(key, value) SV.db.SVUnit.raid25.gridAllowed = value; MOD:SetGroupFrame("raid25") end, }, raid40 = { type = 'toggle', order = 6, name = L['Raid 40 Grid'], desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.SVUnit.db.raid40.gridAllowed end, - set = function(key, value) SV.SVUnit.db.raid40.gridAllowed = value; MOD:SetGroupFrame("raid40") end, + get = function(key) return SV.db.SVUnit.raid40.gridAllowed end, + set = function(key, value) SV.db.SVUnit.raid40.gridAllowed = value; MOD:SetGroupFrame("raid40") end, }, raidpet = { type = 'toggle', order = 4, name = L['Raid Pet Grid'], desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.SVUnit.db.raidpet.gridAllowed end, - set = function(key, value) SV.SVUnit.db.raidpet.gridAllowed = value; MOD:SetGroupFrame("raidpet") end, + get = function(key) return SV.db.SVUnit.raidpet.gridAllowed end, + set = function(key, value) SV.db.SVUnit.raidpet.gridAllowed = value; MOD:SetGroupFrame("raidpet") end, }, } }, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua index 4682df5..96ef690 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua @@ -44,7 +44,7 @@ SV.Options.args.SVUnit.args.boss = { type = "group", order = 1000, childGroups = "tab", - get = function(l)return SV.SVUnit.db["boss"][l[#l]]end, + get = function(l)return SV.db.SVUnit["boss"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "boss");MOD:SetEnemyFrames("boss", MAX_BOSS_FRAMES)end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, @@ -74,7 +74,7 @@ SV.Options.args.SVUnit.args.boss = { name = "", }, rangeCheck = {order = 3, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle"}, - hideonnpc = {type = "toggle", order = 4, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SV.SVUnit.db["boss"]["power"].hideonnpc end, set = function(l, m)SV.SVUnit.db["boss"]["power"].hideonnpc = m;MOD:SetEnemyFrames("boss")end}, + hideonnpc = {type = "toggle", order = 4, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SV.db.SVUnit["boss"]["power"].hideonnpc end, set = function(l, m)SV.db.SVUnit["boss"]["power"].hideonnpc = m;MOD:SetEnemyFrames("boss")end}, threatEnabled = {type = "toggle", order = 5, name = L["Show Threat"]} } }, @@ -113,7 +113,7 @@ SV.Options.args.SVUnit.args.arena = { type = "group", order = 1100, childGroups = "tab", - get = function(l)return SV.SVUnit.db["arena"][l[#l]]end, + get = function(l)return SV.db.SVUnit["arena"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "arena");MOD:SetEnemyFrames("arena", 5)end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, @@ -144,7 +144,7 @@ SV.Options.args.SVUnit.args.arena = { }, predict = {order = 3, name = L["Heal Prediction"], desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], type = "toggle"}, rangeCheck = {order = 4, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle"}, - hideonnpc = {type = "toggle", order = 5, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SV.SVUnit.db["arena"]["power"].hideonnpc end, set = function(l, m)SV.SVUnit.db["arena"]["power"].hideonnpc = m;MOD:SetEnemyFrames("arena")end}, + hideonnpc = {type = "toggle", order = 5, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SV.db.SVUnit["arena"]["power"].hideonnpc end, set = function(l, m)SV.db.SVUnit["arena"]["power"].hideonnpc = m;MOD:SetEnemyFrames("arena")end}, threatEnabled = {type = "toggle", order = 6, name = L["Show Threat"]} } }, @@ -168,7 +168,7 @@ SV.Options.args.SVUnit.args.arena = { type = "toggle", order = 1, name = L["Enable"], - get = function(l)return SV.SVUnit.db.arena.pvp.enable end, + get = function(l)return SV.db.SVUnit.arena.pvp.enable end, set = function(l, m)MOD:ChangeDBVar(m, "enable", "arena", "pvp");MOD:SetEnemyFrames("arena", 5)end, }, trinketGroup = { @@ -176,9 +176,9 @@ SV.Options.args.SVUnit.args.arena = { guiInline = true, type = "group", name = L["Trinkets"], - get = function(l)return SV.SVUnit.db.arena.pvp[l[#l]]end, + get = function(l)return SV.db.SVUnit.arena.pvp[l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "arena", "pvp");MOD:SetEnemyFrames("arena", 5)end, - disabled = function() return not SV.SVUnit.db.arena.pvp.enable end, + disabled = function() return not SV.db.SVUnit.arena.pvp.enable end, args = { trinketPosition = { type = "select", @@ -220,9 +220,9 @@ SV.Options.args.SVUnit.args.arena = { guiInline = true, type = "group", name = L["Enemy Specs"], - get = function(l)return SV.SVUnit.db.arena.pvp[l[#l]]end, + get = function(l)return SV.db.SVUnit.arena.pvp[l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "arena", "pvp");MOD:SetEnemyFrames("arena", 5)end, - disabled = function() return not SV.SVUnit.db.arena.pvp.enable end, + disabled = function() return not SV.db.SVUnit.arena.pvp.enable end, args = { specPosition = { type = "select", @@ -284,7 +284,7 @@ SV.Options.args.SVUnit.args.tank = { type = "group", order = 1200, childGroups = "tab", - get = function(l)return SV.SVUnit.db["tank"][l[#l]]end, + get = function(l)return SV.db.SVUnit["tank"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "tank");MOD:SetGroupFrame("tank")end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, @@ -309,7 +309,7 @@ SV.Options.args.SVUnit.args.tank = { type = "group", name = L["Tank Target"], guiInline = true, - get = function(l)return SV.SVUnit.db["tank"]["targetsGroup"][l[#l]]end, + get = function(l)return SV.db.SVUnit["tank"]["targetsGroup"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "tank", "targetsGroup");MOD:SetGroupFrame("tank")end, args = { enable = {type = "toggle", name = L["Enable"], order = 1}, @@ -334,7 +334,7 @@ SV.Options.args.SVUnit.args.assist = { type = "group", order = 1300, childGroups = "tab", - get = function(l)return SV.SVUnit.db["assist"][l[#l]]end, + get = function(l)return SV.db.SVUnit["assist"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "assist");MOD:SetGroupFrame("assist")end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, @@ -359,7 +359,7 @@ SV.Options.args.SVUnit.args.assist = { type = "group", name = L["Assist Target"], guiInline = true, - get = function(l)return SV.SVUnit.db["assist"]["targetsGroup"][l[#l]]end, + get = function(l)return SV.db.SVUnit["assist"]["targetsGroup"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "assist", "targetsGroup");MOD:SetGroupFrame("assist")end, args = { enable = {type = "toggle", name = L["Enable"], order = 1}, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua index e79bac5..43952c5 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua @@ -41,7 +41,7 @@ SV.Options.args.SVUnit.args.party = { order = 11, childGroups = "tab", get = function(l)return - SV.SVUnit.db['party'][l[#l]]end, + SV.db.SVUnit['party'][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party')end, args = { enable = { @@ -79,8 +79,8 @@ SV.Options.args.SVUnit.args.party = { order = 2, name = L['Text Toggle On NPC'], desc = L['Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point.'], - get = function(l)return SV.SVUnit.db['party']['power'].hideonnpc end, - set = function(l, m)SV.SVUnit.db['party']['power'].hideonnpc = m;MOD:SetGroupFrame('party')end, + get = function(l)return SV.db.SVUnit['party']['power'].hideonnpc end, + set = function(l, m)SV.db.SVUnit['party']['power'].hideonnpc = m;MOD:SetGroupFrame('party')end, }, rangeCheck = { order = 3, @@ -284,14 +284,14 @@ SV.Options.args.SVUnit.args.party = { order = 5, name = L['Invert Grouping Order'], desc = L['Enabling this inverts the sorting order.'], - disabled = function()return not SV.SVUnit.db['party'].customSorting end, + disabled = function()return not SV.db.SVUnit['party'].customSorting end, type = 'toggle', }, startFromCenter = { order = 6, name = L['Start Near Center'], desc = L['The initial group will start near the center and grow out.'], - disabled = function()return not SV.SVUnit.db['party'].customSorting end, + disabled = function()return not SV.db.SVUnit['party'].customSorting end, type = 'toggle', }, }, @@ -304,7 +304,7 @@ SV.Options.args.SVUnit.args.party = { type = 'group', name = L['Aura Watch'], get = function(l)return - SV.SVUnit.db['party']['auraWatch'][l[#l]]end, + SV.db.SVUnit['party']['auraWatch'][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party", "auraWatch");MOD:SetGroupFrame('party')end, args = { enable = { @@ -341,7 +341,7 @@ SV.Options.args.SVUnit.args.party = { order = 800, type = 'group', name = L['Party Pets'], - get = function(l)return SV.SVUnit.db['party']['petsGroup'][l[#l]]end, + get = function(l)return SV.db.SVUnit['party']['petsGroup'][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party", "petsGroup");MOD:SetGroupFrame('party')end, args = { enable = { @@ -412,7 +412,7 @@ SV.Options.args.SVUnit.args.party = { type = 'group', name = L['Party Targets'], get = function(l)return - SV.SVUnit.db['party']['targetsGroup'][l[#l]]end, + SV.db.SVUnit['party']['targetsGroup'][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party", "targetsGroup");MOD:SetGroupFrame('party')end, args = { enable = { diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua index 8714c0d..bbbaed3 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua @@ -44,7 +44,7 @@ SV.Options.args.SVUnit.args.pet = { type = "group", order = 4, childGroups = "tab", - get = function(l)return SV.SVUnit.db["pet"][l[#l]]end, + get = function(l)return SV.db.SVUnit["pet"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "pet");MOD:SetUnitFrame("pet")end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, @@ -89,8 +89,8 @@ SV.Options.args.SVUnit.args.pet = { order = 4, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.SVUnit.db["pet"]["power"].hideonnpc end, - set = function(l, m)SV.SVUnit.db["pet"]["power"].hideonnpc = m;MOD:SetUnitFrame("pet")end + get = function(l)return SV.db.SVUnit["pet"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["pet"]["power"].hideonnpc = m;MOD:SetUnitFrame("pet")end }, threatEnabled = { type = "toggle", @@ -114,7 +114,7 @@ SV.Options.args.SVUnit.args.pet = { type = "group", guiInline = true, name = L["Aura Watch"], - get = function(l)return SV.SVUnit.db["pet"]["auraWatch"][l[#l]]end, + get = function(l)return SV.db.SVUnit["pet"]["auraWatch"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "pet", "auraWatch");MOD:SetUnitFrame("pet")end, args = { enable = { @@ -155,7 +155,7 @@ SV.Options.args.SVUnit.args.pettarget = { name = L["PetTarget Frame"], type = "group", order = 5, childGroups = "tab", - get = function(l)return SV.SVUnit.db["pettarget"][l[#l]]end, + get = function(l)return SV.db.SVUnit["pettarget"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "pettarget");MOD:SetUnitFrame("pettarget")end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, @@ -185,8 +185,8 @@ SV.Options.args.SVUnit.args.pettarget = { order = 7, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.SVUnit.db["pettarget"]["power"].hideonnpc end, - set = function(l, m)SV.SVUnit.db["pettarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("pettarget")end + get = function(l)return SV.db.SVUnit["pettarget"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["pettarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("pettarget")end }, threatEnabled = {type = "toggle", order = 13, name = L["Show Threat"]} } @@ -219,8 +219,8 @@ SV.Options.args.SVUnit.args.pettarget = { order = 4, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.SVUnit.db["pettarget"]["power"].hideonnpc end, - set = function(l, m)SV.SVUnit.db["pettarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("pettarget")end + get = function(l)return SV.db.SVUnit["pettarget"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["pettarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("pettarget")end }, threatEnabled = { type = "toggle", diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua index 432894c..f181254 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua @@ -44,7 +44,7 @@ SV.Options.args.SVUnit.args.player={ type = 'group', order = 3, childGroups = "tab", - get = function(l)return SV.SVUnit.db['player'][l[#l]]end, + get = function(l)return SV.db.SVUnit['player'][l[#l]]end, set = function(l,m)MOD:ChangeDBVar(m, l[#l], "player");MOD:SetUnitFrame('player')end, args = { enable = { @@ -119,8 +119,8 @@ SV.Options.args.SVUnit.args.player={ order = 5, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.SVUnit.db["player"]["power"].hideonnpc end, - set = function(l, m)SV.SVUnit.db["player"]["power"].hideonnpc = m;MOD:SetUnitFrame("player")end + get = function(l)return SV.db.SVUnit["player"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["player"]["power"].hideonnpc = m;MOD:SetUnitFrame("player")end }, threatEnabled = { type = "toggle", @@ -158,8 +158,8 @@ SV.Options.args.SVUnit.args.player={ max = 500, step = 1, set = function(l, m) - if SV.SVUnit.db["player"].castbar.width == SV.SVUnit.db["player"][l[#l]] then - SV.SVUnit.db["player"].castbar.width = m + if SV.db.SVUnit["player"].castbar.width == SV.db.SVUnit["player"][l[#l]] then + SV.db.SVUnit["player"].castbar.width = m end MOD:ChangeDBVar(m, l[#l], "player"); MOD:SetUnitFrame("player") @@ -181,7 +181,7 @@ SV.Options.args.SVUnit.args.player={ type = "group", guiInline = true, name = PVP, - get = function(l)return SV.SVUnit.db["player"]["pvp"][l[#l]]end, + get = function(l)return SV.db.SVUnit["player"]["pvp"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "player", "pvp");MOD:SetUnitFrame("player")end, args = { position = { @@ -225,7 +225,7 @@ SV.Options.args.SVUnit.args.player={ order = 1000, type = "group", name = L["Classbar"], - get = function(l)return SV.SVUnit.db["player"]["classbar"][l[#l]]end, + get = function(l)return SV.db.SVUnit["player"]["classbar"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "player", "classbar");MOD:SetUnitFrame("player")end, args = { enable = { @@ -253,7 +253,7 @@ SV.Options.args.SVUnit.args.player={ type = "toggle", order = 3, name = L["Stagger Bar"], - get = function(l)return SV.SVUnit.db["player"]["stagger"].enable end, + get = function(l)return SV.db.SVUnit["player"]["stagger"].enable end, set = function(l, m)MOD:ChangeDBVar(m, "enable", "player", "stagger");MOD:SetUnitFrame("player")end, disabled = SV.class ~= "MONK", }, @@ -263,7 +263,7 @@ SV.Options.args.SVUnit.args.player={ name = L["Druid Mana"], desc = L["Display druid mana bar when in cat or bear form and when mana is not 100%."], get = function(key) - return SV.SVUnit.db["player"]["power"].druidMana + return SV.db.SVUnit["player"]["power"].druidMana end, set = function(key, value) MOD:ChangeDBVar(value, "druidMana", "player", "power"); diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua index 541aa9f..7006bca 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua @@ -43,7 +43,7 @@ for w=10,40,15 do type = "group", order = subOrder, childGroups = "tab", - get = function(l) return SV.SVUnit.db["raid" .. w][l[#l]] end, + get = function(l) return SV.db.SVUnit["raid" .. w][l[#l]] end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w)end, args = { enable = @@ -81,8 +81,8 @@ for w=10,40,15 do order = 1, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.SVUnit.db["raid" .. w]["power"].hideonnpc end, - set = function(l, m)SV.SVUnit.db["raid" .. w]["power"].hideonnpc = m;MOD:SetGroupFrame("raid" .. w)end, + get = function(l)return SV.db.SVUnit["raid" .. w]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["raid" .. w]["power"].hideonnpc = m;MOD:SetGroupFrame("raid" .. w)end, }, rangeCheck = { order = 2, @@ -309,7 +309,7 @@ for w=10,40,15 do order = 5, name = L["Invert Grouping Order"], desc = L["Enabling this inverts the grouping order when the raid is not full, this will reverse the direction it starts from."], - disabled = function()return not SV.SVUnit.db["raid" .. w].customSorting end, + disabled = function()return not SV.db.SVUnit["raid" .. w].customSorting end, type = "toggle", }, startFromCenter = @@ -317,7 +317,7 @@ for w=10,40,15 do order = 6, name = L["Start Near Center"], desc = L["The initial group will start near the center and grow out."], - disabled = function()return not SV.SVUnit.db["raid" .. w].customSorting end, + disabled = function()return not SV.db.SVUnit["raid" .. w].customSorting end, type = "toggle", }, }, @@ -339,7 +339,7 @@ for w=10,40,15 do type = "toggle", name = L["Enable"], order = 1, - get = function(l)return SV.SVUnit.db["raid" .. w].auraWatch.enable end, + get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.enable end, set = function(l, m)MOD:ChangeDBVar(m, "enable", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end, }, size = { @@ -350,7 +350,7 @@ for w=10,40,15 do min = 4, max = 15, step = 1, - get = function(l)return SV.SVUnit.db["raid" .. w].auraWatch.size end, + get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.size end, set = function(l, m)MOD:ChangeDBVar(m, "size", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end, }, configureButton = { @@ -367,7 +367,7 @@ for w=10,40,15 do type = "group", name = L["RaidDebuff Indicator"], get = function(l)return - SV.SVUnit.db["raid" .. w]["rdebuffs"][l[#l]]end, + SV.db.SVUnit["raid" .. w]["rdebuffs"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w, "rdebuffs");MOD:SetGroupFrame("raid" .. w)end, args = { enable = { @@ -429,7 +429,7 @@ SV.Options.args.SVUnit.args.raidpet ={ name = L['Raid Pet Frames'], childGroups = "tab", get = function(l)return - SV.SVUnit.db['raidpet'][l[#l]]end, + SV.db.SVUnit['raidpet'][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet')end, args ={ enable ={ @@ -634,14 +634,14 @@ SV.Options.args.SVUnit.args.raidpet ={ order = 5, name = L['Invert Grouping Order'], desc = L['Enabling this inverts the grouping order when the raid is not full, this will reverse the direction it starts from.'], - disabled = function()return not SV.SVUnit.db['raidpet'].customSorting end, + disabled = function()return not SV.db.SVUnit['raidpet'].customSorting end, type = 'toggle', }, startFromCenter ={ order = 6, name = L['Start Near Center'], desc = L['The initial group will start near the center and grow out.'], - disabled = function()return not SV.SVUnit.db['raidpet'].customSorting end, + disabled = function()return not SV.db.SVUnit['raidpet'].customSorting end, type = 'toggle', }, }, @@ -662,7 +662,7 @@ SV.Options.args.SVUnit.args.raidpet ={ type = "toggle", name = L["Enable"], order = 1, - get = function(l)return SV.SVUnit.db["raid" .. w].auraWatch.enable end, + get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.enable end, set = function(l, m)MOD:ChangeDBVar(m, "enable", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end, }, size = { @@ -673,7 +673,7 @@ SV.Options.args.SVUnit.args.raidpet ={ min = 4, max = 15, step = 1, - get = function(l)return SV.SVUnit.db["raid" .. w].auraWatch.size end, + get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.size end, set = function(l, m)MOD:ChangeDBVar(m, "size", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end, }, configureButton ={ @@ -689,7 +689,7 @@ SV.Options.args.SVUnit.args.raidpet ={ type = 'group', name = L['RaidDebuff Indicator'], get = function(l)return - SV.SVUnit.db['raidpet']['rdebuffs'][l[#l]]end, + SV.db.SVUnit['raidpet']['rdebuffs'][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet", "rdebuffs");MOD:SetGroupFrame('raidpet')end, args ={ enable ={ diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua index 829b6b4..ca18836 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua @@ -44,7 +44,7 @@ SV.Options.args.SVUnit.args.target={ type = 'group', order = 6, childGroups = "tab", - get=function(l)return SV.SVUnit.db['target'][l[#l]]end, + get=function(l)return SV.db.SVUnit['target'][l[#l]]end, set=function(l,m)MOD:ChangeDBVar(m, l[#l], "target");MOD:SetUnitFrame('target')end, args={ enable={type='toggle',order=1,name=L['Enable']}, @@ -100,8 +100,8 @@ SV.Options.args.SVUnit.args.target={ order = 5, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.SVUnit.db["target"]["power"].hideonnpc end, - set = function(l, m)SV.SVUnit.db["target"]["power"].hideonnpc = m;MOD:SetUnitFrame("target")end + get = function(l)return SV.db.SVUnit["target"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["target"]["power"].hideonnpc = m;MOD:SetUnitFrame("target")end }, threatEnabled = { type = "toggle", @@ -133,8 +133,8 @@ SV.Options.args.SVUnit.args.target={ max = 500, step = 1, set = function(l, m) - if SV.SVUnit.db["target"].castbar.width == SV.SVUnit.db["target"][l[#l]] then - SV.SVUnit.db["target"].castbar.width = m + if SV.db.SVUnit["target"].castbar.width == SV.db.SVUnit["target"][l[#l]] then + SV.db.SVUnit["target"].castbar.width = m end MOD:ChangeDBVar(m, l[#l], "target"); MOD:SetUnitFrame("target") @@ -157,7 +157,7 @@ SV.Options.args.SVUnit.args.target={ order = 800, type = "group", name = L["Combobar"], - get = function(l)return SV.SVUnit.db["target"]["combobar"][l[#l]]end, + get = function(l)return SV.db.SVUnit["target"]["combobar"][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "target", "combobar");MOD:SetUnitFrame("target")end, args = { enable = { @@ -209,7 +209,7 @@ SV.Options.args.SVUnit.args.targettarget={ type='group', order=7, childGroups="tab", - get=function(l)return SV.SVUnit.db['targettarget'][l[#l]]end, + get=function(l)return SV.db.SVUnit['targettarget'][l[#l]]end, set=function(l,m)MOD:ChangeDBVar(m, l[#l], "targettarget");MOD:SetUnitFrame('targettarget')end, args={ enable={type='toggle',order=1,name=L['Enable']}, @@ -253,8 +253,8 @@ SV.Options.args.SVUnit.args.targettarget={ order = 4, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.SVUnit.db["target"]["power"].hideonnpc end, - set = function(l, m)SV.SVUnit.db["target"]["power"].hideonnpc = m;MOD:SetUnitFrame("target")end + get = function(l)return SV.db.SVUnit["target"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["target"]["power"].hideonnpc = m;MOD:SetUnitFrame("target")end }, threatEnabled = { type = "toggle", diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua index 03ee484..0dd6b07 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua @@ -263,7 +263,7 @@ function PLUGIN:AppendBankFunctions() end function PLUGIN:AppendChatFunctions() - if SV.SVChat.db.enable and self.db.saveChats then + if SV.db.SVChat.enable and self.db.saveChats then for _,event in pairs(LoggingEvents) do SV.SVChat:RegisterEvent(event, "LogCurrentChat") end @@ -323,7 +323,7 @@ function PLUGIN:Load() end --[[ OVERRIDE DEFAULT FUNCTIONS ]]-- - if SV.SVBag.db.enable then + if SV.db.SVBag.enable then local BAGS = SV.SVBag; if BAGS.BagFrame then BAGS.BagFrame.RefreshBagsSlots = RefreshLoggedBagsSlots; @@ -331,7 +331,7 @@ function PLUGIN:Load() RefreshLoggedBagsSlots(BAGS.BagFrame) end end - if SV.SVTip.db.enable then + if SV.db.SVTip.enable then GameTooltip:HookScript("OnTooltipSetItem", GameTooltip_LogTooltipSetItem) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua index c02e2c5..b3582ec 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua @@ -134,7 +134,7 @@ ACHIEVEMENTFRAME STYLER ########################################################## ]]-- local function AchievementStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.achievement ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.achievement ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua index eda946e..f2c40ce 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua @@ -32,7 +32,7 @@ ALERTFRAME STYLER ########################################################## ]]-- local function AlertStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.alertframes ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.alertframes ~= true then return end for i = 1, 4 do local alert = _G["SVUI_SystemAlert"..i]; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua index 96f35c6..00e9bec 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua @@ -28,7 +28,7 @@ progressBarHolder:SetPoint("BOTTOM", CastingBarFrame, "TOP", 0, 10) SV:SetSVMovable(progressBarHolder, "Archeology Progress Bar") local function ArchaeologyStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.archaeology ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.archaeology ~= true then return end ArchaeologyFrame:RemoveTextures() ArchaeologyFrameInset:RemoveTextures() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua index 2205c83..81ff9cc 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua @@ -80,7 +80,7 @@ AUCTIONFRAME STYLER ]]-- local function AuctionStyle() --STYLE.Debugging = true - if(SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.auctionhouse ~= true) then return end + if(SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.auctionhouse ~= true) then return end STYLE:ApplyWindowStyle(AuctionFrame, false, true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua index 92d016c..c64449f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua @@ -22,7 +22,7 @@ BARBERSHOP STYLER ########################################################## ]]-- local function BarberShopStyle() - if SV.SVStyle.db.blizzard.enable~=true or SV.SVStyle.db.blizzard.barber~=true then return end + if SV.db.SVStyle.blizzard.enable~=true or SV.db.SVStyle.blizzard.barber~=true then return end local buttons = {"BarberShopFrameOkayButton", "BarberShopFrameCancelButton", "BarberShopFrameResetButton"} BarberShopFrameOkayButton:Point("RIGHT", BarberShopFrameSelector4, "BOTTOM", 2, -50) for b = 1, #buttons do diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua index accf764..8cc4ec1 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua @@ -22,7 +22,7 @@ BATTLEFIELD STYLER ########################################################## ]]-- local function BattlefieldStyle() - if SV.SVStyle.db.blizzard.enable~=true or SV.SVStyle.db.blizzard.bgmap~=true then return end + if SV.db.SVStyle.blizzard.enable~=true or SV.db.SVStyle.blizzard.bgmap~=true then return end BattlefieldMinimap:SetClampedToScreen(true) BattlefieldMinimapCorner:Die() BattlefieldMinimapBackground:Die() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua index 6c61947..753f6ba 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua @@ -22,7 +22,7 @@ BLACKMARKET STYLER ########################################################## ]]-- local function BlackMarketStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.bmah ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.bmah ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua index 178cc61..aa21f3b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua @@ -33,7 +33,7 @@ CALENDAR STYLER ########################################################## ]]-- local function CalendarStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.calendar ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.calendar ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua index c77866c..889c8a6 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua @@ -22,7 +22,7 @@ CHALLENGES UI STYLER ########################################################## ]]-- local function ChallengesFrameStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.lfg ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.lfg ~= true then return end ChallengesFrameInset:RemoveTextures() ChallengesFrameInsetBg:Hide() ChallengesFrameDetails.bg:Hide() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua index 4f98832..4b85c94 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua @@ -179,7 +179,7 @@ CHARACTERFRAME STYLER ########################################################## ]]-- local function CharacterFrameStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.character ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.character ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua index b949c8f..2f5b265 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua @@ -345,7 +345,7 @@ CHAT STYLER ########################################################## ]]-- local function ChatStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.chat ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.chat ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua index 13271bb..93778ee 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua @@ -22,7 +22,7 @@ DRESSUP STYLER ########################################################## ]]-- local function DressUpStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.dressingroom ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.dressingroom ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua index 8bd83f3..1de787b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua @@ -99,7 +99,7 @@ local function Outline(frame, noHighlight) end local function EncounterJournalStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.encounterjournal ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.encounterjournal ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua index 4e9ae5b..1a128f9 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua @@ -116,7 +116,7 @@ FRIENDSFRAME STYLER ########################################################## ]]--FriendsFrameBattlenetFrameScrollFrame local function FriendsFrameStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.friends ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.friends ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua index 8ac280c..d51b1e0 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua @@ -22,7 +22,7 @@ GOSSIP STYLER ########################################################## ]]-- local function GossipStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.gossip ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.gossip ~= true then return end ItemTextFrame:RemoveTextures(true) ItemTextScrollFrame:RemoveTextures() STYLE:ApplyCloseButtonStyle(GossipFrameCloseButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua index a7b4f16..2749dc7 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua @@ -162,7 +162,7 @@ GUILDFRAME STYLERS ########################################################## ]]-- local function GuildBankStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.gbank ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.gbank ~= true then return end @@ -284,7 +284,7 @@ local function GuildBankStyle() end local function GuildFrameStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.guild ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.guild ~= true then return end @@ -530,7 +530,7 @@ local function GuildFrameStyle() end local function GuildControlStyle() - if SV.SVStyle.db.blizzard.enable~=true or SV.SVStyle.db.blizzard.guildcontrol~=true then return end + if SV.db.SVStyle.blizzard.enable~=true or SV.db.SVStyle.blizzard.guildcontrol~=true then return end GuildControlUI:RemoveTextures() GuildControlUIHbar:RemoveTextures() @@ -602,7 +602,7 @@ end local function GuildRegistrarStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.guildregistrar ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.guildregistrar ~= true then return end @@ -641,7 +641,7 @@ local function GuildRegistrarStyle() end local function LFGuildFrameStyle() - if(SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.lfguild ~= true) then return end + if(SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.lfguild ~= true) then return end STYLE:ApplyWindowStyle(LookingForGuildFrame, true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua index 401bbfc..8e3081e 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua @@ -63,7 +63,7 @@ HELPFRAME STYLER ########################################################## ]]-- local function HelpFrameStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.help ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.help ~= true then return end tinsert(HelpFrameButtonList, "HelpFrameButton16") diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua index 39e8679..cf73d99 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua @@ -47,7 +47,7 @@ INSPECT UI STYLER ########################################################## ]]-- local function InspectStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.inspect ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.inspect ~= true then return end InspectFrame:RemoveTextures(true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua index 85645bb..7bf8e63 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua @@ -22,7 +22,7 @@ ITEMSOCKETING STYLER ########################################################## ]]-- local function ItemSocketStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.socket ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.socket ~= true then return end ItemSocketingFrame:RemoveTextures() ItemSocketingFrame:SetPanelTemplate("Action") ItemSocketingFrameInset:Die() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua index ca1f2c9..fdadf72 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua @@ -22,7 +22,7 @@ ITEMUPGRADE UI STYLER ########################################################## ]]-- local function ItemUpgradeStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.itemUpgrade ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.itemUpgrade ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua index 658de87..4183866 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua @@ -29,7 +29,7 @@ local BindButtons = { } local function BindingStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.binding ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.binding ~= true then return end for _, gName in pairs(BindButtons)do local btn = _G[gName] diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua index a75263c..d83c0aa 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua @@ -107,7 +107,7 @@ LFD STYLER ########################################################## ]]-- local function LFDFrameStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.lfg ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.lfg ~= true then return end STYLE:ApplyWindowStyle(PVEFrame, true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua index 546badd..fdbea43 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua @@ -59,7 +59,7 @@ LOOTHISTORY STYLER ]]-- local function LootHistoryStyle() LootHistoryFrame:SetFrameStrata('HIGH') - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.loot ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.loot ~= true then return end local M = MissingLootFrame; M:RemoveTextures() M:SetPanelTemplate("Pattern") diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua index 4d3dbe2..22c97ba 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua @@ -42,7 +42,7 @@ local _hook_LossOfControl = function(self, ...) end local function LossOfControlStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.losscontrol ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.losscontrol ~= true then return end local IconBackdrop = CreateFrame("Frame", nil, LossOfControlFrame) IconBackdrop:WrapOuter(LossOfControlFrame.Icon) IconBackdrop:SetFrameLevel(LossOfControlFrame:GetFrameLevel()-1) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua index 55944aa..76f567c 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua @@ -33,7 +33,7 @@ MACRO UI STYLER ########################################################## ]]-- local function MacroUIStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.macro ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.macro ~= true then return end STYLE:ApplyCloseButtonStyle(MacroFrameCloseButton) STYLE:ApplyScrollFrameStyle(MacroButtonScrollFrameScrollBar) STYLE:ApplyScrollFrameStyle(MacroFrameScrollFrameScrollBar) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua index 0bf7fa6..2a1e8b5 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua @@ -42,7 +42,7 @@ MAILBOX STYLER ########################################################## ]]-- local function MailBoxStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.mail ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.mail ~= true then return end STYLE:ApplyWindowStyle(MailFrame) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua index 54eda1e..5c7323d 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua @@ -22,7 +22,7 @@ FRAME STYLER ########################################################## ]]-- local function MerchantStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.merchant ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.merchant ~= true then return end MerchantFrame:RemoveTextures(true) MerchantFrame:SetPanelTemplate("Halftone", false, nil, 2, 4) local level = MerchantFrame:GetFrameLevel() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua index cce69f8..88c5407 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua @@ -43,7 +43,7 @@ PETBATTLE STYLER ########################################################## ]]-- local function PetBattleStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.petbattleui ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.petbattleui ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua index 4b8b06f..651ce50 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua @@ -22,7 +22,7 @@ PETITIONFRAME STYLER ########################################################## ]]-- local function PetitionFrameStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.petition ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.petition ~= true then return end PetitionFrame:RemoveTextures(true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua index fe0603b..f0d117b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua @@ -88,7 +88,7 @@ FRAME STYLER ########################################################## ]]-- local function PetJournalStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.mounts ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.mounts ~= true then return end STYLE:ApplyWindowStyle(PetJournalParent) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua index 50fe759..88fb1ce 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua @@ -22,7 +22,7 @@ PETSTABLE STYLER ########################################################## ]]-- local function PetStableStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.stable ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.stable ~= true then return end PetStableFrame:RemoveTextures() PetStableFrameInset:RemoveTextures() PetStableLeftInset:RemoveTextures() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua index 5835960..523995b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua @@ -24,7 +24,7 @@ PVP STYLER -- LoadAddOn("Blizzard_PVPUI") local function PVPFrameStyle() - if (SV.SVStyle.db and (SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.pvp ~= true)) then + if (SV.db.SVStyle and (SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.pvp ~= true)) then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua index 0c88961..3c953c1 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua @@ -105,7 +105,7 @@ QUEST STYLERS ########################################################## ]]-- local function QuestGreetingStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.greeting ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.greeting ~= true then return end @@ -117,7 +117,7 @@ local function QuestGreetingStyle() end local function QuestFrameStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.quest ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.quest ~= true then return end STYLE:ApplyWindowStyle(QuestFrame, true, true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua index b1c5a40..4bfac46 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua @@ -46,7 +46,7 @@ RAID STYLERS ]]-- local function RaidUIStyle() if InCombatLockdown() then return end - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.raid ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.raid ~= true then return end for _,group in pairs(RaidGroupList)do if _G[group] then _G[group]:RemoveTextures() @@ -63,7 +63,7 @@ local function RaidUIStyle() end local function RaidInfoStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.nonraid ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.nonraid ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua index 1d9bd23..b8c8ca6 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua @@ -22,7 +22,7 @@ REFORGING STYLER ########################################################## ]]-- local function ReforgingStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.reforge ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.reforge ~= true then return end STYLE:ApplyWindowStyle(ReforgingFrame, true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua index 82e1097..de686ad 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua @@ -222,7 +222,7 @@ SPELLBOOK STYLER ########################################################## ]]-- local function SpellBookStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.spellbook ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.spellbook ~= true then return end STYLE:ApplyWindowStyle(SpellBookFrame) STYLE:ApplyCloseButtonStyle(SpellBookFrameCloseButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua index 8518785..a6455d5 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua @@ -22,7 +22,7 @@ TAXIFRAME STYLER ########################################################## ]]-- local function StoreStyle() - -- if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.store ~= true then + -- if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.store ~= true then -- return -- end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua index 2a9e2d0..dddd84a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua @@ -393,7 +393,7 @@ SYSTEM WIDGET STYLERS ########################################################## ]]-- local function SystemPanelQue() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.misc ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.misc ~= true then return end QueueStatusFrame:RemoveTextures() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua index 61420ba..1583614 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua @@ -45,7 +45,7 @@ TABARDFRAME STYLER ########################################################## ]]-- local function TabardFrameStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.tabard ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.tabard ~= true then return end cleanT(TabardFrame, true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua index 0e56c6e..b677fb5 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua @@ -106,7 +106,7 @@ TALENTFRAME STYLER ########################################################## ]]-- local function TalentFrameStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.talent ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.talent ~= true then return end STYLE:ApplyWindowStyle(PlayerTalentFrame) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua index d09ed79..edd68a1 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua @@ -22,7 +22,7 @@ TAXIFRAME STYLER ########################################################## ]]-- local function TaxiStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.taxi ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.taxi ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua index 20f922d..34b5336 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua @@ -22,7 +22,7 @@ TIMEMANAGER STYLER ########################################################## ]]-- local function TimeManagerStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.timemanager ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.timemanager ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua index bb33998..0230df9 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua @@ -22,7 +22,7 @@ TRADEFRAME STYLER ########################################################## ]]-- local function TradeFrameStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.trade ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.trade ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua index 7f9badf..4c28255 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua @@ -22,7 +22,7 @@ TRADESKILL STYLER ########################################################## ]]-- local function TradeSkillStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.tradeskill ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.tradeskill ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua index bc1a660..67a26bd 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua @@ -41,7 +41,7 @@ TRAINER STYLER ########################################################## ]]-- local function TrainerStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.trainer ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.trainer ~= true then return end ClassTrainerFrame:SetHeight(ClassTrainerFrame:GetHeight() + 42) STYLE:ApplyWindowStyle(ClassTrainerFrame) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua index bbc1cb1..02fca19 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua @@ -49,7 +49,7 @@ TRANSMOG STYLER ########################################################## ]]-- local function TransmogStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.transmogrify ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.transmogrify ~= true then return end STYLE:ApplyWindowStyle(TransmogrifyFrame, true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua index e6d0da6..9a92d60 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua @@ -36,7 +36,7 @@ VOIDSTORAGE STYLER ########################################################## ]]-- local function VoidStorageStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.voidstorage ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.voidstorage ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua index aeb3828..0e965a9 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua @@ -155,7 +155,7 @@ local function WorldMap_OnShow() end end - if not SV.SVMap.db.tinyWorldMap then + if not SV.db.SVMap.tinyWorldMap then BlackoutWorld:SetTexture(0, 0, 0, 1) else BlackoutWorld:SetTexture(0,0,0,0) @@ -179,7 +179,7 @@ WORLDMAP STYLER ########################################################## ]]-- local function WorldMapStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.worldmap ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.worldmap ~= true then return end WorldMapFrame:SetFrameLevel(4) STYLE:ApplyWindowStyle(WorldMapFrame, true, true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua index ce09abb..76184af 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua @@ -22,7 +22,7 @@ WORLDSTATE STYLER ########################################################## ]]-- local function WorldStateStyle() - if SV.SVStyle.db.blizzard.enable ~= true or SV.SVStyle.db.blizzard.bgscore ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.bgscore ~= true then return end WorldStateScoreScrollFrame:RemoveTextures() WorldStateScoreFrame:RemoveTextures() WorldStateScoreFrame:SetPanelTemplate("Halftone") diff --git a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua index d49348b..cc83355 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua +++ b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua @@ -717,7 +717,7 @@ function PLUGIN:Load() name = L["GPS"], desc = L["Use group frame GPS elements"], type = "toggle", - get = function() return SV.SVTracker.db.groups end, + get = function() return SV.db.SVTracker.groups end, set = function(key,value) PLUGIN:ChangeDBVar(value, key[#key]); PLUGIN:UpdateLogWindow() end } @@ -728,7 +728,7 @@ function PLUGIN:Load() name = L["GPS Proximity"], desc = L["Only point to closest low health unit"], type = "toggle", - get = function() return SV.SVTracker.db.proximity end, + get = function() return SV.db.SVTracker.proximity end, set = function(key,value) PLUGIN:ChangeDBVar(value, key[#key]); PLUGIN:UpdateLogWindow() end } @@ -742,7 +742,7 @@ function PLUGIN:Load() min = 6, max = 22, step = 1, - get = function() return SV.SVTracker.db.fontSize end, + get = function() return SV.db.SVTracker.fontSize end, set = function(key,value) PLUGIN:ChangeDBVar(value, key[#key]); PLUGIN:UpdateLogWindow() end }