From bca9894702a786cdbe0d06565545b0618b98799d Mon Sep 17 00:00:00 2001 From: Steven Jackson Date: Tue, 23 Sep 2014 00:37:52 -0500 Subject: [PATCH] New db lib --- Interface/AddOns/SVUI/SVUI.lua | 825 ++++++++++++-- Interface/AddOns/SVUI/SVUI.toc | 2 + Interface/AddOns/SVUI/SVUI.xml | 1 - Interface/AddOns/SVUI/language/chinese_ui.lua | 2 +- Interface/AddOns/SVUI/language/english_ui.lua | 2 +- Interface/AddOns/SVUI/language/french_ui.lua | 2 +- Interface/AddOns/SVUI/language/german_ui.lua | 2 +- Interface/AddOns/SVUI/language/italian_ui.lua | 2 +- Interface/AddOns/SVUI/language/korean_ui.lua | 2 +- Interface/AddOns/SVUI/language/portuguese_ui.lua | 2 +- Interface/AddOns/SVUI/language/russian_ui.lua | 2 +- Interface/AddOns/SVUI/language/spanish_ui.lua | 4 +- Interface/AddOns/SVUI/language/taiwanese_ui.lua | 2 +- .../SVUI/libs/LibLocale-1.0/LibLocale-1.0.lua | 66 -- .../LibSuperVillain-1.0/LibSuperVillain-1.0.lua | 1156 ++++++++++++++++++++ .../SVUI/libs/LibSuperVillain-1.0/src/database.lua | 356 ++++++ .../libs/LibSuperVillain-1.0/src/librarian.lua | 61 ++ .../SVUI/libs/LibSuperVillain-1.0/src/linguist.lua | 74 ++ .../SVUI/libs/LibSuperVillain-1.0/src/registry.lua | 527 +++++++++ .../LibSystemRegistry-1.0.lua | 555 ---------- .../Changelog-libdatabroker-1-1-v1.1.4.txt | 33 + .../libs/libdatabroker-1-1/LibDataBroker-1.1.lua | 90 ++ .../SVUI/libs/libdatabroker-1-1/README.textile | 13 + Interface/AddOns/SVUI/libs/libs.xml | 4 +- .../AddOns/SVUI/packages/actionbar/KeyBind.lua | 2 +- Interface/AddOns/SVUI/packages/actionbar/SVBar.lua | 20 +- .../AddOns/SVUI/packages/actionbar/config.lua | 240 ++++ Interface/AddOns/SVUI/packages/aura/SVAura.lua | 13 +- Interface/AddOns/SVUI/packages/bag/SVBag.lua | 27 +- .../AddOns/SVUI/packages/bag/tools/breakstuff.lua | 2 +- .../AddOns/SVUI/packages/bag/tools/sorting.lua | 2 +- Interface/AddOns/SVUI/packages/chat/SVChat.lua | 19 +- Interface/AddOns/SVUI/packages/dock/SVDock.lua | 39 +- Interface/AddOns/SVUI/packages/gear/SVGear.lua | 9 +- .../AddOns/SVUI/packages/henchmen/SVHenchmen.lua | 13 +- Interface/AddOns/SVUI/packages/map/SVMap.lua | 19 +- .../AddOns/SVUI/packages/override/SVOverride.lua | 15 +- Interface/AddOns/SVUI/packages/plates/SVPlate.lua | 11 +- Interface/AddOns/SVUI/packages/stats/SVStats.lua | 72 +- .../AddOns/SVUI/packages/stats/stats/bags.lua | 6 +- Interface/AddOns/SVUI/packages/stats/stats/cta.lua | 6 +- Interface/AddOns/SVUI/packages/stats/stats/dps.lua | 6 +- .../SVUI/packages/stats/stats/durability.lua | 10 +- .../SVUI/packages/stats/stats/experience.lua | 6 +- .../AddOns/SVUI/packages/stats/stats/friends.lua | 6 +- .../AddOns/SVUI/packages/stats/stats/gold.lua | 17 +- .../AddOns/SVUI/packages/stats/stats/guild.lua | 6 +- Interface/AddOns/SVUI/packages/stats/stats/hps.lua | 6 +- .../SVUI/packages/stats/stats/reputation.lua | 2 +- .../AddOns/SVUI/packages/stats/stats/system.lua | 2 +- .../AddOns/SVUI/packages/stats/stats/time.lua | 6 +- .../AddOns/SVUI/packages/stats/stats/tokens.lua | 6 +- Interface/AddOns/SVUI/packages/tip/SVTip.lua | 15 +- Interface/AddOns/SVUI/packages/unit/SVUnit.lua | 26 +- Interface/AddOns/SVUI/packages/unit/SVUnit.xml | 2 +- Interface/AddOns/SVUI/packages/unit/config.lua | 6 +- .../AddOns/SVUI/packages/unit/elements/auras.lua | 2 +- .../AddOns/SVUI/packages/unit/elements/castbar.lua | 2 +- .../SVUI/packages/unit/elements/essentials.lua | 2 +- .../AddOns/SVUI/packages/unit/elements/misc.lua | 2 +- .../AddOns/SVUI/packages/unit/elements/tags.lua | 2 +- Interface/AddOns/SVUI/packages/unit/frames.lua | 4 +- .../SVUI/packages/unit/resources/deathknight.lua | 2 +- .../AddOns/SVUI/packages/unit/resources/druid.lua | 2 +- .../AddOns/SVUI/packages/unit/resources/hunter.lua | 2 +- .../AddOns/SVUI/packages/unit/resources/mage.lua | 2 +- .../AddOns/SVUI/packages/unit/resources/monk.lua | 2 +- .../SVUI/packages/unit/resources/paladin.lua | 2 +- .../AddOns/SVUI/packages/unit/resources/priest.lua | 2 +- .../AddOns/SVUI/packages/unit/resources/rogue.lua | 2 +- .../AddOns/SVUI/packages/unit/resources/shaman.lua | 2 +- .../SVUI/packages/unit/resources/warlock.lua | 2 +- .../SVUI/packages/unit/resources/warrior.lua | 2 +- Interface/AddOns/SVUI/scripts/comix.lua | 10 +- Interface/AddOns/SVUI/scripts/misc.lua | 29 +- Interface/AddOns/SVUI/scripts/mounts.lua | 6 +- Interface/AddOns/SVUI/scripts/questwatch.lua | 8 +- Interface/AddOns/SVUI/scripts/raid.lua | 6 +- Interface/AddOns/SVUI/scripts/reactions.lua | 8 +- Interface/AddOns/SVUI/scripts/spellbind.lua | 132 +-- Interface/AddOns/SVUI/system/alerts.lua | 25 +- Interface/AddOns/SVUI/system/animate.lua | 4 +- Interface/AddOns/SVUI/system/common.lua | 42 +- Interface/AddOns/SVUI/system/database.lua | 1031 ----------------- Interface/AddOns/SVUI/system/load.lua | 85 +- Interface/AddOns/SVUI/system/media.lua | 8 +- Interface/AddOns/SVUI/system/mentalo.lua | 80 +- Interface/AddOns/SVUI/system/setup.lua | 326 +++--- Interface/AddOns/SVUI/system/slash.lua | 4 +- Interface/AddOns/SVUI/system/timers.lua | 4 +- Interface/AddOns/SVUI/system/utilities.lua | 2 +- Interface/AddOns/SVUI/system/visibility.lua | 2 +- .../SVUI_AnsweringService.lua | 29 +- Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua | 15 +- .../AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua | 248 ++--- .../AddOns/SVUI_ConfigOMatic/language/generic.lua | 2 +- Interface/AddOns/SVUI_ConfigOMatic/modules/art.lua | 16 +- .../AddOns/SVUI_ConfigOMatic/modules/aura.lua | 22 +- Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua | 30 +- Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua | 129 +-- .../AddOns/SVUI_ConfigOMatic/modules/chat.lua | 10 +- .../AddOns/SVUI_ConfigOMatic/modules/dock.lua | 46 +- .../AddOns/SVUI_ConfigOMatic/modules/dynamic.lua | 2 +- .../AddOns/SVUI_ConfigOMatic/modules/filter.lua | 6 +- .../AddOns/SVUI_ConfigOMatic/modules/henchmen.lua | 58 +- Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua | 20 +- .../AddOns/SVUI_ConfigOMatic/modules/mode.lua | 16 +- .../AddOns/SVUI_ConfigOMatic/modules/plate.lua | 51 +- .../AddOns/SVUI_ConfigOMatic/modules/profiles.lua | 31 +- .../AddOns/SVUI_ConfigOMatic/modules/stat.lua | 8 +- Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua | 32 +- .../SVUI_ConfigOMatic/modules/units/core.lua | 254 +++-- .../SVUI_ConfigOMatic/modules/units/focus.lua | 12 +- .../SVUI_ConfigOMatic/modules/units/grid.lua | 36 +- .../SVUI_ConfigOMatic/modules/units/other.lua | 28 +- .../SVUI_ConfigOMatic/modules/units/party.lua | 18 +- .../AddOns/SVUI_ConfigOMatic/modules/units/pet.lua | 20 +- .../SVUI_ConfigOMatic/modules/units/player.lua | 20 +- .../SVUI_ConfigOMatic/modules/units/raid.lua | 30 +- .../SVUI_ConfigOMatic/modules/units/target.lua | 20 +- Interface/AddOns/SVUI_DebugOMatic/Bindings.xml | 5 + .../AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc | 9 + .../AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml | 116 ++ Interface/AddOns/SVUI_DebugOMatic/debug.lua | 297 +++++ Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua | 22 +- .../AddOns/SVUI_Laborer/modes/archaeology.lua | 2 +- Interface/AddOns/SVUI_Laborer/modes/cooking.lua | 2 +- Interface/AddOns/SVUI_Laborer/modes/farming.lua | 2 +- Interface/AddOns/SVUI_Laborer/modes/fishing.lua | 2 +- Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua | 24 +- .../AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua | 54 +- .../AddOns/SVUI_StyleOMatic/addons/achievement.lua | 6 +- Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/archeology.lua | 4 +- .../SVUI_StyleOMatic/addons/auctionhouse.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/barbershop.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/battlefield.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/blackmarket.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/calendar.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/challenges.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/character.lua | 20 +- Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/dressup.lua | 4 +- .../SVUI_StyleOMatic/addons/encounterjournal.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/friends.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/gossip.lua | 4 +- Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua | 12 +- Interface/AddOns/SVUI_StyleOMatic/addons/help.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/inspect.lua | 4 +- .../SVUI_StyleOMatic/addons/itemsocketing.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/keybinding.lua | 4 +- Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/loothistory.lua | 4 +- .../SVUI_StyleOMatic/addons/lossofcontrol.lua | 4 +- Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/mailbox.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/merchant.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/petbattle.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/petition.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/petjournal.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/petstable.lua | 4 +- Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua | 4 +- Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua | 6 +- Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua | 34 +- .../AddOns/SVUI_StyleOMatic/addons/reforging.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/spellbook.lua | 4 +- Interface/AddOns/SVUI_StyleOMatic/addons/store.lua | 4 +- .../SVUI_StyleOMatic/addons/supervillain.lua | 2 +- .../AddOns/SVUI_StyleOMatic/addons/system.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/tabard.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/talents.lua | 4 +- Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua | 4 +- .../SVUI_StyleOMatic/addons/thirdparty/ACP.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua | 2 +- .../addons/thirdparty/Altoholic.lua | 2 +- .../addons/thirdparty/AtlasLoot.lua | 2 +- .../addons/thirdparty/AuctionLite.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/Clique.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/Cooline.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/DBM.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/DXE.lua | 2 +- .../addons/thirdparty/LightHeaded.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/Mogit.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/Omen.lua | 2 +- .../addons/thirdparty/Outfitter.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/Postal.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/Quartz.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/Recount.lua | 2 +- .../addons/thirdparty/SexyCooldown.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/Skada.lua | 6 +- .../SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/TomTom.lua | 2 +- .../addons/thirdparty/TradeSkillDW.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/VEM.lua | 2 +- .../addons/thirdparty/alDamageMeter.lua | 2 +- .../AddOns/SVUI_StyleOMatic/addons/timemanager.lua | 4 +- Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/tradeskill.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/trainer.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/transmog.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/voidstorage.lua | 4 +- .../AddOns/SVUI_StyleOMatic/addons/worldmap.lua | 6 +- .../AddOns/SVUI_StyleOMatic/addons/worldstate.lua | 4 +- .../AddOns/SVUI_StyleOMatic/common/methods.lua | 2 +- .../SVUI_TrackingDevice/SVUI_TrackingDevice.lua | 22 +- 208 files changed, 5158 insertions(+), 3192 deletions(-) delete mode 100644 Interface/AddOns/SVUI/libs/LibLocale-1.0/LibLocale-1.0.lua create mode 100644 Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua create mode 100644 Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/src/database.lua create mode 100644 Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/src/librarian.lua create mode 100644 Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/src/linguist.lua create mode 100644 Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/src/registry.lua delete mode 100644 Interface/AddOns/SVUI/libs/LibSystemRegistry-1.0/LibSystemRegistry-1.0.lua create mode 100644 Interface/AddOns/SVUI/libs/libdatabroker-1-1/Changelog-libdatabroker-1-1-v1.1.4.txt create mode 100644 Interface/AddOns/SVUI/libs/libdatabroker-1-1/LibDataBroker-1.1.lua create mode 100644 Interface/AddOns/SVUI/libs/libdatabroker-1-1/README.textile create mode 100644 Interface/AddOns/SVUI/packages/actionbar/config.lua delete mode 100644 Interface/AddOns/SVUI/system/database.lua create mode 100644 Interface/AddOns/SVUI_DebugOMatic/Bindings.xml create mode 100644 Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc create mode 100644 Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml create mode 100644 Interface/AddOns/SVUI_DebugOMatic/debug.lua diff --git a/Interface/AddOns/SVUI/SVUI.lua b/Interface/AddOns/SVUI/SVUI.lua index cd0fdcb..598ef0e 100644 --- a/Interface/AddOns/SVUI/SVUI.lua +++ b/Interface/AddOns/SVUI/SVUI.lua @@ -52,55 +52,23 @@ local twipe, tsort, tconcat = table.wipe, table.sort, table.concat; --[[ GET THE REGISTRY LIB ]]-- -local LibRegistry = LibStub("LibSystemRegistry-1.0") +local SVLib = LibStub("LibSuperVillain-1.0"); --[[ LOCALS ]]-- local callbacks = {}; local numCallbacks = 0; -local playerClass = select(2,UnitClass("player")); +local playerClass = select(2, UnitClass("player")); +local filterClass = playerClass or "NONE" local actualWidth, actualHeight = UIParent:GetSize() --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- -function enforce(condition, ...) - if not condition then - if next({...}) then - local fn = function (...) return(string.format(...)) end - local s,r = pcall(fn, ...) - if s then - error("Error!: " .. r, 2) - end - end - error("Error!", 2) - end -end local assert = enforce; --[[ CLASS COLOR LOCALS ]]-- -local function formatValueString(text) - if "string" == type(text) then - text = gsub(text,"\n","\\n") - if match(gsub(text,"[^'\"]",""),'^"+$') then - return "'"..text.."'"; - else - return '"'..gsub(text,'"','\\"')..'"'; - end - else - return tostring(text); - end -end - -local function formatKeyString(text) - if "string"==type(text) and match(text,"^[_%a][_%a%d]*$") then - return text; - else - return "["..formatValueString(text).."]"; - end -end - local function RegisterCallback(self, m, h) assert(type(m) == "string" or type(m) == "function", "Bad argument #1 to :RegisterCallback (string or function expected)") if type(m) == "string" then @@ -178,77 +146,43 @@ do classes = nil end ---[[ APPENDED LUA METHODS ]]-- - -function math.parsefloat(value,decimal) - if decimal and decimal > 0 then - local calc1 = 10 ^ decimal; - local calc2 = (value * calc1) + 0.5; - return floor(calc2) / calc1 - end - return floor(value + 0.5) -end +--[[ CORE ENGINE CONSTRUCT ]]-- -function table.dump(targetTable) - local dumpTable = {}; - local dumpCheck = {}; - for key,value in ipairs(targetTable) do - tinsert(dumpTable, formatValueString(value)); - dumpCheck[key] = true; - end - for key,value in pairs(targetTable) do - if not dumpCheck[key] then - tinsert(dumpTable, "\n "..formatKeyString(key).." = "..formatValueString(value)); - end - end - local output = tconcat(dumpTable, ", "); - return "{ "..output.." }"; -end +local messagePattern = "|cffFF2F00%s:|r"; +local debugPattern = "|cffFF2F00%s|r [|cff992FFF%s|r]|cffFF2F00:|r"; -function table.copy(targetTable,deepCopy,mergeTable) - mergeTable = mergeTable or {}; - if targetTable==nil then return nil end - if mergeTable[targetTable] then return mergeTable[targetTable] end - local replacementTable = {} - for key,value in pairs(targetTable)do - if deepCopy and type(value) == "table" then - replacementTable[key] = table.copy(value, deepCopy, mergeTable) - else - replacementTable[key] = value - end - end - setmetatable(replacementTable, table.copy(getmetatable(targetTable), deepCopy, mergeTable)) - mergeTable[targetTable] = replacementTable; - return replacementTable +local function _sendmessage(msg, prefix) + if(type(msg) == "table") then + msg = tostring(msg) + end + if(not msg) then return end + if(prefix) then + local outbound = ("%s %s"):format(prefix, msg); + print(outbound) + else + print(msg) + end end -function string.trim(this) - return this:find('^%s*$') and '' or this:match('^%s*(.*%S)') -end +local Core_DeadFunction = function() return end -function string.color(this, color) - return ("|cff%s%s|r"):format(color, this) +local Core_StaticPopup_Show = function(self, arg) + if arg == "ADDON_ACTION_FORBIDDEN" then + StaticPopup_Hide(arg) + end end -function string.link(this, prefix, text, color) - text = tostring(text) - local colorstring = tostring(this):color(color or "ffffff") - return ("|H%s:%s|h%s|h"):format(prefix, text, colorstring) +local Core_Debugger = function(self, msg) + if(not self.___debugging) then return end + local outbound = (debugPattern):format(self.___addonName, "DEBUG") + _sendmessage(msg, outbound) end -function string.explode(str, delim) - local res = { } - local pattern = string.format("([^%s]+)%s()", delim, delim) - while (true) do - line, pos = str:match(pattern, pos) - if line == nil then break end - table.insert(res, line) - end - return res +local Core_AddonMessage = function(self, msg) + local outbound = (messagePattern):format(self.___addonName) + _sendmessage(msg, outbound) end ---[[ CORE ENGINE CONSTRUCT ]]-- - local Core_ResetAllUI = function(self, confirmed) if InCombatLockdown()then SendAddonMessage(ERR_NOT_IN_COMBAT) @@ -273,6 +207,12 @@ local Core_ResetUI = function(self, confirmed) self:ResetMovables() end +local Core_ImportProfile = function(self, key) + self.SystemAlert["COPY_PROFILE_PROMPT"].text = L["Are you sure you want to copy the profile '" .. key .. "'?"] + self.SystemAlert["COPY_PROFILE_PROMPT"].OnAccept = function() SVLib:ImportDatabase(key) end + self:StaticPopup_Show("COPY_PROFILE_PROMPT") +end + local Core_ToggleConfig = function(self) if InCombatLockdown() then SendAddonMessage(ERR_NOT_IN_COMBAT) @@ -319,7 +259,7 @@ end --[[ INITIALIZE THE CORE OBJECT ]]-- -local SVUI = LibRegistry:InitializeCore() +local SVUI = SVLib:NewCore("SVUI_Global", "SVUI_Profile", "SVUI_Cache") SVUI.Snap = {} SVUI.Media = {} @@ -337,10 +277,15 @@ SVUI.ActualWidth = actualWidth SVUI.yScreenArea = (actualHeight * 0.33) SVUI.xScreenArea = (actualWidth * 0.33) +SVUI.fubar = Core_DeadFunction SVUI.ResetAllUI = Core_ResetAllUI SVUI.ResetUI = Core_ResetUI SVUI.ToggleConfig = Core_ToggleConfig SVUI.TaintHandler = Core_TaintHandler +SVUI.ImportProfile = Core_ImportProfile +SVUI.AddonMessage = Core_AddonMessage +SVUI.Debugger = Core_Debugger +SVUI.StaticPopup_Show = Core_StaticPopup_Show --[[ UTILITY FRAMES ]]-- @@ -381,7 +326,7 @@ SVUI.Options = { active = { order = 1, type = "description", - name = function() return LibRegistry:GetPlugins() end + name = function() return SVLib:GetPlugins() end } } }, @@ -390,4 +335,688 @@ SVUI.Options = { } } } -} \ No newline at end of file +} +--[[ +##################################################################################### + /$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$$$/$$$$$$ /$$$$$$ /$$$$$$ + /$$__ $$ /$$__ $$| $$$ | $$| $$_____/_ $$_/ /$$__ $$ /$$__ $$ +| $$ \__/| $$ \ $$| $$$$| $$| $$ | $$ | $$ \__/| $$ \__/ +| $$ | $$ | $$| $$ $$ $$| $$$$$ | $$ | $$ /$$$$| $$$$$$ +| $$ | $$ | $$| $$ $$$$| $$__/ | $$ | $$|_ $$ \____ $$ +| $$ $$| $$ | $$| $$\ $$$| $$ | $$ | $$ \ $$ /$$ \ $$ +| $$$$$$/| $$$$$$/| $$ \ $$| $$ /$$$$$$| $$$$$$/| $$$$$$/ + \______/ \______/ |__/ \__/|__/ |______/ \______/ \______/ +##################################################################################### +]]-- +local function safename(id) + local n = GetSpellInfo(id) + if not n then + if type(id) == "string" then + n = id + else + SVUI:Debugger('|cffFF9900SVUI:|r Spell not found: (#ID) '..id) + n = "Voodoo Doll"; + end + end + return n +end + +--[[ SYSTEM DATA ]]-- + +local BUFFWATCH_BY_CLASS = { + PRIEST = { + {-- Weakened Soul + ["enabled"] = true, + ["id"] = 6788, + ["point"] = "TOPRIGHT", + ["color"] = {["r"] = 1, ["g"] = 0, ["b"] = 0}, + ["anyUnit"] = true, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Prayer of Mending + ["enabled"] = true, + ["id"] = 41635, + ["point"] = "BOTTOMRIGHT", + ["color"] = {["r"] = 0.2, ["g"] = 0.7, ["b"] = 0.2}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Renew + ["enabled"] = true, + ["id"] = 139, + ["point"] = "BOTTOMLEFT", + ["color"] = {["r"] = 0.4, ["g"] = 0.7, ["b"] = 0.2}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Power Word: Shield + ["enabled"] = true, + ["id"] = 17, + ["point"] = "TOPLEFT", + ["color"] = {["r"] = 0.81, ["g"] = 0.85, ["b"] = 0.1}, + ["anyUnit"] = true, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Power Word: Shield Power Insight + ["enabled"] = true, + ["id"] = 123258, + ["point"] = "TOPLEFT", + ["color"] = {["r"] = 0.81, ["g"] = 0.85, ["b"] = 0.1}, + ["anyUnit"] = true, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Power Infusion + ["enabled"] = true, + ["id"] = 10060, + ["point"] = "RIGHT", + ["color"] = {["r"] = 0.89, ["g"] = 0.09, ["b"] = 0.05}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Guardian Spirit + ["enabled"] = true, + ["id"] = 47788, + ["point"] = "LEFT", + ["color"] = {["r"] = 0.86, ["g"] = 0.44, ["b"] = 0}, + ["anyUnit"] = true, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Pain Suppression + ["enabled"] = true, + ["id"] = 33206, + ["point"] = "LEFT", + ["color"] = {["r"] = 0.89, ["g"] = 0.09, ["b"] = 0.05}, + ["anyUnit"] = true, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + }, + DRUID = { + {-- Rejuvenation + ["enabled"] = true, + ["id"] = 774, + ["point"] = "TOPRIGHT", + ["color"] = {["r"] = 0.8, ["g"] = 0.4, ["b"] = 0.8}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Regrowth + ["enabled"] = true, + ["id"] = 8936, + ["point"] = "BOTTOMLEFT", + ["color"] = {["r"] = 0.2, ["g"] = 0.8, ["b"] = 0.2}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Lifebloom + ["enabled"] = true, + ["id"] = 33763, + ["point"] = "TOPLEFT", + ["color"] = {["r"] = 0.4, ["g"] = 0.8, ["b"] = 0.2}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Wild Growth + ["enabled"] = true, + ["id"] = 48438, + ["point"] = "BOTTOMRIGHT", + ["color"] = {["r"] = 0.8, ["g"] = 0.4, ["b"] = 0}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + }, + PALADIN = { + {-- Beacon of Light + ["enabled"] = true, + ["id"] = 53563, + ["point"] = "TOPRIGHT", + ["color"] = {["r"] = 0.7, ["g"] = 0.3, ["b"] = 0.7}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Hand of Protection + ["enabled"] = true, + ["id"] = 1022, + ["point"] = "BOTTOMRIGHT", + ["color"] = {["r"] = 0.2, ["g"] = 0.2, ["b"] = 1}, + ["anyUnit"] = true, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Hand of Freedom + ["enabled"] = true, + ["id"] = 1044, + ["point"] = "BOTTOMRIGHT", + ["color"] = {["r"] = 0.89, ["g"] = 0.45, ["b"] = 0}, + ["anyUnit"] = true, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Hand of Salvation + ["enabled"] = true, + ["id"] = 1038, + ["point"] = "BOTTOMRIGHT", + ["color"] = {["r"] = 0.93, ["g"] = 0.75, ["b"] = 0}, + ["anyUnit"] = true, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Hand of Sacrifice + ["enabled"] = true, + ["id"] = 6940, + ["point"] = "BOTTOMRIGHT", + ["color"] = {["r"] = 0.89, ["g"] = 0.1, ["b"] = 0.1}, + ["anyUnit"] = true, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Hand of Purity + ["enabled"] = true, + ["id"] = 114039, + ["point"] = "BOTTOMRIGHT", + ["color"] = {["r"] = 0.64, ["g"] = 0.41, ["b"] = 0.72}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Sacred Shield + ["enabled"] = true, + ["id"] = 20925, + ["point"] = "TOPLEFT", + ["color"] = {["r"] = 0.93, ["g"] = 0.75, ["b"] = 0}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Eternal Flame + ["enabled"] = true, + ["id"] = 114163, + ["point"] = "BOTTOMLEFT", + ["color"] = {["r"] = 0.87, ["g"] = 0.7, ["b"] = 0.03}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + }, + SHAMAN = { + {-- Riptide + ["enabled"] = true, + ["id"] = 61295, + ["point"] = "TOPRIGHT", + ["color"] = {["r"] = 0.7, ["g"] = 0.3, ["b"] = 0.7}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Earth Shield + ["enabled"] = true, + ["id"] = 974, + ["point"] = "BOTTOMLEFT", + ["color"] = {["r"] = 0.2, ["g"] = 0.7, ["b"] = 0.2}, + ["anyUnit"] = true, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Earthliving + ["enabled"] = true, + ["id"] = 51945, + ["point"] = "BOTTOMRIGHT", + ["color"] = {["r"] = 0.7, ["g"] = 0.4, ["b"] = 0.4}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + }, + MONK = { + {--Renewing Mist + ["enabled"] = true, + ["id"] = 119611, + ["point"] = "TOPLEFT", + ["color"] = {["r"] = 0.8, ["g"] = 0.4, ["b"] = 0.8}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Life Cocoon + ["enabled"] = true, + ["id"] = 116849, + ["point"] = "TOPRIGHT", + ["color"] = {["r"] = 0.2, ["g"] = 0.8, ["b"] = 0.2}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Enveloping Mist + ["enabled"] = true, + ["id"] = 132120, + ["point"] = "BOTTOMLEFT", + ["color"] = {["r"] = 0.4, ["g"] = 0.8, ["b"] = 0.2}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Zen Sphere + ["enabled"] = true, + ["id"] = 124081, + ["point"] = "BOTTOMRIGHT", + ["color"] = {["r"] = 0.7, ["g"] = 0.4, ["b"] = 0}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + }, + ROGUE = { + {-- Tricks of the Trade + ["enabled"] = true, + ["id"] = 57934, + ["point"] = "TOPRIGHT", + ["color"] = {["r"] = 0.89, ["g"] = 0.09, ["b"] = 0.05}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + }, + MAGE = { + {-- Ice Ward + ["enabled"] = true, + ["id"] = 111264, + ["point"] = "TOPLEFT", + ["color"] = {["r"] = 0.2, ["g"] = 0.2, ["b"] = 1}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + }, + WARRIOR = { + {-- Vigilance + ["enabled"] = true, + ["id"] = 114030, + ["point"] = "TOPLEFT", + ["color"] = {["r"] = 0.2, ["g"] = 0.2, ["b"] = 1}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Intervene + ["enabled"] = true, + ["id"] = 3411, + ["point"] = "TOPRIGHT", + ["color"] = {["r"] = 0.89, ["g"] = 0.09, ["b"] = 0.05}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Safe Guard + ["enabled"] = true, + ["id"] = 114029, + ["point"] = "TOPRIGHT", + ["color"] = {["r"] = 0.89, ["g"] = 0.09, ["b"] = 0.05}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + }, + DEATHKNIGHT = { + {-- Unholy Frenzy + ["enabled"] = true, + ["id"] = 49016, + ["point"] = "TOPRIGHT", + ["color"] = {["r"] = 0.89, ["g"] = 0.09, ["b"] = 0.05}, + ["anyUnit"] = false, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + }, + NONE = {} +} + +local FilterIDs = { + ["Blocked"] = [[36900,36901,36893,114216,97821,36032,132365,8733,57724,25771,57723,36032,58539,26013,6788,71041,41425,55711,8326,23445,24755,25163,80354,95809,95223,124275,124274,124273,117870,123981,15007,113942,89140]], + ["Allowed"] = [[31821,2825,32182,80353,90355,47788,33206,116849,22812,1490,116202,123059,136431,137332,137375,144351,142863,142864,142865,143198]], + ["Strict"] = [[123059,136431,137332,137375,144351,142863,142864,142865,143198]], + ["CC"] = [[47476,91800,91807,91797,108194,115001,33786,2637,339,78675,22570,5211,9005,102359,99,127797,45334,102795,114238,113004,3355,1513,19503,34490,24394,64803,19386,117405,128405,50519,91644,90337,54706,4167,90327,56626,50245,50541,96201,96201,31661,118,55021,122,82691,118271,44572,33395,102051,20066,10326,853,105593,31935,105421,605,64044,8122,9484,15487,114404,88625,113792,87194,2094,1776,6770,1833,51722,1330,408,88611,115197,113953,51514,64695,63685,76780,118905,118345,710,6789,118699,5484,6358,30283,24259,115782,115268,118093,89766,137143,20511,7922,676,105771,107566,132168,107570,118895,18498,116706,117368,115078,122242,119392,119381,120086,116709,123407,140023,25046,20549,107079]], + ["Shield"] = [[17,47515,45243,45438,115610,48797,48792,49039,87256,55233,50461,33206,47788,62618,47585,104773,110913,108359,22812,102342,106922,61336,19263,53480,1966,31224,74001,5277,45182,98007,30823,108271,1022,6940,114039,31821,498,642,86659,31850,118038,55694,97463,12975,114029,871,114030,120954,131523,122783,122278,115213,116849,20594]], + ["Player"] = [[17,47515,45243,45438,45438,115610,110909,12051,12472,80353,12042,32612,110960,108839,111264,108843,48797,48792,49039,87256,49222,55233,50461,49016,51271,96268,33206,47788,62618,47585,6346,10060,114239,119032,27827,104773,110913,108359,113860,113861,113858,88448,22812,102342,106922,61336,117679,102543,102558,102560,16689,132158,106898,1850,106951,29166,52610,69369,112071,124974,19263,53480,51755,54216,34471,3045,3584,131894,90355,90361,31224,74001,5277,45182,51713,114018,2983,121471,11327,108212,57933,79140,13750,98007,30823,108271,16188,2825,79206,16191,8178,58875,108281,108271,16166,114896,1044,1022,1038,6940,114039,31821,498,642,86659,20925,31850,31884,53563,31842,54428,105809,85499,118038,55694,97463,12975,114029,871,114030,18499,1719,23920,114028,46924,3411,107574,120954,131523,122783,122278,115213,116849,125174,116841,20594,59545,20572,26297,68992]], + ["Raid"] = [[116281,116784,116417,116942,116161,117708,118303,118048,118135,117878,117949,116835,116778,116525,122761,122760,122740,123812,123180,123474,122835,123081,122125,121885,121949,117436,118091,117519,122752,123011,116161,123121,119985,119086,119775,122151,138349,137371,136767,137641,137359,137972,136903,136753,137633,137731,133767,133768,136050,138569,134691,137440,137408,137360,135000,143436,143579,147383,146124,144851,144358,144774,147207,144215,143990,144330,143494,142990,143919,143766,143773,146589,143777,143385,143974,145183]] +} + +local FilterOverrides = { + ["45438"] = 5, ["48797"] = 5, ["87256"] = 4, + ["33206"] = 3, ["47585"] = 5, ["22812"] = 2, + ["102342"] = 2, ["19263"] = 5, ["5277"] = 5, + ["1022"] = 5, ["31821"] = 3, ["498"] = 2, + ["642"] = 5, ["86659"] = 4, ["31850"] = 4, + ["118038"] = 5, ["114029"] = 2, ["871"] = 3, + ["120954"] = 2, ["131523"] = 5 +} + +--[[ CACHE DATA ]]-- + +SVUI.db = { + ["cooldown"] = true, + ["autoScale"] = true, + ["multiMonitor"] = false, + ["taintLog"] = false, + ["stickyFrames"] = true, + ["loginmessage"] = true, + ["hideErrorFrame"] = true, + ["threatbar"] = false, + ["bubbles"] = true, + ["comix"] = true, + ["bigComix"] = true, + ["questWatch"] = true, + ["woot"] = true, + ["pvpinterrupt"] = true, + ["lookwhaticando"] = false, + ["reactionChat"] = false, + ["reactionEmote"] = false, + ["sharingiscaring"] = false, + ["arenadrink"] = true, + ["stupidhat"] = true, + ["totems"] = { + ["enable"] = true, + ["showBy"] = "VERTICAL", + ["sortDirection"] = "ASCENDING", + ["size"] = 40, + ["spacing"] = 4 + }, + ["media"] = { + ["fonts"] = { + ["default"] = "SVUI System Font", + ["name"] = "SVUI Name Font", + ["number"] = "SVUI Number Font", + ["combat"] = "SVUI Combat Font", + ["giant"] = "SVUI Action Font", + ["size"] = 10, + ["unicodeSize"] = 12, + }, + ["textures"] = { + ["pattern"] = "SVUI Backdrop 1", + ["comic"] = "SVUI Comic 1", + ["unitlarge"] = "SVUI Unit BG 3", + ["unitsmall"] = "SVUI Small BG 3" + }, + ["colors"] = { + ["default"] = {0.2, 0.2, 0.2, 1}, + ["special"] = {0.37, 0.32, 0.29, 1}, + }, + ["unitframes"] = { + ["health"] = {0.3, 0.5, 0.3}, + ["power"] = { + ["MANA"] = {0.41, 0.85, 1}, + ["RAGE"] = {1, 0.31, 0.31}, + ["FOCUS"] = {1, 0.63, 0.27}, + ["ENERGY"] = {0.85, 0.83, 0.25}, + ["RUNES"] = {0.55, 0.57, 0.61}, + ["RUNIC_POWER"] = {0, 0.82, 1}, + ["FUEL"] = {0, 0.75, 0.75} + }, + ["reaction"] = { + [1] = {0.92, 0.15, 0.15}, + [2] = {0.92, 0.15, 0.15}, + [3] = {0.92, 0.15, 0.15}, + [4] = {0.85, 0.85, 0.13}, + [5] = {0.19, 0.85, 0.13}, + [6] = {0.19, 0.85, 0.13}, + [7] = {0.19, 0.85, 0.13}, + [8] = {0.19, 0.85, 0.13}, + }, + ["tapped"] = {0.55, 0.57, 0.61}, + ["disconnected"] = {0.84, 0.75, 0.65}, + ["casting"] = {0.8, 0.8, 0}, + ["spark"] = {1, 0.72, 0}, + ["interrupt"] = {0.78, 0.25, 0.25}, + ["shield_bars"] = {0.56, 0.4, 0.62}, + ["buff_bars"] = {0.31, 0.31, 0.31}, + ["debuff_bars"] = {0.8, 0.1, 0.1}, + ["predict"] = { + ["personal"] = {0, 1, 0.5, 0.25}, + ["others"] = {0, 1, 0, 0.25}, + ["absorbs"] = {1, 1, 0, 0.25} + }, + ["spellcolor"] = { + [safename(2825)] = {0.98, 0.57, 0.11}, --Bloodlust + [safename(32182)] = {0.98, 0.57, 0.11}, --Heroism + [safename(80353)] = {0.98, 0.57, 0.11}, --Time Warp + [safename(90355)] = {0.98, 0.57, 0.11}, --Ancient Hysteria + [safename(84963)] = {0.98, 0.57, 0.11}, --Inquisition + [safename(86659)] = {0.98, 0.57, 0.11}, --Guardian of Ancient Kings + } + } + }, + ["filter"] = { + ["CC"] = {}, + ["Shield"] = {}, + ["Player"] = {}, + ["Blocked"] = {}, + ["Allowed"] = {}, + ["Strict"] = {}, + ["Raid"] = {}, + ["BuffWatch"] = BUFFWATCH_BY_CLASS[filterClass], + ["PetBuffWatch"] = { + {-- Frenzy + ["enabled"] = true, + ["id"] = 19615, + ["point"] = "TOPLEFT", + ["color"] = {["r"] = 0.89, ["g"] = 0.09, ["b"] = 0.05}, + ["anyUnit"] = true, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + {-- Mend Pet + ["enabled"] = true, + ["id"] = 136, + ["point"] = "TOPRIGHT", + ["color"] = {["r"] = 0.2, ["g"] = 0.8, ["b"] = 0.2}, + ["anyUnit"] = true, + ["onlyShowMissing"] = false, + ['style'] = 'coloredIcon', + ['displayText'] = false, + ['textColor'] = {["r"] = 1, ["g"] = 1, ["b"] = 1}, + ['textThreshold'] = -1, + ['xOffset'] = 0, + ['yOffset'] = 0 + }, + } + } +} + +for k, x in pairs(FilterIDs) do + local src = {}; + for id in x:gmatch("([^,]+)") do + if(id) then + local saved + local n = safename(id); + local p = FilterOverrides[tostring(id)] or 0; + if k == "Strict" then + saved = {['enable'] = true, ['spellID'] = id, ['priority'] = p} + else + saved = {['enable'] = true, ['priority'] = p} + end + src[n] = saved + end + end + SVUI.db.filter[k] = src +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc index 4e786df..e2f5a4e 100644 --- a/Interface/AddOns/SVUI/SVUI.toc +++ b/Interface/AddOns/SVUI/SVUI.toc @@ -6,6 +6,8 @@ ## SavedVariables: SVUI_Global ## SavedVariablesPerCharacter: SVUI_Profile, SVUI_Cache ## OptionalDeps: Blizzard_DebugTools, Blizzard_PetJournal, SharedMedia +## X-SVUI-Header: SuperVillain UI +## X-SVUI-Schema: Core ## X-oUF: oUF_Villain ## X-Notes: Special thanks to Elv and Tukz for their incredible work. ## X-Email: munglunch@gmail.com diff --git a/Interface/AddOns/SVUI/SVUI.xml b/Interface/AddOns/SVUI/SVUI.xml index 3c8071d..4a30819 100644 --- a/Interface/AddOns/SVUI/SVUI.xml +++ b/Interface/AddOns/SVUI/SVUI.xml @@ -16,7 +16,6 @@