diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc index 53928be..a8021e8 100644 --- a/Interface/AddOns/SVUI/SVUI.toc +++ b/Interface/AddOns/SVUI/SVUI.toc @@ -1,10 +1,10 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.2 +## Version: 5.3.0 ## Title: |cffFF9900SVUI|r ## Notes: Supervillain UI [|cff9911FFCore Framework|r]. ## SavedVariables: SVUI_Global, SVUI_Errors -## SavedVariablesPerCharacter: SVUI_Profile, SVUI_Cache, SVUI_Filters +## SavedVariablesPerCharacter: SVUI_Profile, SVUI_Cache, SVUI_Filters, SVUI_Layouts ## OptionalDeps: Blizzard_DebugTools, Blizzard_PetJournal, SharedMedia ## X-SVUIName: SuperVillain UI ## X-SVUISchema: Core diff --git a/Interface/AddOns/SVUI/assets/artwork/Template/AFK-NARRATIVE.blp b/Interface/AddOns/SVUI/assets/artwork/Template/AFK-NARRATIVE.blp new file mode 100644 index 0000000..7a2ca02 Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Template/AFK-NARRATIVE.blp differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Unitframe/FOLLOWER-LEVEL.blp b/Interface/AddOns/SVUI/assets/artwork/Unitframe/FOLLOWER-LEVEL.blp index ea67b69..ab484de 100644 Binary files a/Interface/AddOns/SVUI/assets/artwork/Unitframe/FOLLOWER-LEVEL.blp and b/Interface/AddOns/SVUI/assets/artwork/Unitframe/FOLLOWER-LEVEL.blp differ diff --git a/Interface/AddOns/SVUI/data/defaults.lua b/Interface/AddOns/SVUI/data/defaults.lua index d45d163..e970336 100644 --- a/Interface/AddOns/SVUI/data/defaults.lua +++ b/Interface/AddOns/SVUI/data/defaults.lua @@ -57,7 +57,6 @@ SV.defaults["general"] = { ["taintLog"] = false, ["stickyFrames"] = true, ["loginmessage"] = true, - ["hideErrorFrame"] = true, ["threatbar"] = false, ["bubbles"] = true, ["comix"] = true, @@ -557,6 +556,54 @@ SV.defaults["SVOverride"] = { ["lootRoll"] = true, ["lootRollWidth"] = 328, ["lootRollHeight"] = 28, + ["filterErrors"] = true, + ["hideErrorFrame"] = true, + ["errorFilters"] = { + [INTERRUPTED] = false, + [ERR_ABILITY_COOLDOWN] = true, + [ERR_ATTACK_CHANNEL] = false, + [ERR_ATTACK_CHARMED] = false, + [ERR_ATTACK_CONFUSED] = false, + [ERR_ATTACK_DEAD] = false, + [ERR_ATTACK_FLEEING] = false, + [ERR_ATTACK_MOUNTED] = true, + [ERR_ATTACK_PACIFIED] = false, + [ERR_ATTACK_STUNNED] = false, + [ERR_AUTOFOLLOW_TOO_FAR] = false, + [ERR_BADATTACKFACING] = false, + [ERR_BADATTACKPOS] = false, + [ERR_CLIENT_LOCKED_OUT] = false, + [ERR_GENERIC_NO_TARGET] = true, + [ERR_GENERIC_NO_VALID_TARGETS] = true, + [ERR_GENERIC_STUNNED] = false, + [ERR_INVALID_ATTACK_TARGET] = true, + [ERR_ITEM_COOLDOWN] = true, + [ERR_NOEMOTEWHILERUNNING] = false, + [ERR_NOT_IN_COMBAT] = false, + [ERR_NOT_WHILE_DISARMED] = false, + [ERR_NOT_WHILE_FALLING] = false, + [ERR_NOT_WHILE_MOUNTED] = false, + [ERR_NO_ATTACK_TARGET] = true, + [ERR_OUT_OF_ENERGY] = true, + [ERR_OUT_OF_FOCUS] = true, + [ERR_OUT_OF_MANA] = true, + [ERR_OUT_OF_RAGE] = true, + [ERR_OUT_OF_RANGE] = true, + [ERR_OUT_OF_RUNES] = true, + [ERR_OUT_OF_RUNIC_POWER] = true, + [ERR_SPELL_COOLDOWN] = true, + [ERR_SPELL_OUT_OF_RANGE] = false, + [ERR_TOO_FAR_TO_INTERACT] = false, + [ERR_USE_BAD_ANGLE] = false, + [ERR_USE_CANT_IMMUNE] = false, + [ERR_USE_TOO_FAR] = false, + [SPELL_FAILED_BAD_IMPLICIT_TARGETS] = true, + [SPELL_FAILED_BAD_TARGETS] = true, + [SPELL_FAILED_CASTER_AURASTATE] = true, + [SPELL_FAILED_NO_COMBO_POINTS] = true, + [SPELL_FAILED_SPELL_IN_PROGRESS] = true, + [SPELL_FAILED_TARGET_AURASTATE] = true, + } }; SV.defaults["SVPlate"] = { @@ -690,19 +737,15 @@ SV.defaults["SVTools"] = { SV.defaults["SVUnit"] = { ["enable"] = true, ["disableBlizzard"] = true, - ["smoothbars"] = false, ["statusbar"] = "SVUI BasicBar", ["auraBarStatusbar"] = "SVUI BasicBar", - ["font"] = "SVUI Number Font", ["fontSize"] = 12, ["fontOutline"] = "OUTLINE", - ["auraFont"] = "SVUI Alert Font", ["auraFontSize"] = 12, ["auraFontOutline"] = "OUTLINE", - ["OORAlpha"] = 0.4, ["groupOORAlpha"] = 0.2, ["combatFadeRoles"] = true, @@ -2714,5 +2757,5 @@ SV.defaults["SVUnit"] = { ["width"] = 120, ["height"] = 28, }, - } + }, } \ No newline at end of file diff --git a/Interface/AddOns/SVUI/framework/widgets/widget_afk.lua b/Interface/AddOns/SVUI/framework/widgets/widget_afk.lua index ffed438..dc00e16 100644 --- a/Interface/AddOns/SVUI/framework/widgets/widget_afk.lua +++ b/Interface/AddOns/SVUI/framework/widgets/widget_afk.lua @@ -73,6 +73,11 @@ function SV.AFK:Initialize() self:SetFrameLevel(0) self:SetAllPoints(SV.Screen) + local narr = self.Model:CreateTexture(nil, "OVERLAY") + narr:Size(300, 150) + narr:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Template\\AFK-NARRATIVE") + narr:Point("TOPLEFT", SV.Screen, "TOPLEFT", 15, -15) + self.Model:ClearAllPoints() self.Model:Size(600,600) self.Model:Point("BOTTOMRIGHT", self, "BOTTOMRIGHT", 64, -64) diff --git a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua index acb6d1d..6903542 100644 --- a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua +++ b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua @@ -90,8 +90,9 @@ local ERROR_FILENAME = CoreName.."_Errors"; local PROFILE_FILENAME = CoreName.."_Profile"; local CACHE_FILENAME = CoreName.."_Cache"; local FILTERS_FILENAME = CoreName.."_Filters"; +local LAYOUTS_FILENAME = CoreName.."_Layouts"; local SOURCE_KEY = 1; -local GLOBAL_SV, PROFILE_SV, CACHE_SV, FILTER_SV, ERROR_CACHE, PLUGINS, MODULES; +local GLOBAL_SV, PROFILE_SV, CACHE_SV, FILTER_SV, LAYOUT_SV, ERROR_CACHE, PLUGINS, MODULES; local PluginString = "" local AllowedIndexes, LoadOnDemand, ScriptQueue = {},{},{}; @@ -196,16 +197,13 @@ function string.link(this, prefix, text, color) return format("|H%s:%s|h%s|h", prefix, text, colorstring) end -function string.explode(str, delim) - local res = {} - local pattern = format("([^%s]+)%s()", delim, delim) - local line, pos - while (true) do - line, pos = match(str, pattern, pos) - if line == nil then break end - tinsert(res, line) - end - return res +function string.explode(this, delim) + local pattern = format("([^%s]+)", delim) + local res = {} + for line in this:gmatch(pattern) do + tinsert(res, line) + end + return res end --DATABASE LOCAL HELPERS @@ -394,17 +392,35 @@ function lib:CheckProfiles() return hasProfile end -function lib:ImportDatabase(key) +function lib:SaveCustomLayout(key) + if(not key) then return end + + local export, saved + + if(not LAYOUT_SV[key]) then LAYOUT_SV[key] = {} end; + export = rawget(CoreObject.db, "data"); + saved = LAYOUT_SV[key]; + tablecopy(saved, export.SVUnit); +end + +function lib:ImportDatabase(key, noreload) + if(not key) then return end + if(not GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = {} end; PROFILE_SV.STORED[SOURCE_KEY] = GLOBAL_SV.profiles[key] if(not GLOBAL_SV.cache[key]) then GLOBAL_SV.cache[key] = {} end; CACHE_SV.STORED[SOURCE_KEY] = GLOBAL_SV.cache[key] - ReloadUI() + PROFILE_SV.SAFEDATA.GlobalKey = key; + if(not noreload) then + ReloadUI() + end end function lib:ExportDatabase(key) + if(not key) then return end + local export, saved if(not GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = {} end; @@ -913,6 +929,18 @@ end local Library_OnEvent = function(self, event, arg, ...) if(event == "PLAYER_LOGOUT") then + local key = PROFILE_SV.SAFEDATA.GlobalKey + if(key) then + local export, saved + if(not GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = {} end; + export = rawget(CoreObject.db, "data"); + saved = GLOBAL_SV.profiles[key]; + tablecopy(saved, export); + if not GLOBAL_SV.cache[key] then GLOBAL_SV.cache[key] = {} end + export = rawget(CoreObject.cache, "data") + saved = GLOBAL_SV.cache[key] + tablecopy(saved, export); + end CleanupData(CoreObject.db, true) CleanupData(CoreObject.filters) elseif(event == "ADDON_LOADED") then @@ -1055,7 +1083,7 @@ local Core_ResetFilter = function(self, key) tablecopy(sv, src) end -function lib:NewCore(gfile, efile, pfile, cfile, ffile) +function lib:NewCore(gfile, efile, pfile, cfile, ffile, lfile) --meta assurance local mt = {}; local old = getmetatable(CoreObject); @@ -1071,6 +1099,7 @@ function lib:NewCore(gfile, efile, pfile, cfile, ffile) PROFILE_FILENAME = pfile or PROFILE_FILENAME CACHE_FILENAME = cfile or CACHE_FILENAME FILTERS_FILENAME = ffile or FILTERS_FILENAME + LAYOUTS_FILENAME = lfile or LAYOUTS_FILENAME --events if(not self.EventManager.Initialized) then @@ -1112,6 +1141,10 @@ function lib:NewCore(gfile, efile, pfile, cfile, ffile) end CoreObject.filters = tablesplice(CoreObject.filterdefaults, {}) + if(not CoreObject.customlayouts) then + CoreObject.customlayouts = {} + end + --set global _G[CoreName] = CoreObject; @@ -1158,6 +1191,10 @@ function lib:Initialize() ERROR_CACHE.TODAY = datestamp + --CUSTOM LAYOUTS + if not _G[LAYOUTS_FILENAME] then _G[LAYOUTS_FILENAME] = {} end + LAYOUT_SV = _G[LAYOUTS_FILENAME] + --CACHE SAVED VARIABLES if not _G[CACHE_FILENAME] then _G[CACHE_FILENAME] = {} end CACHE_SV = _G[CACHE_FILENAME] @@ -1246,6 +1283,15 @@ function lib:Initialize() end end + local key = PROFILE_SV.SAFEDATA.GlobalKey + if(key) then + if(not GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = {} end; + PROFILE_SV.STORED[SOURCE_KEY] = GLOBAL_SV.profiles[key]; + + if(not GLOBAL_SV.cache[key]) then GLOBAL_SV.cache[key] = {} end; + CACHE_SV.STORED[SOURCE_KEY] = GLOBAL_SV.cache[key]; + end + --FILTER SAVED VARIABLES if not _G[FILTERS_FILENAME] then _G[FILTERS_FILENAME] = {} end diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc index 45043ce..927bb1d 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc @@ -2,7 +2,7 @@ ## Title: oUF ActionPanel ## Notes: Adds a backing to all unit frames that provides many utilities. ## Author: Munglunch -## Version: 5.2 +## Version: 5.3.0 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc index d1beb3b..5ad85c1 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc @@ -2,7 +2,7 @@ ## Title: oUF Afflicted ## Notes: Adds Custom Debuff Highlighting to oUF. ## Author: Munglunch -## Version: 5.2 +## Version: 5.3.0 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc index cc45b1b..2c8595b 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc @@ -2,7 +2,7 @@ ## Title: oUF Arcane Charge ## Notes: Adds support for arcane charge indicators to oUF. ## Author: Munglunch -## Version: 5.2 +## Version: 5.3.0 ## Dependencies: oUF oUF_ArcaneCharge.lua \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc index 8a725cd..4bdccb4 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc @@ -2,7 +2,7 @@ ## Title: oUF Combatant ## Notes: Adds PvP trinket status and spec icons to oUF frames. ## Author: Munglunch -## Version: 5.2 +## Version: 5.3.0 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/packages/_load.xml b/Interface/AddOns/SVUI/packages/_load.xml index 380b83b..e4cc54e 100644 --- a/Interface/AddOns/SVUI/packages/_load.xml +++ b/Interface/AddOns/SVUI/packages/_load.xml @@ -9,7 +9,7 @@ <Include file="unit\SVUnit.xml"/> <Script file="chat\SVChat.lua"/> <Include file="bag\SVBag.xml"/> - <Script file="override\SVOverride.lua"/> + <Include file="override\SVOverride.xml"/> <Script file="gear\SVGear.lua"/> <Script file="henchmen\SVHenchmen.lua"/> <Include file="tools\SVTools.xml"/> diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.xml b/Interface/AddOns/SVUI/packages/bag/SVBag.xml index 7e94106..fa7315f 100644 --- a/Interface/AddOns/SVUI/packages/bag/SVBag.xml +++ b/Interface/AddOns/SVUI/packages/bag/SVBag.xml @@ -1,5 +1,5 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/"> <Script file='SVBag.lua'/> - <Script file="tools\sorting.lua"/> - <Script file="tools\breakstuff.lua"/> + <Script file="components\sorting.lua"/> + <Script file="components\breakstuff.lua"/> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/bag/components/breakstuff.lua b/Interface/AddOns/SVUI/packages/bag/components/breakstuff.lua new file mode 100644 index 0000000..2141920 --- /dev/null +++ b/Interface/AddOns/SVUI/packages/bag/components/breakstuff.lua @@ -0,0 +1,342 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local ipairs = _G.ipairs; +local tinsert = _G.tinsert; +local table = _G.table; +local match = string.match; +--[[ TABLE METHODS ]]-- +local tremove, tcopy, twipe, tsort, tcat = table.remove, table.copy, table.wipe, table.sort, table.concat; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = select(2, ...) +local L = SV.L; +local MOD = SV.SVBag; +local TTIP = SV.SVTip; +--[[ +########################################################## +LOCAL VARS +########################################################## +]]-- +local BreakStuffButton = CreateFrame("Button", "BreakStuffButton", UIParent) +local BreakStuff_Cache = {} +local DE, PICK, SMITH, BreakStuffParser; +local ICONARTFILE = [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-BREAKSTUFF]]; +local BreakStuffHandler = CreateFrame('Button', "BreakStuffHandler", UIParent, 'SecureActionButtonTemplate, AutoCastShineTemplate') +BreakStuffHandler:SetScript('OnEvent', function(self, event, ...) self[event](self, ...) end) +BreakStuffHandler:SetPoint("LEFT",UIParent,"RIGHT",500) +BreakStuffHandler.TipLines = {} +BreakStuffHandler.TTextLeft = "" +BreakStuffHandler.TTextRight = "" +BreakStuffHandler.ReadyToSmash = false; +--[[ +########################################################## +ITEM PARSING +########################################################## +]]-- +do + local SkellyKeys = { + [GetSpellInfo(130100)] = true, -- Ghostly Skeleton Key + [GetSpellInfo(94574)] = true, -- Obsidium Skeleton Key + [GetSpellInfo(59403)] = true, -- Titanium Skeleton Key + [GetSpellInfo(59404)] = true, -- Colbat Skeleton Key + [GetSpellInfo(20709)] = true, -- Arcanite Skeleton Key + [GetSpellInfo(19651)] = true, -- Truesilver Skeleton Key + [GetSpellInfo(19649)] = true, -- Golden Skeleton Key + [GetSpellInfo(19646)] = true, -- Silver Skeleton Key + } + local BreakableFilter = { + ["Pickables"]={['68729']=true,['63349']=true,['45986']=true,['43624']=true,['43622']=true,['43575']=true,['31952']=true,['12033']=true,['29569']=true,['5760']=true,['13918']=true,['5759']=true,['16885']=true,['5758']=true,['13875']=true,['4638']=true,['16884']=true,['4637']=true,['4636']=true,['6355']=true,['16883']=true,['4634']=true,['4633']=true,['6354']=true,['16882']=true,['4632']=true,['88165']=true,['88567']=true},["SafeItems"]={['89392']=true,['89393']=true,['89394']=true,['89395']=true,['89396']=true,['89397']=true,['89398']=true,['89399']=true,['89400']=true,['83260']=true,['83261']=true,['83262']=true,['83263']=true,['83264']=true,['83265']=true,['83266']=true,['83267']=true,['83268']=true,['83269']=true,['83270']=true,['83271']=true,['83274']=true,['83275']=true,['82706']=true,['82707']=true,['82708']=true,['82709']=true,['82710']=true,['82711']=true,['82712']=true,['82713']=true,['82714']=true,['82715']=true,['82716']=true,['82717']=true,['82720']=true,['82721']=true,['81671']=true,['81672']=true,['81673']=true,['81674']=true,['81675']=true,['81676']=true,['81677']=true,['81678']=true,['81679']=true,['81680']=true,['81681']=true,['81682']=true,['81685']=true,['81686']=true,['64377']=true,['64489']=true,['64880']=true,['64885']=true,['62454']=true,['62455']=true,['62456']=true,['62457']=true,['62458']=true,['62459']=true,['62460']=true,['68740']=true,['49888']=true,['49497']=true,['49301']=true,['72980']=true,['72981']=true,['72989']=true,['72990']=true,['72991']=true,['72992']=true,['72993']=true,['72994']=true,['72995']=true,['72996']=true,['72997']=true,['72998']=true,['72999']=true,['73000']=true,['73001']=true,['73002']=true,['73003']=true,['73006']=true,['73007']=true,['73008']=true,['73009']=true,['73010']=true,['73011']=true,['73012']=true,['73325']=true,['73326']=true,['73336']=true,['88622']=true,['88648']=true,['88649']=true,['64460']=true,['44050']=true,['44173']=true,['44174']=true,['44192']=true,['44193']=true,['44199']=true,['44244']=true,['44245']=true,['44249']=true,['44250']=true,['44051']=true,['44052']=true,['44053']=true,['44108']=true,['44166']=true,['44187']=true,['44214']=true,['44241']=true,['38454']=true,['38455']=true,['38456']=true,['38457']=true,['38460']=true,['38461']=true,['38464']=true,['38465']=true,['29115']=true,['29130']=true,['29133']=true,['29137']=true,['29138']=true,['29166']=true,['29167']=true,['29185']=true,['34665']=true,['34666']=true,['34667']=true,['34670']=true,['34671']=true,['34672']=true,['34673']=true,['34674']=true,['29121']=true,['29124']=true,['29125']=true,['29151']=true,['29152']=true,['29153']=true,['29155']=true,['29156']=true,['29165']=true,['29171']=true,['29175']=true,['29182']=true,['30830']=true,['30832']=true,['29456']=true,['29457']=true,['25835']=true,['25836']=true,['25823']=true,['25825']=true,['77559']=true,['77570']=true,['77583']=true,['77586']=true,['77587']=true,['77588']=true,['21392']=true,['21395']=true,['21398']=true,['21401']=true,['21404']=true,['21407']=true,['21410']=true,['21413']=true,['21416']=true,['38632']=true,['38633']=true,['38707']=true,['34661']=true,['11290']=true,['11289']=true,['45858']=true,['84661']=true,['11288']=true,['28164']=true,['11287']=true,['44180']=true,['44202']=true,['44302']=true,['44200']=true,['44256']=true,['44104']=true,['44116']=true,['44196']=true,['44061']=true,['44062']=true,['29117']=true,['29129']=true,['29174']=true,['30836']=true,['35328']=true,['35329']=true,['35330']=true,['35331']=true,['35332']=true,['35333']=true,['35334']=true,['35335']=true,['35336']=true,['35337']=true,['35338']=true,['35339']=true,['35340']=true,['35341']=true,['35342']=true,['35343']=true,['35344']=true,['35345']=true,['35346']=true,['35347']=true,['35464']=true,['35465']=true,['35466']=true,['35467']=true,['30847']=true,['29122']=true,['29183']=true,['90079']=true,['90080']=true,['90081']=true,['90082']=true,['90083']=true,['90084']=true,['90085']=true,['90086']=true,['90110']=true,['90111']=true,['90112']=true,['90113']=true,['90114']=true,['90115']=true,['90116']=true,['90117']=true,['90136']=true,['90137']=true,['90138']=true,['90139']=true,['90140']=true,['90141']=true,['90142']=true,['90143']=true,['64643']=true,['77678']=true,['77679']=true,['77682']=true,['77692']=true,['77694']=true,['77695']=true,['77709']=true,['77710']=true,['77712']=true,['77886']=true,['77889']=true,['77890']=true,['77899']=true,['77900']=true,['77901']=true,['77917']=true,['77919']=true,['77920']=true,['77680']=true,['77681']=true,['77683']=true,['77690']=true,['77691']=true,['77693']=true,['77708']=true,['77711']=true,['77713']=true,['77887']=true,['77888']=true,['77891']=true,['77898']=true,['77902']=true,['77903']=true,['77916']=true,['77918']=true,['77921']=true,['77778']=true,['77779']=true,['77784']=true,['77795']=true,['77796']=true,['77800']=true,['77801']=true,['77844']=true,['77845']=true,['77846']=true,['77850']=true,['77777']=true,['77781']=true,['77782']=true,['77785']=true,['77797']=true,['77798']=true,['77799']=true,['77802']=true,['77847']=true,['77848']=true,['77851']=true,['77852']=true,['77724']=true,['77725']=true,['77728']=true,['77729']=true,['77732']=true,['77733']=true,['77773']=true,['77783']=true,['77803']=true,['77804']=true,['77843']=true,['77849']=true,['77614']=true,['77615']=true,['77616']=true,['77617']=true,['77618']=true,['77619']=true,['77620']=true,['77627']=true,['77628']=true,['77629']=true,['77630']=true,['77631']=true,['77632']=true,['77647']=true,['77648']=true,['77649']=true,['77650']=true,['77651']=true,['77652']=true,['77770']=true,['77771']=true,['77772']=true,['77774']=true,['77775']=true,['77776']=true,['77786']=true,['77789']=true,['77790']=true,['77791']=true,['77792']=true,['77793']=true,['77794']=true,['77837']=true,['77838']=true,['77839']=true,['77840']=true,['77841']=true,['77842']=true,['20406']=true,['20407']=true,['20408']=true,['77787']=true,['77788']=true,['28155']=true,['22986']=true,['22991']=true,['33292']=true,['86566']=true,['95517']=true,['95518']=true,['95523']=true,['95526']=true,['95527']=true,['95532']=true,['83158']=true,['83162']=true,['83167']=true,['83171']=true,['83176']=true,['83180']=true,['83185']=true,['83189']=true,['83194']=true,['83198']=true,['83203']=true,['83207']=true,['83212']=true,['83216']=true,['83221']=true,['83225']=true,['82614']=true,['82618']=true,['82623']=true,['82627']=true,['82632']=true,['82636']=true,['82641']=true,['82645']=true,['82650']=true,['82654']=true,['82659']=true,['82663']=true,['82668']=true,['82672']=true,['82677']=true,['82681']=true,['81579']=true,['81583']=true,['81588']=true,['81592']=true,['81597']=true,['81601']=true,['81606']=true,['81610']=true,['81615']=true,['81619']=true,['81624']=true,['81628']=true,['81633']=true,['81637']=true,['81642']=true,['81646']=true,['70118']=true,['62364']=true,['62386']=true,['62450']=true,['62441']=true,['62356']=true,['62406']=true,['62424']=true,['72621']=true,['72622']=true,['72623']=true,['72624']=true,['72625']=true,['72626']=true,['72627']=true,['72628']=true,['72638']=true,['72639']=true,['72640']=true,['72641']=true,['72642']=true,['72643']=true,['72644']=true,['72645']=true,['72646']=true,['72647']=true,['72648']=true,['72649']=true,['72650']=true,['72651']=true,['72652']=true,['72653']=true,['72655']=true,['72656']=true,['72657']=true,['72658']=true,['72659']=true,['72660']=true,['72661']=true,['72662']=true,['44180']=true,['44202']=true,['44302']=true,['44200']=true,['44256']=true,['44181']=true,['44203']=true,['44297']=true,['44303']=true,['44179']=true,['44194']=true,['44258']=true,['44106']=true,['44170']=true,['44190']=true,['44117']=true,['44054']=true,['44055']=true,['29116']=true,['29131']=true,['29141']=true,['29142']=true,['29147']=true,['29148']=true,['35356']=true,['35357']=true,['35358']=true,['35359']=true,['35360']=true,['35361']=true,['35362']=true,['35363']=true,['35364']=true,['35365']=true,['35366']=true,['35367']=true,['35368']=true,['35369']=true,['35370']=true,['35371']=true,['35372']=true,['35373']=true,['35374']=true,['35375']=true,['35468']=true,['35469']=true,['35470']=true,['35471']=true,['25838']=true,['90059']=true,['90060']=true,['90061']=true,['90062']=true,['90063']=true,['90064']=true,['90065']=true,['90066']=true,['90088']=true,['90089']=true,['90090']=true,['90091']=true,['90092']=true,['90093']=true,['90094']=true,['90095']=true,['90119']=true,['90120']=true,['90121']=true,['90122']=true,['90123']=true,['90124']=true,['90125']=true,['90126']=true,['77667']=true,['77670']=true,['77671']=true,['77697']=true,['77700']=true,['77701']=true,['77874']=true,['77876']=true,['77878']=true,['77907']=true,['77908']=true,['77909']=true,['77666']=true,['77668']=true,['77669']=true,['77696']=true,['77698']=true,['77699']=true,['77875']=true,['77877']=true,['77879']=true,['77904']=true,['77905']=true,['77906']=true,['77742']=true,['77746']=true,['77748']=true,['77752']=true,['77813']=true,['77815']=true,['77819']=true,['77820']=true,['77744']=true,['77745']=true,['77749']=true,['77811']=true,['77812']=true,['77818']=true,['77821']=true,['77720']=true,['77721']=true,['77730']=true,['77731']=true,['77747']=true,['77750']=true,['77816']=true,['77817']=true,['77598']=true,['77599']=true,['77600']=true,['77601']=true,['77602']=true,['77603']=true,['77604']=true,['77633']=true,['77634']=true,['77635']=true,['77636']=true,['77637']=true,['77638']=true,['77639']=true,['77736']=true,['77737']=true,['77738']=true,['77739']=true,['77740']=true,['77741']=true,['77743']=true,['77805']=true,['77806']=true,['77807']=true,['77808']=true,['77809']=true,['77810']=true,['77814']=true,['77605']=true,['77640']=true,['77753']=true,['77822']=true,['28158']=true,['22987']=true,['22992']=true,['95519']=true,['95521']=true,['95528']=true,['95530']=true,['83159']=true,['83163']=true,['83168']=true,['83172']=true,['83177']=true,['83181']=true,['83186']=true,['83190']=true,['83195']=true,['83199']=true,['83204']=true,['83208']=true,['83213']=true,['83217']=true,['83222']=true,['83226']=true,['82615']=true,['82619']=true,['82624']=true,['82628']=true,['82633']=true,['82637']=true,['82642']=true,['82646']=true,['82651']=true,['82655']=true,['82660']=true,['82664']=true,['82669']=true,['82673']=true,['82678']=true,['82682']=true,['81580']=true,['81584']=true,['81589']=true,['81593']=true,['81598']=true,['81602']=true,['81607']=true,['81611']=true,['81616']=true,['81620']=true,['81625']=true,['81629']=true,['81634']=true,['81638']=true,['81643']=true,['81647']=true,['70114']=true,['70122']=true,['62417']=true,['62420']=true,['62431']=true,['62433']=true,['62358']=true,['62381']=true,['62446']=true,['62374']=true,['62404']=true,['62405']=true,['62425']=true,['62426']=true,['72664']=true,['72665']=true,['72666']=true,['72667']=true,['72668']=true,['72669']=true,['72670']=true,['72671']=true,['72672']=true,['72673']=true,['72674']=true,['72675']=true,['72676']=true,['72677']=true,['72678']=true,['72679']=true,['72681']=true,['72682']=true,['72683']=true,['72684']=true,['72685']=true,['72686']=true,['72687']=true,['72688']=true,['72689']=true,['72690']=true,['72691']=true,['72692']=true,['72693']=true,['72694']=true,['72695']=true,['72696']=true,['88614']=true,['88615']=true,['88616']=true,['88617']=true,['88618']=true,['88619']=true,['88620']=true,['88621']=true,['88623']=true,['88624']=true,['88625']=true,['88626']=true,['88627']=true,['88628']=true,['88629']=true,['88630']=true,['44181']=true,['44203']=true,['44297']=true,['44303']=true,['44179']=true,['44194']=true,['44258']=true,['44182']=true,['44204']=true,['44295']=true,['44305']=true,['44248']=true,['44257']=true,['44109']=true,['44110']=true,['44122']=true,['44171']=true,['44189']=true,['44059']=true,['44060']=true,['29135']=true,['29136']=true,['29180']=true,['30835']=true,['35376']=true,['35377']=true,['35378']=true,['35379']=true,['35380']=true,['35381']=true,['35382']=true,['35383']=true,['35384']=true,['35385']=true,['35386']=true,['35387']=true,['35388']=true,['35389']=true,['35390']=true,['35391']=true,['35392']=true,['35393']=true,['35394']=true,['35395']=true,['35472']=true,['35473']=true,['35474']=true,['35475']=true,['64644']=true,['90068']=true,['90069']=true,['90070']=true,['90071']=true,['90072']=true,['90073']=true,['90074']=true,['90075']=true,['90127']=true,['90128']=true,['90129']=true,['90130']=true,['90131']=true,['90132']=true,['90133']=true,['90134']=true,['77673']=true,['77674']=true,['77676']=true,['77704']=true,['77705']=true,['77707']=true,['77880']=true,['77882']=true,['77883']=true,['77910']=true,['77913']=true,['77914']=true,['77672']=true,['77675']=true,['77677']=true,['77702']=true,['77703']=true,['77706']=true,['77881']=true,['77884']=true,['77885']=true,['77911']=true,['77912']=true,['77915']=true,['77642']=true,['77645']=true,['77762']=true,['77763']=true,['77765']=true,['77766']=true,['77831']=true,['77832']=true,['77641']=true,['77643']=true,['77760']=true,['77761']=true,['77768']=true,['77769']=true,['77829']=true,['77834']=true,['77644']=true,['77646']=true,['77722']=true,['77723']=true,['77764']=true,['77767']=true,['77830']=true,['77833']=true,['77606']=true,['77607']=true,['77608']=true,['77609']=true,['77610']=true,['77611']=true,['77612']=true,['77754']=true,['77755']=true,['77756']=true,['77757']=true,['77758']=true,['77759']=true,['77823']=true,['77824']=true,['77825']=true,['77826']=true,['77827']=true,['77828']=true,['77835']=true,['28162']=true,['22985']=true,['22993']=true,['95522']=true,['95525']=true,['95531']=true,['95534']=true,['83160']=true,['83164']=true,['83169']=true,['83173']=true,['83178']=true,['83182']=true,['83187']=true,['83191']=true,['83196']=true,['83200']=true,['83205']=true,['83209']=true,['83214']=true,['83218']=true,['83223']=true,['83227']=true,['82616']=true,['82620']=true,['82625']=true,['82629']=true,['82634']=true,['82638']=true,['82643']=true,['82647']=true,['82652']=true,['82656']=true,['82661']=true,['82665']=true,['82670']=true,['82674']=true,['82679']=true,['82683']=true,['81581']=true,['81585']=true,['81590']=true,['81594']=true,['81599']=true,['81603']=true,['81608']=true,['81612']=true,['81617']=true,['81621']=true,['81626']=true,['81630']=true,['81635']=true,['81639']=true,['81644']=true,['81648']=true,['70115']=true,['70123']=true,['62363']=true,['62385']=true,['62380']=true,['62409']=true,['62429']=true,['62445']=true,['62353']=true,['62407']=true,['62423']=true,['62439']=true,['72698']=true,['72699']=true,['72700']=true,['72701']=true,['72702']=true,['72703']=true,['72704']=true,['72705']=true,['72889']=true,['72890']=true,['72891']=true,['72892']=true,['72893']=true,['72894']=true,['72895']=true,['72896']=true,['72902']=true,['72903']=true,['72904']=true,['72905']=true,['72906']=true,['72907']=true,['72908']=true,['72909']=true,['72910']=true,['72911']=true,['72912']=true,['72913']=true,['72914']=true,['72915']=true,['72916']=true,['72917']=true,['44182']=true,['44204']=true,['44295']=true,['44305']=true,['44248']=true,['44257']=true,['44183']=true,['44205']=true,['44296']=true,['44306']=true,['44176']=true,['44195']=true,['44198']=true,['44201']=true,['44247']=true,['44111']=true,['44112']=true,['44120']=true,['44121']=true,['44123']=true,['44197']=true,['44239']=true,['44240']=true,['44243']=true,['44057']=true,['44058']=true,['40440']=true,['40441']=true,['40442']=true,['40443']=true,['40444']=true,['29127']=true,['29134']=true,['29184']=true,['35402']=true,['35403']=true,['35404']=true,['35405']=true,['35406']=true,['35407']=true,['35408']=true,['35409']=true,['35410']=true,['35411']=true,['35412']=true,['35413']=true,['35414']=true,['35415']=true,['35416']=true,['35476']=true,['35477']=true,['35478']=true,['90049']=true,['90050']=true,['90051']=true,['90052']=true,['90053']=true,['90054']=true,['90055']=true,['90056']=true,['90096']=true,['90097']=true,['90098']=true,['90099']=true,['90100']=true,['90101']=true,['90102']=true,['90103']=true,['90147']=true,['90148']=true,['90149']=true,['90150']=true,['90151']=true,['90152']=true,['90153']=true,['90154']=true,['77687']=true,['77688']=true,['77689']=true,['77714']=true,['77715']=true,['77718']=true,['77892']=true,['77894']=true,['77897']=true,['77923']=true,['77924']=true,['77927']=true,['77684']=true,['77685']=true,['77686']=true,['77716']=true,['77717']=true,['77719']=true,['77893']=true,['77895']=true,['77896']=true,['77922']=true,['77925']=true,['77926']=true,['77664']=true,['77665']=true,['77859']=true,['77867']=true,['77868']=true,['77869']=true,['77871']=true,['77872']=true,['38661']=true,['38663']=true,['38665']=true,['38666']=true,['38667']=true,['38668']=true,['38669']=true,['38670']=true,['77661']=true,['77662']=true,['77663']=true,['77858']=true,['77864']=true,['77865']=true,['77866']=true,['77873']=true,['77726']=true,['77727']=true,['77734']=true,['77735']=true,['77862']=true,['77863']=true,['77928']=true,['77929']=true,['77621']=true,['77622']=true,['77623']=true,['77624']=true,['77625']=true,['77626']=true,['77653']=true,['77654']=true,['77655']=true,['77656']=true,['77657']=true,['77658']=true,['77659']=true,['77853']=true,['77854']=true,['77855']=true,['77856']=true,['77857']=true,['77860']=true,['77861']=true,['34648']=true,['34649']=true,['34650']=true,['34651']=true,['34652']=true,['34653']=true,['34655']=true,['34656']=true,['77660']=true,['95520']=true,['95524']=true,['95529']=true,['95533']=true,['83161']=true,['83165']=true,['83166']=true,['83170']=true,['83174']=true,['83175']=true,['83179']=true,['83183']=true,['83184']=true,['83188']=true,['83192']=true,['83193']=true,['83197']=true,['83201']=true,['83202']=true,['83206']=true,['83210']=true,['83211']=true,['83215']=true,['83219']=true,['83220']=true,['83224']=true,['83228']=true,['83229']=true,['82617']=true,['82621']=true,['82622']=true,['82626']=true,['82630']=true,['82631']=true,['82635']=true,['82639']=true,['82640']=true,['82644']=true,['82648']=true,['82649']=true,['82653']=true,['82657']=true,['82658']=true,['82662']=true,['82666']=true,['82667']=true,['82671']=true,['82675']=true,['82676']=true,['82680']=true,['82684']=true,['82685']=true,['81582']=true,['81586']=true,['81587']=true,['81591']=true,['81595']=true,['81596']=true,['81600']=true,['81604']=true,['81605']=true,['81609']=true,['81613']=true,['81614']=true,['81618']=true,['81622']=true,['81623']=true,['81627']=true,['81631']=true,['81632']=true,['81636']=true,['81640']=true,['81641']=true,['81645']=true,['81649']=true,['81650']=true,['70108']=true,['70116']=true,['70117']=true,['70120']=true,['70121']=true,['62365']=true,['62384']=true,['62418']=true,['62432']=true,['62448']=true,['62449']=true,['62359']=true,['62382']=true,['62408']=true,['62410']=true,['62428']=true,['62430']=true,['62355']=true,['62438']=true,['72918']=true,['72919']=true,['72920']=true,['72921']=true,['72922']=true,['72923']=true,['72924']=true,['72925']=true,['72929']=true,['72930']=true,['72931']=true,['72932']=true,['72933']=true,['72934']=true,['72935']=true,['72936']=true,['72937']=true,['72938']=true,['72939']=true,['72940']=true,['72941']=true,['72942']=true,['72943']=true,['72944']=true,['72945']=true,['72946']=true,['72947']=true,['72948']=true,['72949']=true,['72950']=true,['72951']=true,['72952']=true,['72955']=true,['72956']=true,['72957']=true,['72958']=true,['72959']=true,['72960']=true,['72961']=true,['72962']=true,['72963']=true,['72964']=true,['72965']=true,['72966']=true,['72967']=true,['72968']=true,['72969']=true,['72970']=true,['72971']=true,['72972']=true,['72973']=true,['72974']=true,['72975']=true,['72976']=true,['72977']=true,['72978']=true,['44183']=true,['44205']=true,['44296']=true,['44306']=true,['44176']=true,['44195']=true,['44198']=true,['44201']=true,['44247']=true,['29278']=true,['29282']=true,['29286']=true,['29291']=true,['31113']=true,['34675']=true,['34676']=true,['34677']=true,['34678']=true,['34679']=true,['34680']=true,['29128']=true,['29132']=true,['29139']=true,['29140']=true,['29145']=true,['29146']=true,['29168']=true,['29169']=true,['29173']=true,['29179']=true,['29276']=true,['29280']=true,['29284']=true,['29288']=true,['30841']=true,['32538']=true,['32539']=true,['29277']=true,['29281']=true,['29285']=true,['29289']=true,['32864']=true,['31341']=true,['29119']=true,['29123']=true,['29126']=true,['29170']=true,['29172']=true,['29176']=true,['29177']=true,['29181']=true,['32770']=true,['32771']=true,['30834']=true,['25824']=true,['25826']=true,['21200']=true,['21205']=true,['21210']=true,['52252']=true,['21199']=true,['21204']=true,['21209']=true,['49052']=true,['49054']=true,['21198']=true,['21203']=true,['21208']=true,['32695']=true,['38662']=true,['38664']=true,['38671']=true,['38672']=true,['38674']=true,['38675']=true,['39320']=true,['39322']=true,['32694']=true,['21394']=true,['21397']=true,['21400']=true,['21403']=true,['21406']=true,['21409']=true,['21412']=true,['21415']=true,['21418']=true,['21197']=true,['21202']=true,['21207']=true,['21393']=true,['21396']=true,['21399']=true,['21402']=true,['21405']=true,['21408']=true,['21411']=true,['21414']=true,['21417']=true,['17904']=true,['17909']=true,['21196']=true,['21201']=true,['21206']=true,['65274']=true,['65360']=true,['17902']=true,['17903']=true,['17907']=true,['17908']=true,['40476']=true,['40477']=true,['17690']=true,['17691']=true,['17900']=true,['17901']=true,['17905']=true,['17906']=true,['34657']=true,['34658']=true,['34659']=true,['38147']=true,['21766']=true,['64886']=true,['64887']=true,['64888']=true,['64889']=true,['64890']=true,['64891']=true,['64892']=true,['64893']=true,['64894']=true,['64895']=true,['64896']=true,['64897']=true,['64898']=true,['64899']=true,['64900']=true,['64901']=true,['64902']=true,['64903']=true,['64905']=true,['64906']=true,['64907']=true,['64908']=true,['64909']=true,['64910']=true,['64911']=true,['64912']=true,['64913']=true,['64914']=true,['64915']=true,['64916']=true,['64917']=true,['64918']=true,['64919']=true,['64920']=true,['64921']=true,['64922']=true,['4614']=true,['22990']=true,['34484']=true,['34486']=true,['23705']=true,['23709']=true,['38309']=true,['38310']=true,['38311']=true,['38312']=true,['38313']=true,['38314']=true,['40643']=true,['43300']=true,['43348']=true,['43349']=true,['98162']=true,['35279']=true,['35280']=true,['40483']=true,['46874']=true,['89401']=true,['89784']=true,['89795']=true,['89796']=true,['89797']=true,['89798']=true,['89799']=true,['89800']=true,['95591']=true,['95592']=true,['97131']=true,['50384']=true,['50386']=true,['50387']=true,['50388']=true,['52570']=true,['50375']=true,['50376']=true,['50377']=true,['50378']=true,['52569']=true,['72982']=true,['72983']=true,['72984']=true,['73004']=true,['73005']=true,['73013']=true,['73014']=true,['73015']=true,['73016']=true,['73017']=true,['73018']=true,['73019']=true,['73020']=true,['73021']=true,['73022']=true,['73023']=true,['73024']=true,['73025']=true,['73026']=true,['73027']=true,['73042']=true,['73060']=true,['73061']=true,['73062']=true,['73063']=true,['73064']=true,['73065']=true,['73066']=true,['73067']=true,['73068']=true,['73101']=true,['73102']=true,['73103']=true,['73104']=true,['73105']=true,['73106']=true,['73107']=true,['73108']=true,['73109']=true,['73110']=true,['73111']=true,['73112']=true,['73113']=true,['73114']=true,['73115']=true,['73116']=true,['73117']=true,['73118']=true,['73119']=true,['73120']=true,['73121']=true,['73122']=true,['73123']=true,['73124']=true,['73125']=true,['73126']=true,['73127']=true,['73128']=true,['73129']=true,['73130']=true,['73131']=true,['73132']=true,['73133']=true,['73134']=true,['73135']=true,['73136']=true,['73137']=true,['73138']=true,['73139']=true,['73140']=true,['73141']=true,['73142']=true,['73143']=true,['73144']=true,['73145']=true,['73146']=true,['73147']=true,['73148']=true,['73149']=true,['73150']=true,['73151']=true,['73152']=true,['73153']=true,['73154']=true,['73155']=true,['73156']=true,['73157']=true,['73158']=true,['73159']=true,['73160']=true,['73161']=true,['73162']=true,['73163']=true,['73164']=true,['73165']=true,['73166']=true,['73167']=true,['73168']=true,['73169']=true,['73170']=true,['73306']=true,['73307']=true,['73308']=true,['73309']=true,['73310']=true,['73311']=true,['73312']=true,['73313']=true,['73314']=true,['73315']=true,['73316']=true,['73317']=true,['73318']=true,['73319']=true,['73320']=true,['73321']=true,['73322']=true,['73323']=true,['73324']=true,['88632']=true,['88633']=true,['88634']=true,['88635']=true,['88636']=true,['88637']=true,['88638']=true,['88639']=true,['88640']=true,['88641']=true,['88642']=true,['88643']=true,['88644']=true,['88645']=true,['88646']=true,['88647']=true,['88667']=true,['44073']=true,['44074']=true,['44283']=true,['44167']=true,['44188']=true,['44216']=true,['44242']=true,['38452']=true,['38453']=true,['38458']=true,['38459']=true,['38462']=true,['38463']=true,['29297']=true,['29301']=true,['29305']=true,['29309']=true,['29296']=true,['29308']=true,['32485']=true,['32486']=true,['32487']=true,['32488']=true,['32489']=true,['32490']=true,['32491']=true,['32492']=true,['32493']=true,['32649']=true,['32757']=true,['29295']=true,['29299']=true,['29303']=true,['29306']=true,['29300']=true,['29304']=true,['29279']=true,['29283']=true,['29287']=true,['29290']=true,['29294']=true,['29298']=true,['29302']=true,['29307']=true,['29278']=true,['29282']=true,['29286']=true,['29291']=true,['98146']=true,['98147']=true,['98148']=true,['98149']=true,['98150']=true,['98335']=true,['92782']=true,['92783']=true,['92784']=true,['92785']=true,['92786']=true,['92787']=true,['93391']=true,['93392']=true,['93393']=true,['93394']=true,['93395']=true,['95425']=true,['95427']=true,['95428']=true,['95429']=true,['95430']=true,['88166']=true,['88167']=true,['88168']=true,['88169']=true,['75274']=true,['83230']=true,['83231']=true,['83232']=true,['83233']=true,['83234']=true,['83235']=true,['83236']=true,['83237']=true,['83238']=true,['83239']=true,['83245']=true,['83246']=true,['83247']=true,['83248']=true,['83249']=true,['83255']=true,['83256']=true,['83257']=true,['83258']=true,['83259']=true,['83272']=true,['83273']=true,['86567']=true,['86570']=true,['86572']=true,['86576']=true,['86579']=true,['86585']=true,['86587']=true,['87780']=true,['82686']=true,['82687']=true,['82688']=true,['82689']=true,['82690']=true,['82691']=true,['82692']=true,['82693']=true,['82694']=true,['82695']=true,['82696']=true,['82697']=true,['82698']=true,['82699']=true,['82700']=true,['82701']=true,['82702']=true,['82703']=true,['82704']=true,['82705']=true,['82718']=true,['82719']=true,['81651']=true,['81652']=true,['81653']=true,['81654']=true,['81655']=true,['81656']=true,['81657']=true,['81658']=true,['81659']=true,['81660']=true,['81661']=true,['81662']=true,['81663']=true,['81664']=true,['81665']=true,['81666']=true,['81667']=true,['81668']=true,['81669']=true,['81670']=true,['81683']=true,['81684']=true,['70105']=true,['70106']=true,['70107']=true,['70110']=true,['70112']=true,['70113']=true,['70119']=true,['70124']=true,['70126']=true,['70127']=true,['70141']=true,['70142']=true,['70143']=true,['70144']=true,['58483']=true,['62362']=true,['62383']=true,['62416']=true,['62434']=true,['62447']=true,['62463']=true,['62464']=true,['62465']=true,['62466']=true,['62467']=true,['64645']=true,['64904']=true,['68775']=true,['68776']=true,['68777']=true,['69764']=true,['62348']=true,['62350']=true,['62351']=true,['62352']=true,['62357']=true,['62361']=true,['62378']=true,['62415']=true,['62427']=true,['62440']=true,['62354']=true,['62375']=true,['62376']=true,['62377']=true,['62436']=true,['62437']=true,['65175']=true,['65176']=true,['50398']=true,['50400']=true,['50402']=true,['50404']=true,['52572']=true,['50397']=true,['50399']=true,['50401']=true,['50403']=true,['52571']=true} + } + + local AllowedItemIDs = { + ['109129']='OVERRIDE_MILLABLE', + ['109128']='OVERRIDE_MILLABLE', + ['109127']='OVERRIDE_MILLABLE', + ['109126']='OVERRIDE_MILLABLE', + ['109125']='OVERRIDE_MILLABLE', + ['109124']='OVERRIDE_MILLABLE', + -- ['109119']='OVERRIDE_PROSPECTABLE', + } + + local function IsThisBreakable(link) + local _, _, quality = GetItemInfo(link) + if(IsEquippableItem(link) and quality and quality > 1 and quality < 5) then + return not BreakableFilter["SafeItems"][match(link, 'item:(%d+):')] + end + end + + local function IsThisOpenable(link) + return BreakableFilter["Pickables"][match(link, 'item:(%d+)')] + end + + local function ScanTooltip(self, itemLink) + for index = 1, self:NumLines() do + local info = BreakStuff_Cache[_G['GameTooltipTextLeft' .. index]:GetText()] + if(info) then + return unpack(info) + end + end + local itemID = itemLink:match(":(%w+)") + local override = AllowedItemIDs[itemID] + if(override and BreakStuff_Cache[override]) then + return unpack(BreakStuff_Cache[override]) + end + end + + local function CloneTooltip() + twipe(BreakStuffHandler.TipLines) + for index = 1, GameTooltip:NumLines() do + local text = _G['GameTooltipTextLeft' .. index]:GetText() + if(text) then + BreakStuffHandler.TipLines[#BreakStuffHandler.TipLines+1] = text + end + end + end + + local function DoIHaveAKey() + for key in pairs(SkellyKeys) do + if(GetItemCount(key) > 0) then + return key + end + end + end + + local function ApplyButton(itemLink, spell, r, g, b) + local slot = GetMouseFocus() + local bag = slot:GetParent():GetID() + + if(GetContainerItemLink(bag, slot:GetID()) == itemLink) then + --CloneTooltip() + BreakStuffHandler:SetAttribute('spell', spell) + BreakStuffHandler:SetAttribute('target-bag', bag) + BreakStuffHandler:SetAttribute('target-slot', slot:GetID()) + BreakStuffHandler:SetAllPoints(slot) + BreakStuffHandler:Show() + + AutoCastShine_AutoCastStart(BreakStuffHandler, r, g, b) + end + end + + function BreakStuffParser(self) + local item, link = self:GetItem() + if(item and not InCombatLockdown() and (BreakStuffHandler.ReadyToSmash == true)) then + local spell, r, g, b = ScanTooltip(self, link) + local rr, gg, bb = 1, 1, 1 + if(spell) then + ApplyButton(link, spell, r, g, b) + else + spell = "Open" + if(DE and IsThisBreakable(link)) then + rr, gg, bb = 0.5, 0.5, 1 + ApplyButton(link, DE, rr, gg, bb) + elseif(PICK and IsThisOpenable(link)) then + rr, gg, bb = 0, 1, 1 + ApplyButton(link, PICK, rr, gg, bb) + elseif(SMITH and IsThisOpenable(link)) then + rr, gg, bb = 0, 1, 1 + local hasKey = DoIHaveAKey() + ApplyButton(link, hasKey, rr, gg, bb) + end + end + BreakStuffHandler.TTextLeft = spell + BreakStuffHandler.TTextRight = item + end + end +end +--[[ +########################################################## +BUILD FOR PACKAGE +########################################################## +]]-- +local BreakStuff_OnModifier = function(self, arg) + if(not self:IsShown() and not arg and (self.ReadyToSmash == false)) then return; end + if(InCombatLockdown()) then + self:SetAlpha(0) + self:RegisterEvent('PLAYER_REGEN_ENABLED') + else + self:ClearAllPoints() + self:SetAlpha(1) + self:Hide() + AutoCastShine_AutoCastStop(self) + end +end + +BreakStuffHandler.MODIFIER_STATE_CHANGED = BreakStuff_OnModifier; + +local BreakStuff_OnHide = function() + BreakStuffHandler.ReadyToSmash = false + BreakStuffButton.ttText = "BreakStuff : OFF"; +end + +local BreakStuff_OnEnter = function(self) + GameTooltip:SetOwner(self,"ANCHOR_TOP",0,4) + GameTooltip:ClearLines() + GameTooltip:AddLine(self.ttText) + GameTooltip:AddLine(self.subText) + if self.ttText2 then + GameTooltip:AddLine(' ') + GameTooltip:AddDoubleLine(self.ttText2,self.ttText2desc,1,1,1) + end + if BreakStuffHandler.ReadyToSmash ~= true then + self:SetPanelColor("class") + self.icon:SetGradient(unpack(SV.Media.gradient.highlight)) + end + GameTooltip:Show() +end + +local BreakStuff_OnLeave = function(self) + if BreakStuffHandler.ReadyToSmash ~= true then + self:SetPanelColor("default") + self.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + GameTooltip:Hide() + end +end + +local BreakStuff_OnClick = function(self) + if InCombatLockdown() then print(ERR_NOT_IN_COMBAT) return end + if BreakStuffHandler.ReadyToSmash == true then + BreakStuffHandler:MODIFIER_STATE_CHANGED() + BreakStuffHandler.ReadyToSmash = false + self.ttText = "BreakStuff : OFF"; + self:SetPanelColor("default") + self.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + else + BreakStuffHandler.ReadyToSmash = true + self.ttText = "BreakStuff : ON"; + self:SetPanelColor("green") + self.icon:SetGradient(unpack(SV.Media.gradient.green)) + if(not MOD.BagFrame:IsShown()) then + GameTooltip:Hide() + MOD.BagFrame:Show() + MOD.BagFrame:RefreshBags() + TTIP.GameTooltip_SetDefaultAnchor(GameTooltip,self) + end + end + GameTooltip:ClearLines() + GameTooltip:AddLine(self.ttText) + GameTooltip:AddLine(self.subText) +end + +function BreakStuffHandler:PLAYER_REGEN_ENABLED() + self:UnregisterEvent('PLAYER_REGEN_ENABLED') + BreakStuff_OnModifier(self) +end + +function MOD:PLAYER_REGEN_ENABLED() + self:UnregisterEvent('PLAYER_REGEN_ENABLED') + self:BreakStuffLoader() +end + +local SetClonedTip = function(self) + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) + GameTooltip:ClearLines() + GameTooltip:AddDoubleLine(self.TTextLeft, self.TTextRight, 0,1,0,1,1,1) + -- for index = 1, #self.TipLines do + -- GameTooltip:AddLine(self.TipLines[index]) + -- end + + GameTooltip:Show() +end + +function MOD:BreakStuffLoader() + if(InCombatLockdown()) then MOD:RegisterEvent("PLAYER_REGEN_ENABLED"); return end + local allowed, spellListing, spellName, _ = false, {}; + + if(IsSpellKnown(51005)) then + --print("Milling") + allowed = true + spellName,_ = GetSpellInfo(51005) + BreakStuff_Cache[ITEM_MILLABLE] = {spellName, 0.5, 1, 0.5} + BreakStuff_Cache['OVERRIDE_MILLABLE'] = {spellName, 0.5, 1, 0.5} + tinsert(spellListing, spellName) + end + + if(IsSpellKnown(31252)) then + --print("Prospecting") + allowed = true + spellName,_ = GetSpellInfo(31252) + BreakStuff_Cache[ITEM_PROSPECTABLE] = {spellName, 1, 0.33, 0.33} + -- BreakStuff_Cache['OVERRIDE_PROSPECTABLE'] = {spellName, 1, 0.33, 0.33} + tinsert(spellListing, spellName) + end + + if(IsSpellKnown(13262)) then + --print("Enchanting") + allowed = true + DE,_ = GetSpellInfo(13262) + tinsert(spellListing, DE) + end + + if(IsSpellKnown(1804)) then + --print("Lockpicking") + allowed = true + PICK,_ = GetSpellInfo(1804) + tinsert(spellListing, PICK) + end + + if(IsSpellKnown(2018)) then + --print("Blacksmithing") + allowed = true + SMITH,_ = GetSpellBookItemInfo((GetSpellInfo(2018))) + tinsert(spellListing, SMITH) + end + + if not allowed then return end + + BreakStuffButton:SetParent(SV.Dock.BottomRight.Bar.ToolBar) + local size = SV.Dock.BottomRight.Bar.ToolBar:GetHeight() + BreakStuffButton:Size(size, size) + BreakStuffButton:Point("RIGHT", SV.Dock.BottomRight.Bar.ToolBar, "LEFT", -6, 0) + BreakStuffButton:Show(); + BreakStuffButton:SetFramedButtonTemplate() + BreakStuffButton.icon=BreakStuffButton:CreateTexture(nil,"OVERLAY") + BreakStuffButton.icon:FillInner(BreakStuffButton,2,2) + BreakStuffButton.icon:SetTexture(ICONARTFILE) + BreakStuffButton.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + BreakStuffButton.ttText = "BreakStuff : OFF"; + BreakStuffButton.subText = ""; + BreakStuffButton:SetScript("OnEnter", BreakStuff_OnEnter); + BreakStuffButton:SetScript("OnLeave", BreakStuff_OnLeave); + BreakStuffButton:SetScript("OnClick", BreakStuff_OnClick); + BreakStuffButton:SetScript("OnHide", BreakStuff_OnHide) + BreakStuffButton.subText = tcat(spellListing,"\n"); + + BreakStuffHandler:RegisterForClicks('AnyUp') + BreakStuffHandler:SetFrameStrata("TOOLTIP") + BreakStuffHandler:SetAttribute("type1","spell") + BreakStuffHandler:SetScript("OnEnter", SetClonedTip) + BreakStuffHandler:SetScript("OnLeave", BreakStuff_OnModifier) + BreakStuffHandler:RegisterEvent("MODIFIER_STATE_CHANGED") + BreakStuffHandler:Hide() + + GameTooltip:HookScript('OnTooltipSetItem', BreakStuffParser) + + for _, sparks in pairs(BreakStuffHandler.sparkles) do + sparks:SetHeight(sparks:GetHeight() * 3) + sparks:SetWidth(sparks:GetWidth() * 3) + end +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/bag/components/sorting.lua b/Interface/AddOns/SVUI/packages/bag/components/sorting.lua new file mode 100644 index 0000000..33d60e0 --- /dev/null +++ b/Interface/AddOns/SVUI/packages/bag/components/sorting.lua @@ -0,0 +1,882 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +credit: Kemayo. original logic from BankStack. Adapted to SVUI # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local assert = _G.assert; +local type = _G.type; +local error = _G.error; +local pcall = _G.pcall; +local print = _G.print; +local ipairs = _G.ipairs; +local pairs = _G.pairs; +local next = _G.next; +local rawset = _G.rawset; +local rawget = _G.rawget; +local tostring = _G.tostring; +local tonumber = _G.tonumber; +local tinsert = _G.tinsert; +local string = _G.string; +local math = _G.math; +local bit = _G.bit; +local table = _G.table; +--[[ STRING METHODS ]]-- +local gmatch, gsub, match, split = string.gmatch, string.gsub, string.match, string.split; +--[[ MATH METHODS ]]-- +local floor = math.floor; +--[[ BINARY METHODS ]]-- +local band = bit.band; +--[[ TABLE METHODS ]]-- +local tremove, tcopy, twipe, tsort = table.remove, table.copy, table.wipe, table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = select(2, ...) +local L = SV.L; +local MOD = SV.SVBag; +--[[ +########################################################## +LOCAL VARS +########################################################## +]]-- +local WAIT_TIME = 0.05 +local bagGroups = {}; +local initialOrder = {}; +local bagSorted = {}; +local bagLocked = {}; +local targetItems = {}; +local sourceUsed = {}; +local targetSlots = {}; +local specialtyBags = {}; +local emptySlots = {}; +local moveRetries = 0; +local moveTracker = {}; +local blackListedSlots = {}; +local blackList = {}; +local lastItemID, lockStop, lastDestination, lastMove, itemTypes, itemSubTypes; +local IterateBagsForSorting; +local RefEquipmentSlots = { + INVTYPE_AMMO = 0, + INVTYPE_HEAD = 1, + INVTYPE_NECK = 2, + INVTYPE_SHOULDER = 3, + INVTYPE_BODY = 4, + INVTYPE_CHEST = 5, + INVTYPE_ROBE = 5, + INVTYPE_WAIST = 6, + INVTYPE_LEGS = 7, + INVTYPE_FEET = 8, + INVTYPE_WRIST = 9, + INVTYPE_HAND = 10, + INVTYPE_FINGER = 11, + INVTYPE_TRINKET = 12, + INVTYPE_CLOAK = 13, + INVTYPE_WEAPON = 14, + INVTYPE_SHIELD = 15, + INVTYPE_2HWEAPON = 16, + INVTYPE_WEAPONMAINHAND = 18, + INVTYPE_WEAPONOFFHAND = 19, + INVTYPE_HOLDABLE = 20, + INVTYPE_RANGED = 21, + INVTYPE_THROWN = 22, + INVTYPE_RANGEDRIGHT = 23, + INVTYPE_RELIC = 24, + INVTYPE_TABARD = 25 +} + +local sortingCache = { + [1] = {}, --BAG + [2] = {}, --ID + [3] = {}, --PETID + [4] = {}, --STACK + [5] = {}, --MAXSTACK + [6] = {}, --MOVES +} + +local scanningCache = { + ["all"] = {}, + ["bags"] = {}, + ["bank"] = {BANK_CONTAINER}, + ["reagent"] = {REAGENTBANK_CONTAINER}, + ["guild"] = {51,52,53,54,55,56,57,58}, +} + +for i = NUM_BAG_SLOTS + 1, (NUM_BAG_SLOTS + NUM_BANKBAGSLOTS), 1 do + tinsert(scanningCache.bank, i) +end +for i = 0, NUM_BAG_SLOTS do + tinsert(scanningCache.bags, i) +end +for _,i in ipairs(scanningCache.bags) do + tinsert(scanningCache.all, i) +end +for _,i in ipairs(scanningCache.bank) do + tinsert(scanningCache.all, i) +end +for _,i in ipairs(scanningCache.reagent) do + tinsert(scanningCache.all, i) +end +for _,i in ipairs(scanningCache.guild) do + tinsert(scanningCache.all, i) +end +--[[ +########################################################## +SORTING UPDATES HANDLER +########################################################## +]]-- +local SortUpdateTimer = CreateFrame("Frame") +SortUpdateTimer.timeLapse = 0 +SortUpdateTimer:Hide() +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local function ValidateBag(bagid) + return (bagid == BANK_CONTAINER or ((bagid >= 0) and bagid <= (NUM_BAG_SLOTS + NUM_BANKBAGSLOTS))) +end +local function ValidateBank(bagid) + return (bagid == BANK_CONTAINER or bagid == REAGENTBANK_CONTAINER or (bagid > NUM_BAG_SLOTS and bagid <= NUM_BANKBAGSLOTS)) +end +local function ValidateGuildBank(bagid) + return (bagid > 50 and bagid <= 58) +end +local function BagEncoder(bag, slot) return (bag * 100) + slot end +local function BagDecoder(int) return math.floor(int / 100), int % 100 end +local function MoveEncoder(source, target) return (source * 10000) + target end +local function MoveDecoder(move) + local s = math.floor(move / 10000) + local t = move % 10000 + s = (t > 9000) and (s + 1) or s + t = (t > 9000) and (t - 10000) or t + return s, t +end +--[[ +########################################################## +LOCAL FUNCTIONS +########################################################## +]]-- +local function SetBlockedCache(...) + twipe(blackList) + for index = 1, select('#', ...) do + local name = select(index, ...) + local isLink = GetItemInfo(name) + if isLink then + blackList[isLink] = true + end + end +end + +local function BuildSortOrder() + itemTypes = {} + itemSubTypes = {} + for i, iType in ipairs({GetAuctionItemClasses()}) do + itemTypes[iType] = i + itemSubTypes[iType] = {} + for ii, isType in ipairs({GetAuctionItemSubClasses(i)}) do + itemSubTypes[iType][isType] = ii + end + end +end + +local function UpdateLocation(from, to) + if (sortingCache[2][from] == sortingCache[2][to]) and (sortingCache[4][to] < sortingCache[5][to]) then + local stackSize = sortingCache[5][to] + if (sortingCache[4][to] + sortingCache[4][from]) > stackSize then + sortingCache[4][from] = sortingCache[4][from] - (stackSize - sortingCache[4][to]) + sortingCache[4][to] = stackSize + else + sortingCache[4][to] = sortingCache[4][to] + sortingCache[4][from] + sortingCache[4][from] = nil + sortingCache[2][from] = nil + sortingCache[5][from] = nil + end + else + sortingCache[2][from], sortingCache[2][to] = sortingCache[2][to], sortingCache[2][from] + sortingCache[4][from], sortingCache[4][to] = sortingCache[4][to], sortingCache[4][from] + sortingCache[5][from], sortingCache[5][to] = sortingCache[5][to], sortingCache[5][from] + end +end + +local function PrimarySort(a, b) + local aName, _, _, aLvl, _, _, _, _, _, _, aPrice = GetItemInfo(sortingCache[2][a]) + local bName, _, _, bLvl, _, _, _, _, _, _, bPrice = GetItemInfo(sortingCache[2][b]) + if aLvl ~= bLvl and aLvl and bLvl then + return aLvl > bLvl + end + if aPrice ~= bPrice and aPrice and bPrice then + return aPrice > bPrice + end + if aName and bName then + return aName < bName + end +end + +local function DefaultSort(b, a) + local aID = sortingCache[2][a] + local bID = sortingCache[2][b] + if (not aID) or (not bID) then return aID end + if sortingCache[3][a] and sortingCache[3][b] then + local aName, _, aType = C_PetJournal.GetPetInfoBySpeciesID(aID); + local bName, _, bType = C_PetJournal.GetPetInfoBySpeciesID(bID); + if aType and bType and aType ~= bType then + return aType > bType + end + if aName and bName and (type(aName) == type(bName)) and aName ~= bName then + return aName < bName + end + end + local aOrder, bOrder = initialOrder[a], initialOrder[b] + if aID == bID then + local aCount = sortingCache[4][a] + local bCount = sortingCache[4][b] + if aCount and bCount and aCount == bCount then + return aOrder < bOrder + elseif aCount and bCount then + return aCount < bCount + end + end + local _, _, aRarity, _, _, aType, aSubType, _, aEquipLoc = GetItemInfo(aID) + local _, _, bRarity, _, _, bType, bSubType, _, bEquipLoc = GetItemInfo(bID) + if sortingCache[3][a] then + aRarity = 1 + end + if sortingCache[3][b] then + bRarity = 1 + end + if aRarity ~= bRarity and aRarity and bRarity then + return aRarity > bRarity + end + if itemTypes[aType] ~= itemTypes[bType] then + return (itemTypes[aType] or 99) < (itemTypes[bType] or 99) + end + if aType == ARMOR or aType == ENCHSLOT_WEAPON then + local aEquipLoc = RefEquipmentSlots[aEquipLoc] or -1 + local bEquipLoc = RefEquipmentSlots[bEquipLoc] or -1 + if aEquipLoc == bEquipLoc then + return PrimarySort(a, b) + end + if aEquipLoc and bEquipLoc then + return aEquipLoc < bEquipLoc + end + end + if aSubType == bSubType then + return PrimarySort(a, b) + end + return ((itemSubTypes[aType] or {})[aSubType] or 99) < ((itemSubTypes[bType] or {})[bSubType] or 99) +end + +local function ReverseSort(a, b) + return DefaultSort(b, a) +end + +local function ConvertLinkToID(link) + if not link then return; end + if tonumber(match(link, "item:(%d+)")) then + return tonumber(match(link, "item:(%d+)")); + else + return tonumber(match(link, "battlepet:(%d+)")), true; + end +end + +local function GetSortingGroup(id) + if match(id, "^[-%d,]+$") then + local bags = {} + for b in gmatch(id, "-?%d+") do + tinsert(bags, tonumber(b)) + end + return bags + end + return scanningCache[id] +end + +local function GetSortingInfo(bag, slot) + if (ValidateGuildBank(bag)) then + return GetGuildBankItemInfo(bag - 50, slot) + else + return GetContainerItemInfo(bag, slot) + end +end + +local function GetSortingItemLink(bag, slot) + if (ValidateGuildBank(bag)) then + return GetGuildBankItemLink(bag - 50, slot) + else + return GetContainerItemLink(bag, slot) + end +end +--[[ +########################################################## +BAG ITERATION METHOD +########################################################## +]]-- +do + local bagRole; + + local function GetNumSortingSlots(bag, role) + if (ValidateGuildBank(bag)) then + if not role then role = "deposit" end + local name, icon, canView, canDeposit, numWithdrawals = GetGuildBankTabInfo(bag - 50) + if name and canView then + return 98 + end + else + return GetContainerNumSlots(bag) + end + return 0 + end + + local function IterateForwards(bagList, i) + i = i + 1 + local step = 1 + for _,bag in ipairs(bagList) do + local slots = GetNumSortingSlots(bag, bagRole) + if i > slots + step then + step = step + slots + else + for slot = 1, slots do + if step == i then + return i, bag, slot + end + step = step + 1 + end + end + end + bagRole = nil + end + + local function IterateBackwards(bagList, i) + i = i + 1 + local step = 1 + for ii = #bagList, 1, -1 do + local bag = bagList[ii] + local slots = GetNumSortingSlots(bag, bagRole) + if i > slots + step then + step = step + slots + else + for slot=slots, 1, -1 do + if step == i then + return i, bag, slot + end + step = step + 1 + end + end + end + bagRole = nil + end + + function IterateBagsForSorting(bagList, reverse, role) + bagRole = role + return (reverse and IterateBackwards or IterateForwards), bagList, 0 + end +end +--[[ +########################################################## +CORE FUNCTIONS +########################################################## +]]-- +-- function MOD.Compress(...) +-- for i=1, select("#", ...) do +-- local bags = select(i, ...) +-- MOD.Stack(bags, bags, MOD.IsPartial) +-- end +-- end + +-- function MOD.Organizer(fnType, sourceBags, targetBags) +-- if(fnType == 'stack') then +-- MOD.Stack(sourceBags, targetBags, MOD.IsPartial) +-- elseif(fnType == 'move') then +-- MOD.Stack(sourceBags, targetBags, MOD.IsPartial) +-- else +-- MOD.Sort() +-- end +-- end +--[[ +########################################################## +EXTERNAL SORTING CALLS +########################################################## +]]-- +do + local function SetSortingPath(source, target) + UpdateLocation(source, target) + tinsert(sortingCache[6], 1, (MoveEncoder(source, target))) + end + + local function IsPartial(bag, slot) + local bagSlot = BagEncoder(bag, slot) + return ((sortingCache[5][bagSlot] or 0) - (sortingCache[4][bagSlot] or 0)) > 0 + end + + local function IsSpecialtyBag(bagID) + if(bagID == 0 or (ValidateBank(bagID)) or (ValidateGuildBank(bagID))) then return false end + local inventorySlot = ContainerIDToInventoryID(bagID) + if not inventorySlot then return false end + local bag = GetInventoryItemLink("player", inventorySlot) + if not bag then return false end + local family = GetItemFamily(bag) + if family == 0 or family == nil then return false end + return family + end + + local function CanItemGoInBag(bag, slot, targetBag) + if (ValidateGuildBank(targetBag)) then return true end + local item = sortingCache[2][(BagEncoder(bag, slot))] + local itemFamily = GetItemFamily(item) + if itemFamily and itemFamily > 0 then + local equipSlot = select(9, GetItemInfo(item)) + if equipSlot == "INVTYPE_BAG" then + itemFamily = 1 + end + end + local bagFamily = select(2, GetContainerNumFreeSlots(targetBag)) + if itemFamily then + return (bagFamily == 0) or band(itemFamily, bagFamily) > 0 + else + return false; + end + end + + local function ShouldMove(source, destination) + if((destination == source) or (not sortingCache[2][source])) then return; end + if((sortingCache[2][source] == sortingCache[2][destination]) and (sortingCache[4][source] == sortingCache[4][destination])) then return; end + return true + end + + local function UpdateSorted(source, destination) + for i, bs in pairs(bagSorted) do + if bs == source then + bagSorted[i] = destination + elseif bs == destination then + bagSorted[i] = source + end + end + end + + local function Sorter(bags, sorter, reverse) + if not sorter then sorter = reverse and ReverseSort or DefaultSort end + if not itemTypes then BuildSortOrder() end + twipe(blackListedSlots) + local ignoreItems = SV.db.SVBag.ignoreItems + ignoreItems = ignoreItems:gsub(',%s', ',') + SetBlockedCache(split(",", ignoreItems)) + for i, bag, slot in IterateBagsForSorting(bags, nil, 'both') do + local bagSlot = BagEncoder(bag, slot) + local link = GetSortingItemLink(bag, slot); + if link and blackList[GetItemInfo(link)] then + blackListedSlots[bagSlot] = true + end + if not blackListedSlots[bagSlot] then + initialOrder[bagSlot] = i + tinsert(bagSorted, bagSlot) + end + end + tsort(bagSorted, sorter) + local passNeeded = true + while passNeeded do + passNeeded = false + local i = 1 + for _, bag, slot in IterateBagsForSorting(bags, nil, 'both') do + local destination = BagEncoder(bag, slot) + local source = bagSorted[i] + if not blackListedSlots[destination] then + if(ShouldMove(source, destination)) then + if not (bagLocked[source] or bagLocked[destination]) then + SetSortingPath(source, destination) + UpdateSorted(source, destination) + bagLocked[source] = true + bagLocked[destination] = true + else + passNeeded = true + end + end + i = i + 1 + end + end + twipe(bagLocked) + end + twipe(bagSorted) + twipe(initialOrder) + end + + local function SortFiller(sourceBags, targetBags, reverse, canMove) + if not canMove then canMove = true end + for _, bag, slot in IterateBagsForSorting(targetBags, reverse, "deposit") do + local bagSlot = BagEncoder(bag, slot) + if not sortingCache[2][bagSlot] then + tinsert(emptySlots, bagSlot) + end + end + for _, bag, slot in IterateBagsForSorting(sourceBags, not reverse, "withdraw") do + if #emptySlots == 0 then break end + local bagSlot = BagEncoder(bag, slot) + local targetBag, targetSlot = BagDecoder(emptySlots[1]) + if sortingCache[2][bagSlot] and CanItemGoInBag(bag, slot, targetBag) and (canMove == true or canMove(sortingCache[2][bagSlot], bag, slot)) then + SetSortingPath(bagSlot, tremove(emptySlots, 1)) + end + end + twipe(emptySlots) + end + + function MOD.Sort(...) + for i=1, select("#", ...) do + local bags = select(i, ...) + for _, slotNum in ipairs(bags) do + local bagType = IsSpecialtyBag(slotNum) + if bagType == false then bagType = 'Normal' end + if not sortingCache[1][bagType] then sortingCache[1][bagType] = {} end + tinsert(sortingCache[1][bagType], slotNum) + end + for bagType, sortedBags in pairs(sortingCache[1]) do + if bagType ~= 'Normal' then + MOD.Stack(sortedBags, IsPartial) + SortFiller(sortingCache[1]['Normal'], sortedBags, SV.db.SVBag.sortInverted) + MOD.Stack(sortingCache[1]['Normal'], IsPartial) + Sorter(sortedBags, nil, SV.db.SVBag.sortInverted) + twipe(sortedBags) + end + end + if sortingCache[1]['Normal'] then + MOD.Stack(sortingCache[1]['Normal'], IsPartial) + Sorter(sortingCache[1]['Normal'], nil, SV.db.SVBag.sortInverted) + twipe(sortingCache[1]['Normal']) + end + twipe(sortingCache[1]) + twipe(bagGroups) + end + end + + function MOD.Transfer(sourceBags, targetBags, canMove) + if not canMove then canMove = true end + for _, bag, slot in IterateBagsForSorting(targetBags, nil, "deposit") do + local bagSlot = BagEncoder(bag, slot) + local itemID = sortingCache[2][bagSlot] + if itemID and (sortingCache[4][bagSlot] ~= sortingCache[5][bagSlot]) then + targetItems[itemID] = (targetItems[itemID] or 0) + 1 + tinsert(targetSlots, bagSlot) + end + end + + for _, bag, slot in IterateBagsForSorting(sourceBags, true, "withdraw") do + local sourceSlot = BagEncoder(bag, slot) + local itemID = sortingCache[2][sourceSlot] + if itemID and targetItems[itemID] and (canMove == true or canMove(itemID, bag, slot)) then + for i = #targetSlots, 1, -1 do + local targetedSlot = targetSlots[i] + if sortingCache[2][sourceSlot] and sortingCache[2][targetedSlot] == itemID and targetedSlot ~= sourceSlot and not (sortingCache[4][targetedSlot] == sortingCache[5][targetedSlot]) and not sourceUsed[targetedSlot] then + SetSortingPath(sourceSlot, targetedSlot) + sourceUsed[sourceSlot] = true + if sortingCache[4][targetedSlot] == sortingCache[5][targetedSlot] then + targetItems[itemID] = (targetItems[itemID] > 1) and (targetItems[itemID] - 1) or nil + end + if sortingCache[4][sourceSlot] == 0 then + targetItems[itemID] = (targetItems[itemID] > 1) and (targetItems[itemID] - 1) or nil + break + end + if not targetItems[itemID] then break end + end + end + end + end + twipe(targetItems) + twipe(targetSlots) + twipe(sourceUsed) + end + + function MOD.Stack(bags, canMove) + if not canMove then canMove = true end + for _, bag, slot in IterateBagsForSorting(bags, nil, "deposit") do + local bagSlot = BagEncoder(bag, slot) + local itemID = sortingCache[2][bagSlot] + if itemID and (sortingCache[4][bagSlot] ~= sortingCache[5][bagSlot]) then + targetItems[itemID] = (targetItems[itemID] or 0) + 1 + tinsert(targetSlots, bagSlot) + end + end + + for _, bag, slot in IterateBagsForSorting(bags, true, "withdraw") do + local sourceSlot = BagEncoder(bag, slot) + local itemID = sortingCache[2][sourceSlot] + if itemID and targetItems[itemID] and (canMove == true or (type(canMove) == "function" and canMove(itemID, bag, slot))) then + for i = #targetSlots, 1, -1 do + local targetedSlot = targetSlots[i] + if sortingCache[2][sourceSlot] and sortingCache[2][targetedSlot] == itemID and targetedSlot ~= sourceSlot and not (sortingCache[4][targetedSlot] == sortingCache[5][targetedSlot]) and not sourceUsed[targetedSlot] then + SetSortingPath(sourceSlot, targetedSlot) + sourceUsed[sourceSlot] = true + if sortingCache[4][targetedSlot] == sortingCache[5][targetedSlot] then + targetItems[itemID] = (targetItems[itemID] > 1) and (targetItems[itemID] - 1) or nil + end + if sortingCache[4][sourceSlot] == 0 then + targetItems[itemID] = (targetItems[itemID] > 1) and (targetItems[itemID] - 1) or nil + break + end + if not targetItems[itemID] then break end + end + end + end + end + twipe(targetItems) + twipe(targetSlots) + twipe(sourceUsed) + end +end +--[[ +########################################################## +INTERNAL SORTING CALLS +########################################################## +]]-- +do + local function GetSortingItemID(bag, slot) + if (ValidateGuildBank(bag)) then + local link = GetSortingItemLink(bag, slot) + return link and tonumber(string.match(link, "item:(%d+)")) + else + return GetContainerItemID(bag, slot) + end + end + + function SortUpdateTimer:StopStacking(message) + twipe(sortingCache[6]) + twipe(moveTracker) + moveRetries, lastItemID, lockStop, lastDestination, lastMove = 0, nil, nil, nil, nil + self:SetScript("OnUpdate", nil) + self:Hide() + if(message and CombatText_AddMessage) then + CombatText_AddMessage(message, CombatText_StandardScroll, 1, 0.35, 0) + end + end + + function SortUpdateTimer:MoveItem(move) + if GetCursorInfo() == "item" then + return false, 'cursorhasitem' + end + local source, target = MoveDecoder(move) + local sourceBag, sourceSlot = BagDecoder(source) + local targetBag, targetSlot = BagDecoder(target) + local _, sourceCount, sourceLocked = GetSortingInfo(sourceBag, sourceSlot) + local _, targetCount, targetLocked = GetSortingInfo(targetBag, targetSlot) + if sourceLocked or targetLocked then + return false, 'source/target_locked' + end + local sourceLink = GetSortingItemLink(sourceBag, sourceSlot) + local sourceItemID = GetSortingItemID(sourceBag, sourceSlot) + local targetItemID = GetSortingItemID(targetBag, targetSlot) + + if not sourceItemID then + if moveTracker[source] then + return false, 'move incomplete' + else + return self:StopStacking(L['Confused.. Try Again!']) + end + end + + local stackSize = select(8, GetItemInfo(sourceItemID)) + + local sourceGuild = ValidateGuildBank(sourceBag) + local targetGuild = ValidateGuildBank(targetBag) + + if (sourceItemID == targetItemID) and (targetCount ~= stackSize) and ((targetCount + sourceCount) > stackSize) then + local amount = (stackSize - targetCount) + if (sourceGuild) then + SplitGuildBankItem(sourceBag - 50, sourceSlot, amount) + else + SplitContainerItem(sourceBag, sourceSlot, amount) + end + else + if (sourceGuild) then + PickupGuildBankItem(sourceBag - 50, sourceSlot) + else + PickupContainerItem(sourceBag, sourceSlot) + end + end + + if GetCursorInfo() == "item" then + if (targetGuild) then + PickupGuildBankItem(targetBag - 50, targetSlot) + else + PickupContainerItem(targetBag, targetSlot) + end + end + + if sourceGuild then + QueryGuildBankTab(sourceBag - 50) + end + if targetGuild then + QueryGuildBankTab(targetBag - 50) + end + return true, sourceItemID, source, targetItemID, target, sourceGuild or targetGuild + end + + local SortUpdateTimer_OnUpdate = function(self, elapsed) + self.timeLapse = self.timeLapse + (elapsed or 0.01) + if(self.timeLapse > 0.05) then + self.timeLapse = 0 + if InCombatLockdown() then + return self:StopStacking(L["Can't Clean Bags in Combat!"]) + end + local cursorType, cursorItemID = GetCursorInfo() + if cursorType == "item" and cursorItemID then + if lastItemID ~= cursorItemID then + return self:StopStacking(L["Bag Cleaning Error, Try Again"]) + end + if moveRetries < 100 then + local targetBag, targetSlot = BagDecoder(lastDestination) + local _, _, targetLocked = GetSortingInfo(targetBag, targetSlot) + if not targetLocked then + if(ValidateGuildBank(targetBag)) then + PickupGuildBankItem(targetBag - 50, targetSlot) + else + PickupContainerItem(targetBag, targetSlot) + end + WAIT_TIME = 0.1 + lockStop = GetTime() + moveRetries = moveRetries + 1 + return + end + end + end + if lockStop then + local i = 1; + for slot, itemID in pairs(moveTracker) do + local sourceBag, sourceSlot = BagDecoder(slot) + local actualItemID = GetSortingItemID(sourceBag, sourceSlot) + if actualItemID ~= itemID then + WAIT_TIME = 0.1 + if (GetTime() - lockStop) > 1.25 then + if lastMove and moveRetries < 100 then + local success, moveID, moveSource, targetID, moveTarget, wasGuild = self:MoveItem(lastMove) + WAIT_TIME = wasGuild and 0.5 or 0.1 + if not success then + lockStop = GetTime() + moveRetries = moveRetries + 1 + return + end + moveTracker[moveSource] = targetID + moveTracker[moveTarget] = moveID + lastDestination = moveTarget + lastMove = sortingCache[6][i] + lastItemID = moveID + tremove(sortingCache[6], i) + return + end + self:StopStacking() + return + end + return + end + moveTracker[slot] = nil + i = i + 1; + end + end + lastItemID, lockStop, lastDestination, lastMove = nil, nil, nil, nil + twipe(moveTracker) + local start, success, moveID, targetID, moveSource, moveTarget, wasGuild + start = GetTime() + if #sortingCache[6] > 0 then + for i = #sortingCache[6], 1, -1 do + success, moveID, moveSource, targetID, moveTarget, wasGuild = self:MoveItem(sortingCache[6][i]) + if not success then + WAIT_TIME = wasGuild and 0.3 or 0.1 + lockStop = GetTime() + return + end + moveTracker[moveSource] = targetID + moveTracker[moveTarget] = moveID + lastDestination = moveTarget + lastMove = sortingCache[6][i] + lastItemID = moveID + tremove(sortingCache[6], i) + if sortingCache[6][i-1] then + WAIT_TIME = wasGuild and 0.3 or 0; + return + end + end + end + self:StopStacking() + end + end + + function SortUpdateTimer:StartStacking() + twipe(sortingCache[5]) + twipe(sortingCache[4]) + twipe(sortingCache[2]) + twipe(moveTracker) + if #sortingCache[6] > 0 then + self:Show() + self:SetScript("OnUpdate", SortUpdateTimer_OnUpdate) + else + self:StopStacking() + end + end +end + +function MOD:RunSortingProcess(func, groupsDefaults, altFunc) + local bagGroups = {} + return function(groups) + if(altFunc and IsShiftKeyDown()) then + altFunc() + else + if SortUpdateTimer:IsShown() then + SortUpdateTimer:StopStacking(L['Already Running.. Bailing Out!']) + return; + end + twipe(bagGroups) + if not groups or #groups == 0 then + groups = groupsDefaults + end + for bags in (groups or ""):gmatch("[^%s]+") do + if bags == "guild" then + bags = GetSortingGroup(bags) + if bags then + tinsert(bagGroups, {bags[GetCurrentGuildBankTab()]}) + end + else + bags = GetSortingGroup(bags) + if bags then + tinsert(bagGroups, bags) + end + end + end + for _, bag, slot in IterateBagsForSorting(scanningCache.all) do + local bagSlot = BagEncoder(bag, slot) + local itemID, isBattlePet = ConvertLinkToID(GetSortingItemLink(bag, slot)) + if itemID then + if isBattlePet then + sortingCache[3][bagSlot] = itemID + sortingCache[5][bagSlot] = 1 + else + sortingCache[5][bagSlot] = select(8, GetItemInfo(itemID)) + end + sortingCache[2][bagSlot] = itemID + sortingCache[4][bagSlot] = select(2, GetSortingInfo(bag, slot)) + end + end + if func(unpack(bagGroups)) == false then + return + end + twipe(bagGroups) + SortUpdateTimer:StartStacking() + end + collectgarbage("collect") + end +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua b/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua deleted file mode 100644 index f14b9da..0000000 --- a/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua +++ /dev/null @@ -1,325 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local ipairs = _G.ipairs; -local tinsert = _G.tinsert; -local table = _G.table; -local match = string.match; ---[[ TABLE METHODS ]]-- -local tremove, tcopy, twipe, tsort, tcat = table.remove, table.copy, table.wipe, table.sort, table.concat; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = select(2, ...) -local L = SV.L; -local MOD = SV.SVBag; -local TTIP = SV.SVTip; ---[[ -########################################################## -LOCAL VARS -########################################################## -]]-- -local BreakStuffButton = CreateFrame("Button", "BreakStuffButton", UIParent) -local BreakStuff_Cache = {} -local DE, PICK, SMITH, BreakStuffParser; -local ICONARTFILE = [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-BREAKSTUFF]]; -local BreakStuffHandler = CreateFrame('Button', "BreakStuffHandler", UIParent, 'SecureActionButtonTemplate, AutoCastShineTemplate') -BreakStuffHandler:SetScript('OnEvent', function(self, event, ...) self[event](self, ...) end) -BreakStuffHandler:SetPoint("LEFT",UIParent,"RIGHT",500) -BreakStuffHandler.TipLines = {} -BreakStuffHandler.TTextLeft = "" -BreakStuffHandler.TTextRight = "" -BreakStuffHandler.ReadyToSmash = false; ---[[ -########################################################## -ITEM PARSING -########################################################## -]]-- -do - local SkellyKeys = { - [GetSpellInfo(130100)] = true, -- Ghostly Skeleton Key - [GetSpellInfo(94574)] = true, -- Obsidium Skeleton Key - [GetSpellInfo(59403)] = true, -- Titanium Skeleton Key - [GetSpellInfo(59404)] = true, -- Colbat Skeleton Key - [GetSpellInfo(20709)] = true, -- Arcanite Skeleton Key - [GetSpellInfo(19651)] = true, -- Truesilver Skeleton Key - [GetSpellInfo(19649)] = true, -- Golden Skeleton Key - [GetSpellInfo(19646)] = true, -- Silver Skeleton Key - } - local BreakableFilter = { - ["Pickables"]={['68729']=true,['63349']=true,['45986']=true,['43624']=true,['43622']=true,['43575']=true,['31952']=true,['12033']=true,['29569']=true,['5760']=true,['13918']=true,['5759']=true,['16885']=true,['5758']=true,['13875']=true,['4638']=true,['16884']=true,['4637']=true,['4636']=true,['6355']=true,['16883']=true,['4634']=true,['4633']=true,['6354']=true,['16882']=true,['4632']=true,['88165']=true,['88567']=true},["SafeItems"]={['89392']=true,['89393']=true,['89394']=true,['89395']=true,['89396']=true,['89397']=true,['89398']=true,['89399']=true,['89400']=true,['83260']=true,['83261']=true,['83262']=true,['83263']=true,['83264']=true,['83265']=true,['83266']=true,['83267']=true,['83268']=true,['83269']=true,['83270']=true,['83271']=true,['83274']=true,['83275']=true,['82706']=true,['82707']=true,['82708']=true,['82709']=true,['82710']=true,['82711']=true,['82712']=true,['82713']=true,['82714']=true,['82715']=true,['82716']=true,['82717']=true,['82720']=true,['82721']=true,['81671']=true,['81672']=true,['81673']=true,['81674']=true,['81675']=true,['81676']=true,['81677']=true,['81678']=true,['81679']=true,['81680']=true,['81681']=true,['81682']=true,['81685']=true,['81686']=true,['64377']=true,['64489']=true,['64880']=true,['64885']=true,['62454']=true,['62455']=true,['62456']=true,['62457']=true,['62458']=true,['62459']=true,['62460']=true,['68740']=true,['49888']=true,['49497']=true,['49301']=true,['72980']=true,['72981']=true,['72989']=true,['72990']=true,['72991']=true,['72992']=true,['72993']=true,['72994']=true,['72995']=true,['72996']=true,['72997']=true,['72998']=true,['72999']=true,['73000']=true,['73001']=true,['73002']=true,['73003']=true,['73006']=true,['73007']=true,['73008']=true,['73009']=true,['73010']=true,['73011']=true,['73012']=true,['73325']=true,['73326']=true,['73336']=true,['88622']=true,['88648']=true,['88649']=true,['64460']=true,['44050']=true,['44173']=true,['44174']=true,['44192']=true,['44193']=true,['44199']=true,['44244']=true,['44245']=true,['44249']=true,['44250']=true,['44051']=true,['44052']=true,['44053']=true,['44108']=true,['44166']=true,['44187']=true,['44214']=true,['44241']=true,['38454']=true,['38455']=true,['38456']=true,['38457']=true,['38460']=true,['38461']=true,['38464']=true,['38465']=true,['29115']=true,['29130']=true,['29133']=true,['29137']=true,['29138']=true,['29166']=true,['29167']=true,['29185']=true,['34665']=true,['34666']=true,['34667']=true,['34670']=true,['34671']=true,['34672']=true,['34673']=true,['34674']=true,['29121']=true,['29124']=true,['29125']=true,['29151']=true,['29152']=true,['29153']=true,['29155']=true,['29156']=true,['29165']=true,['29171']=true,['29175']=true,['29182']=true,['30830']=true,['30832']=true,['29456']=true,['29457']=true,['25835']=true,['25836']=true,['25823']=true,['25825']=true,['77559']=true,['77570']=true,['77583']=true,['77586']=true,['77587']=true,['77588']=true,['21392']=true,['21395']=true,['21398']=true,['21401']=true,['21404']=true,['21407']=true,['21410']=true,['21413']=true,['21416']=true,['38632']=true,['38633']=true,['38707']=true,['34661']=true,['11290']=true,['11289']=true,['45858']=true,['84661']=true,['11288']=true,['28164']=true,['11287']=true,['44180']=true,['44202']=true,['44302']=true,['44200']=true,['44256']=true,['44104']=true,['44116']=true,['44196']=true,['44061']=true,['44062']=true,['29117']=true,['29129']=true,['29174']=true,['30836']=true,['35328']=true,['35329']=true,['35330']=true,['35331']=true,['35332']=true,['35333']=true,['35334']=true,['35335']=true,['35336']=true,['35337']=true,['35338']=true,['35339']=true,['35340']=true,['35341']=true,['35342']=true,['35343']=true,['35344']=true,['35345']=true,['35346']=true,['35347']=true,['35464']=true,['35465']=true,['35466']=true,['35467']=true,['30847']=true,['29122']=true,['29183']=true,['90079']=true,['90080']=true,['90081']=true,['90082']=true,['90083']=true,['90084']=true,['90085']=true,['90086']=true,['90110']=true,['90111']=true,['90112']=true,['90113']=true,['90114']=true,['90115']=true,['90116']=true,['90117']=true,['90136']=true,['90137']=true,['90138']=true,['90139']=true,['90140']=true,['90141']=true,['90142']=true,['90143']=true,['64643']=true,['77678']=true,['77679']=true,['77682']=true,['77692']=true,['77694']=true,['77695']=true,['77709']=true,['77710']=true,['77712']=true,['77886']=true,['77889']=true,['77890']=true,['77899']=true,['77900']=true,['77901']=true,['77917']=true,['77919']=true,['77920']=true,['77680']=true,['77681']=true,['77683']=true,['77690']=true,['77691']=true,['77693']=true,['77708']=true,['77711']=true,['77713']=true,['77887']=true,['77888']=true,['77891']=true,['77898']=true,['77902']=true,['77903']=true,['77916']=true,['77918']=true,['77921']=true,['77778']=true,['77779']=true,['77784']=true,['77795']=true,['77796']=true,['77800']=true,['77801']=true,['77844']=true,['77845']=true,['77846']=true,['77850']=true,['77777']=true,['77781']=true,['77782']=true,['77785']=true,['77797']=true,['77798']=true,['77799']=true,['77802']=true,['77847']=true,['77848']=true,['77851']=true,['77852']=true,['77724']=true,['77725']=true,['77728']=true,['77729']=true,['77732']=true,['77733']=true,['77773']=true,['77783']=true,['77803']=true,['77804']=true,['77843']=true,['77849']=true,['77614']=true,['77615']=true,['77616']=true,['77617']=true,['77618']=true,['77619']=true,['77620']=true,['77627']=true,['77628']=true,['77629']=true,['77630']=true,['77631']=true,['77632']=true,['77647']=true,['77648']=true,['77649']=true,['77650']=true,['77651']=true,['77652']=true,['77770']=true,['77771']=true,['77772']=true,['77774']=true,['77775']=true,['77776']=true,['77786']=true,['77789']=true,['77790']=true,['77791']=true,['77792']=true,['77793']=true,['77794']=true,['77837']=true,['77838']=true,['77839']=true,['77840']=true,['77841']=true,['77842']=true,['20406']=true,['20407']=true,['20408']=true,['77787']=true,['77788']=true,['28155']=true,['22986']=true,['22991']=true,['33292']=true,['86566']=true,['95517']=true,['95518']=true,['95523']=true,['95526']=true,['95527']=true,['95532']=true,['83158']=true,['83162']=true,['83167']=true,['83171']=true,['83176']=true,['83180']=true,['83185']=true,['83189']=true,['83194']=true,['83198']=true,['83203']=true,['83207']=true,['83212']=true,['83216']=true,['83221']=true,['83225']=true,['82614']=true,['82618']=true,['82623']=true,['82627']=true,['82632']=true,['82636']=true,['82641']=true,['82645']=true,['82650']=true,['82654']=true,['82659']=true,['82663']=true,['82668']=true,['82672']=true,['82677']=true,['82681']=true,['81579']=true,['81583']=true,['81588']=true,['81592']=true,['81597']=true,['81601']=true,['81606']=true,['81610']=true,['81615']=true,['81619']=true,['81624']=true,['81628']=true,['81633']=true,['81637']=true,['81642']=true,['81646']=true,['70118']=true,['62364']=true,['62386']=true,['62450']=true,['62441']=true,['62356']=true,['62406']=true,['62424']=true,['72621']=true,['72622']=true,['72623']=true,['72624']=true,['72625']=true,['72626']=true,['72627']=true,['72628']=true,['72638']=true,['72639']=true,['72640']=true,['72641']=true,['72642']=true,['72643']=true,['72644']=true,['72645']=true,['72646']=true,['72647']=true,['72648']=true,['72649']=true,['72650']=true,['72651']=true,['72652']=true,['72653']=true,['72655']=true,['72656']=true,['72657']=true,['72658']=true,['72659']=true,['72660']=true,['72661']=true,['72662']=true,['44180']=true,['44202']=true,['44302']=true,['44200']=true,['44256']=true,['44181']=true,['44203']=true,['44297']=true,['44303']=true,['44179']=true,['44194']=true,['44258']=true,['44106']=true,['44170']=true,['44190']=true,['44117']=true,['44054']=true,['44055']=true,['29116']=true,['29131']=true,['29141']=true,['29142']=true,['29147']=true,['29148']=true,['35356']=true,['35357']=true,['35358']=true,['35359']=true,['35360']=true,['35361']=true,['35362']=true,['35363']=true,['35364']=true,['35365']=true,['35366']=true,['35367']=true,['35368']=true,['35369']=true,['35370']=true,['35371']=true,['35372']=true,['35373']=true,['35374']=true,['35375']=true,['35468']=true,['35469']=true,['35470']=true,['35471']=true,['25838']=true,['90059']=true,['90060']=true,['90061']=true,['90062']=true,['90063']=true,['90064']=true,['90065']=true,['90066']=true,['90088']=true,['90089']=true,['90090']=true,['90091']=true,['90092']=true,['90093']=true,['90094']=true,['90095']=true,['90119']=true,['90120']=true,['90121']=true,['90122']=true,['90123']=true,['90124']=true,['90125']=true,['90126']=true,['77667']=true,['77670']=true,['77671']=true,['77697']=true,['77700']=true,['77701']=true,['77874']=true,['77876']=true,['77878']=true,['77907']=true,['77908']=true,['77909']=true,['77666']=true,['77668']=true,['77669']=true,['77696']=true,['77698']=true,['77699']=true,['77875']=true,['77877']=true,['77879']=true,['77904']=true,['77905']=true,['77906']=true,['77742']=true,['77746']=true,['77748']=true,['77752']=true,['77813']=true,['77815']=true,['77819']=true,['77820']=true,['77744']=true,['77745']=true,['77749']=true,['77811']=true,['77812']=true,['77818']=true,['77821']=true,['77720']=true,['77721']=true,['77730']=true,['77731']=true,['77747']=true,['77750']=true,['77816']=true,['77817']=true,['77598']=true,['77599']=true,['77600']=true,['77601']=true,['77602']=true,['77603']=true,['77604']=true,['77633']=true,['77634']=true,['77635']=true,['77636']=true,['77637']=true,['77638']=true,['77639']=true,['77736']=true,['77737']=true,['77738']=true,['77739']=true,['77740']=true,['77741']=true,['77743']=true,['77805']=true,['77806']=true,['77807']=true,['77808']=true,['77809']=true,['77810']=true,['77814']=true,['77605']=true,['77640']=true,['77753']=true,['77822']=true,['28158']=true,['22987']=true,['22992']=true,['95519']=true,['95521']=true,['95528']=true,['95530']=true,['83159']=true,['83163']=true,['83168']=true,['83172']=true,['83177']=true,['83181']=true,['83186']=true,['83190']=true,['83195']=true,['83199']=true,['83204']=true,['83208']=true,['83213']=true,['83217']=true,['83222']=true,['83226']=true,['82615']=true,['82619']=true,['82624']=true,['82628']=true,['82633']=true,['82637']=true,['82642']=true,['82646']=true,['82651']=true,['82655']=true,['82660']=true,['82664']=true,['82669']=true,['82673']=true,['82678']=true,['82682']=true,['81580']=true,['81584']=true,['81589']=true,['81593']=true,['81598']=true,['81602']=true,['81607']=true,['81611']=true,['81616']=true,['81620']=true,['81625']=true,['81629']=true,['81634']=true,['81638']=true,['81643']=true,['81647']=true,['70114']=true,['70122']=true,['62417']=true,['62420']=true,['62431']=true,['62433']=true,['62358']=true,['62381']=true,['62446']=true,['62374']=true,['62404']=true,['62405']=true,['62425']=true,['62426']=true,['72664']=true,['72665']=true,['72666']=true,['72667']=true,['72668']=true,['72669']=true,['72670']=true,['72671']=true,['72672']=true,['72673']=true,['72674']=true,['72675']=true,['72676']=true,['72677']=true,['72678']=true,['72679']=true,['72681']=true,['72682']=true,['72683']=true,['72684']=true,['72685']=true,['72686']=true,['72687']=true,['72688']=true,['72689']=true,['72690']=true,['72691']=true,['72692']=true,['72693']=true,['72694']=true,['72695']=true,['72696']=true,['88614']=true,['88615']=true,['88616']=true,['88617']=true,['88618']=true,['88619']=true,['88620']=true,['88621']=true,['88623']=true,['88624']=true,['88625']=true,['88626']=true,['88627']=true,['88628']=true,['88629']=true,['88630']=true,['44181']=true,['44203']=true,['44297']=true,['44303']=true,['44179']=true,['44194']=true,['44258']=true,['44182']=true,['44204']=true,['44295']=true,['44305']=true,['44248']=true,['44257']=true,['44109']=true,['44110']=true,['44122']=true,['44171']=true,['44189']=true,['44059']=true,['44060']=true,['29135']=true,['29136']=true,['29180']=true,['30835']=true,['35376']=true,['35377']=true,['35378']=true,['35379']=true,['35380']=true,['35381']=true,['35382']=true,['35383']=true,['35384']=true,['35385']=true,['35386']=true,['35387']=true,['35388']=true,['35389']=true,['35390']=true,['35391']=true,['35392']=true,['35393']=true,['35394']=true,['35395']=true,['35472']=true,['35473']=true,['35474']=true,['35475']=true,['64644']=true,['90068']=true,['90069']=true,['90070']=true,['90071']=true,['90072']=true,['90073']=true,['90074']=true,['90075']=true,['90127']=true,['90128']=true,['90129']=true,['90130']=true,['90131']=true,['90132']=true,['90133']=true,['90134']=true,['77673']=true,['77674']=true,['77676']=true,['77704']=true,['77705']=true,['77707']=true,['77880']=true,['77882']=true,['77883']=true,['77910']=true,['77913']=true,['77914']=true,['77672']=true,['77675']=true,['77677']=true,['77702']=true,['77703']=true,['77706']=true,['77881']=true,['77884']=true,['77885']=true,['77911']=true,['77912']=true,['77915']=true,['77642']=true,['77645']=true,['77762']=true,['77763']=true,['77765']=true,['77766']=true,['77831']=true,['77832']=true,['77641']=true,['77643']=true,['77760']=true,['77761']=true,['77768']=true,['77769']=true,['77829']=true,['77834']=true,['77644']=true,['77646']=true,['77722']=true,['77723']=true,['77764']=true,['77767']=true,['77830']=true,['77833']=true,['77606']=true,['77607']=true,['77608']=true,['77609']=true,['77610']=true,['77611']=true,['77612']=true,['77754']=true,['77755']=true,['77756']=true,['77757']=true,['77758']=true,['77759']=true,['77823']=true,['77824']=true,['77825']=true,['77826']=true,['77827']=true,['77828']=true,['77835']=true,['28162']=true,['22985']=true,['22993']=true,['95522']=true,['95525']=true,['95531']=true,['95534']=true,['83160']=true,['83164']=true,['83169']=true,['83173']=true,['83178']=true,['83182']=true,['83187']=true,['83191']=true,['83196']=true,['83200']=true,['83205']=true,['83209']=true,['83214']=true,['83218']=true,['83223']=true,['83227']=true,['82616']=true,['82620']=true,['82625']=true,['82629']=true,['82634']=true,['82638']=true,['82643']=true,['82647']=true,['82652']=true,['82656']=true,['82661']=true,['82665']=true,['82670']=true,['82674']=true,['82679']=true,['82683']=true,['81581']=true,['81585']=true,['81590']=true,['81594']=true,['81599']=true,['81603']=true,['81608']=true,['81612']=true,['81617']=true,['81621']=true,['81626']=true,['81630']=true,['81635']=true,['81639']=true,['81644']=true,['81648']=true,['70115']=true,['70123']=true,['62363']=true,['62385']=true,['62380']=true,['62409']=true,['62429']=true,['62445']=true,['62353']=true,['62407']=true,['62423']=true,['62439']=true,['72698']=true,['72699']=true,['72700']=true,['72701']=true,['72702']=true,['72703']=true,['72704']=true,['72705']=true,['72889']=true,['72890']=true,['72891']=true,['72892']=true,['72893']=true,['72894']=true,['72895']=true,['72896']=true,['72902']=true,['72903']=true,['72904']=true,['72905']=true,['72906']=true,['72907']=true,['72908']=true,['72909']=true,['72910']=true,['72911']=true,['72912']=true,['72913']=true,['72914']=true,['72915']=true,['72916']=true,['72917']=true,['44182']=true,['44204']=true,['44295']=true,['44305']=true,['44248']=true,['44257']=true,['44183']=true,['44205']=true,['44296']=true,['44306']=true,['44176']=true,['44195']=true,['44198']=true,['44201']=true,['44247']=true,['44111']=true,['44112']=true,['44120']=true,['44121']=true,['44123']=true,['44197']=true,['44239']=true,['44240']=true,['44243']=true,['44057']=true,['44058']=true,['40440']=true,['40441']=true,['40442']=true,['40443']=true,['40444']=true,['29127']=true,['29134']=true,['29184']=true,['35402']=true,['35403']=true,['35404']=true,['35405']=true,['35406']=true,['35407']=true,['35408']=true,['35409']=true,['35410']=true,['35411']=true,['35412']=true,['35413']=true,['35414']=true,['35415']=true,['35416']=true,['35476']=true,['35477']=true,['35478']=true,['90049']=true,['90050']=true,['90051']=true,['90052']=true,['90053']=true,['90054']=true,['90055']=true,['90056']=true,['90096']=true,['90097']=true,['90098']=true,['90099']=true,['90100']=true,['90101']=true,['90102']=true,['90103']=true,['90147']=true,['90148']=true,['90149']=true,['90150']=true,['90151']=true,['90152']=true,['90153']=true,['90154']=true,['77687']=true,['77688']=true,['77689']=true,['77714']=true,['77715']=true,['77718']=true,['77892']=true,['77894']=true,['77897']=true,['77923']=true,['77924']=true,['77927']=true,['77684']=true,['77685']=true,['77686']=true,['77716']=true,['77717']=true,['77719']=true,['77893']=true,['77895']=true,['77896']=true,['77922']=true,['77925']=true,['77926']=true,['77664']=true,['77665']=true,['77859']=true,['77867']=true,['77868']=true,['77869']=true,['77871']=true,['77872']=true,['38661']=true,['38663']=true,['38665']=true,['38666']=true,['38667']=true,['38668']=true,['38669']=true,['38670']=true,['77661']=true,['77662']=true,['77663']=true,['77858']=true,['77864']=true,['77865']=true,['77866']=true,['77873']=true,['77726']=true,['77727']=true,['77734']=true,['77735']=true,['77862']=true,['77863']=true,['77928']=true,['77929']=true,['77621']=true,['77622']=true,['77623']=true,['77624']=true,['77625']=true,['77626']=true,['77653']=true,['77654']=true,['77655']=true,['77656']=true,['77657']=true,['77658']=true,['77659']=true,['77853']=true,['77854']=true,['77855']=true,['77856']=true,['77857']=true,['77860']=true,['77861']=true,['34648']=true,['34649']=true,['34650']=true,['34651']=true,['34652']=true,['34653']=true,['34655']=true,['34656']=true,['77660']=true,['95520']=true,['95524']=true,['95529']=true,['95533']=true,['83161']=true,['83165']=true,['83166']=true,['83170']=true,['83174']=true,['83175']=true,['83179']=true,['83183']=true,['83184']=true,['83188']=true,['83192']=true,['83193']=true,['83197']=true,['83201']=true,['83202']=true,['83206']=true,['83210']=true,['83211']=true,['83215']=true,['83219']=true,['83220']=true,['83224']=true,['83228']=true,['83229']=true,['82617']=true,['82621']=true,['82622']=true,['82626']=true,['82630']=true,['82631']=true,['82635']=true,['82639']=true,['82640']=true,['82644']=true,['82648']=true,['82649']=true,['82653']=true,['82657']=true,['82658']=true,['82662']=true,['82666']=true,['82667']=true,['82671']=true,['82675']=true,['82676']=true,['82680']=true,['82684']=true,['82685']=true,['81582']=true,['81586']=true,['81587']=true,['81591']=true,['81595']=true,['81596']=true,['81600']=true,['81604']=true,['81605']=true,['81609']=true,['81613']=true,['81614']=true,['81618']=true,['81622']=true,['81623']=true,['81627']=true,['81631']=true,['81632']=true,['81636']=true,['81640']=true,['81641']=true,['81645']=true,['81649']=true,['81650']=true,['70108']=true,['70116']=true,['70117']=true,['70120']=true,['70121']=true,['62365']=true,['62384']=true,['62418']=true,['62432']=true,['62448']=true,['62449']=true,['62359']=true,['62382']=true,['62408']=true,['62410']=true,['62428']=true,['62430']=true,['62355']=true,['62438']=true,['72918']=true,['72919']=true,['72920']=true,['72921']=true,['72922']=true,['72923']=true,['72924']=true,['72925']=true,['72929']=true,['72930']=true,['72931']=true,['72932']=true,['72933']=true,['72934']=true,['72935']=true,['72936']=true,['72937']=true,['72938']=true,['72939']=true,['72940']=true,['72941']=true,['72942']=true,['72943']=true,['72944']=true,['72945']=true,['72946']=true,['72947']=true,['72948']=true,['72949']=true,['72950']=true,['72951']=true,['72952']=true,['72955']=true,['72956']=true,['72957']=true,['72958']=true,['72959']=true,['72960']=true,['72961']=true,['72962']=true,['72963']=true,['72964']=true,['72965']=true,['72966']=true,['72967']=true,['72968']=true,['72969']=true,['72970']=true,['72971']=true,['72972']=true,['72973']=true,['72974']=true,['72975']=true,['72976']=true,['72977']=true,['72978']=true,['44183']=true,['44205']=true,['44296']=true,['44306']=true,['44176']=true,['44195']=true,['44198']=true,['44201']=true,['44247']=true,['29278']=true,['29282']=true,['29286']=true,['29291']=true,['31113']=true,['34675']=true,['34676']=true,['34677']=true,['34678']=true,['34679']=true,['34680']=true,['29128']=true,['29132']=true,['29139']=true,['29140']=true,['29145']=true,['29146']=true,['29168']=true,['29169']=true,['29173']=true,['29179']=true,['29276']=true,['29280']=true,['29284']=true,['29288']=true,['30841']=true,['32538']=true,['32539']=true,['29277']=true,['29281']=true,['29285']=true,['29289']=true,['32864']=true,['31341']=true,['29119']=true,['29123']=true,['29126']=true,['29170']=true,['29172']=true,['29176']=true,['29177']=true,['29181']=true,['32770']=true,['32771']=true,['30834']=true,['25824']=true,['25826']=true,['21200']=true,['21205']=true,['21210']=true,['52252']=true,['21199']=true,['21204']=true,['21209']=true,['49052']=true,['49054']=true,['21198']=true,['21203']=true,['21208']=true,['32695']=true,['38662']=true,['38664']=true,['38671']=true,['38672']=true,['38674']=true,['38675']=true,['39320']=true,['39322']=true,['32694']=true,['21394']=true,['21397']=true,['21400']=true,['21403']=true,['21406']=true,['21409']=true,['21412']=true,['21415']=true,['21418']=true,['21197']=true,['21202']=true,['21207']=true,['21393']=true,['21396']=true,['21399']=true,['21402']=true,['21405']=true,['21408']=true,['21411']=true,['21414']=true,['21417']=true,['17904']=true,['17909']=true,['21196']=true,['21201']=true,['21206']=true,['65274']=true,['65360']=true,['17902']=true,['17903']=true,['17907']=true,['17908']=true,['40476']=true,['40477']=true,['17690']=true,['17691']=true,['17900']=true,['17901']=true,['17905']=true,['17906']=true,['34657']=true,['34658']=true,['34659']=true,['38147']=true,['21766']=true,['64886']=true,['64887']=true,['64888']=true,['64889']=true,['64890']=true,['64891']=true,['64892']=true,['64893']=true,['64894']=true,['64895']=true,['64896']=true,['64897']=true,['64898']=true,['64899']=true,['64900']=true,['64901']=true,['64902']=true,['64903']=true,['64905']=true,['64906']=true,['64907']=true,['64908']=true,['64909']=true,['64910']=true,['64911']=true,['64912']=true,['64913']=true,['64914']=true,['64915']=true,['64916']=true,['64917']=true,['64918']=true,['64919']=true,['64920']=true,['64921']=true,['64922']=true,['4614']=true,['22990']=true,['34484']=true,['34486']=true,['23705']=true,['23709']=true,['38309']=true,['38310']=true,['38311']=true,['38312']=true,['38313']=true,['38314']=true,['40643']=true,['43300']=true,['43348']=true,['43349']=true,['98162']=true,['35279']=true,['35280']=true,['40483']=true,['46874']=true,['89401']=true,['89784']=true,['89795']=true,['89796']=true,['89797']=true,['89798']=true,['89799']=true,['89800']=true,['95591']=true,['95592']=true,['97131']=true,['50384']=true,['50386']=true,['50387']=true,['50388']=true,['52570']=true,['50375']=true,['50376']=true,['50377']=true,['50378']=true,['52569']=true,['72982']=true,['72983']=true,['72984']=true,['73004']=true,['73005']=true,['73013']=true,['73014']=true,['73015']=true,['73016']=true,['73017']=true,['73018']=true,['73019']=true,['73020']=true,['73021']=true,['73022']=true,['73023']=true,['73024']=true,['73025']=true,['73026']=true,['73027']=true,['73042']=true,['73060']=true,['73061']=true,['73062']=true,['73063']=true,['73064']=true,['73065']=true,['73066']=true,['73067']=true,['73068']=true,['73101']=true,['73102']=true,['73103']=true,['73104']=true,['73105']=true,['73106']=true,['73107']=true,['73108']=true,['73109']=true,['73110']=true,['73111']=true,['73112']=true,['73113']=true,['73114']=true,['73115']=true,['73116']=true,['73117']=true,['73118']=true,['73119']=true,['73120']=true,['73121']=true,['73122']=true,['73123']=true,['73124']=true,['73125']=true,['73126']=true,['73127']=true,['73128']=true,['73129']=true,['73130']=true,['73131']=true,['73132']=true,['73133']=true,['73134']=true,['73135']=true,['73136']=true,['73137']=true,['73138']=true,['73139']=true,['73140']=true,['73141']=true,['73142']=true,['73143']=true,['73144']=true,['73145']=true,['73146']=true,['73147']=true,['73148']=true,['73149']=true,['73150']=true,['73151']=true,['73152']=true,['73153']=true,['73154']=true,['73155']=true,['73156']=true,['73157']=true,['73158']=true,['73159']=true,['73160']=true,['73161']=true,['73162']=true,['73163']=true,['73164']=true,['73165']=true,['73166']=true,['73167']=true,['73168']=true,['73169']=true,['73170']=true,['73306']=true,['73307']=true,['73308']=true,['73309']=true,['73310']=true,['73311']=true,['73312']=true,['73313']=true,['73314']=true,['73315']=true,['73316']=true,['73317']=true,['73318']=true,['73319']=true,['73320']=true,['73321']=true,['73322']=true,['73323']=true,['73324']=true,['88632']=true,['88633']=true,['88634']=true,['88635']=true,['88636']=true,['88637']=true,['88638']=true,['88639']=true,['88640']=true,['88641']=true,['88642']=true,['88643']=true,['88644']=true,['88645']=true,['88646']=true,['88647']=true,['88667']=true,['44073']=true,['44074']=true,['44283']=true,['44167']=true,['44188']=true,['44216']=true,['44242']=true,['38452']=true,['38453']=true,['38458']=true,['38459']=true,['38462']=true,['38463']=true,['29297']=true,['29301']=true,['29305']=true,['29309']=true,['29296']=true,['29308']=true,['32485']=true,['32486']=true,['32487']=true,['32488']=true,['32489']=true,['32490']=true,['32491']=true,['32492']=true,['32493']=true,['32649']=true,['32757']=true,['29295']=true,['29299']=true,['29303']=true,['29306']=true,['29300']=true,['29304']=true,['29279']=true,['29283']=true,['29287']=true,['29290']=true,['29294']=true,['29298']=true,['29302']=true,['29307']=true,['29278']=true,['29282']=true,['29286']=true,['29291']=true,['98146']=true,['98147']=true,['98148']=true,['98149']=true,['98150']=true,['98335']=true,['92782']=true,['92783']=true,['92784']=true,['92785']=true,['92786']=true,['92787']=true,['93391']=true,['93392']=true,['93393']=true,['93394']=true,['93395']=true,['95425']=true,['95427']=true,['95428']=true,['95429']=true,['95430']=true,['88166']=true,['88167']=true,['88168']=true,['88169']=true,['75274']=true,['83230']=true,['83231']=true,['83232']=true,['83233']=true,['83234']=true,['83235']=true,['83236']=true,['83237']=true,['83238']=true,['83239']=true,['83245']=true,['83246']=true,['83247']=true,['83248']=true,['83249']=true,['83255']=true,['83256']=true,['83257']=true,['83258']=true,['83259']=true,['83272']=true,['83273']=true,['86567']=true,['86570']=true,['86572']=true,['86576']=true,['86579']=true,['86585']=true,['86587']=true,['87780']=true,['82686']=true,['82687']=true,['82688']=true,['82689']=true,['82690']=true,['82691']=true,['82692']=true,['82693']=true,['82694']=true,['82695']=true,['82696']=true,['82697']=true,['82698']=true,['82699']=true,['82700']=true,['82701']=true,['82702']=true,['82703']=true,['82704']=true,['82705']=true,['82718']=true,['82719']=true,['81651']=true,['81652']=true,['81653']=true,['81654']=true,['81655']=true,['81656']=true,['81657']=true,['81658']=true,['81659']=true,['81660']=true,['81661']=true,['81662']=true,['81663']=true,['81664']=true,['81665']=true,['81666']=true,['81667']=true,['81668']=true,['81669']=true,['81670']=true,['81683']=true,['81684']=true,['70105']=true,['70106']=true,['70107']=true,['70110']=true,['70112']=true,['70113']=true,['70119']=true,['70124']=true,['70126']=true,['70127']=true,['70141']=true,['70142']=true,['70143']=true,['70144']=true,['58483']=true,['62362']=true,['62383']=true,['62416']=true,['62434']=true,['62447']=true,['62463']=true,['62464']=true,['62465']=true,['62466']=true,['62467']=true,['64645']=true,['64904']=true,['68775']=true,['68776']=true,['68777']=true,['69764']=true,['62348']=true,['62350']=true,['62351']=true,['62352']=true,['62357']=true,['62361']=true,['62378']=true,['62415']=true,['62427']=true,['62440']=true,['62354']=true,['62375']=true,['62376']=true,['62377']=true,['62436']=true,['62437']=true,['65175']=true,['65176']=true,['50398']=true,['50400']=true,['50402']=true,['50404']=true,['52572']=true,['50397']=true,['50399']=true,['50401']=true,['50403']=true,['52571']=true} - } - - local function IsThisBreakable(link) - local _, _, quality = GetItemInfo(link) - if(IsEquippableItem(link) and quality and quality > 1 and quality < 5) then - return not BreakableFilter["SafeItems"][match(link, 'item:(%d+):')] - end - end - - local function IsThisOpenable(link) - return BreakableFilter["Pickables"][match(link, 'item:(%d+)')] - end - - local function ScanTooltip(self) - for index = 1, self:NumLines() do - local info = BreakStuff_Cache[_G['GameTooltipTextLeft' .. index]:GetText()] - if(info) then - return unpack(info) - end - end - end - - local function CloneTooltip() - twipe(BreakStuffHandler.TipLines) - for index = 1, GameTooltip:NumLines() do - local text = _G['GameTooltipTextLeft' .. index]:GetText() - if(text) then - BreakStuffHandler.TipLines[#BreakStuffHandler.TipLines+1] = text - end - end - end - - local function DoIHaveAKey() - for key in pairs(SkellyKeys) do - if(GetItemCount(key) > 0) then - return key - end - end - end - - local function ApplyButton(itemLink, spell, r, g, b) - local slot = GetMouseFocus() - local bag = slot:GetParent():GetID() - - if(GetContainerItemLink(bag, slot:GetID()) == itemLink) then - --CloneTooltip() - BreakStuffHandler:SetAttribute('spell', spell) - BreakStuffHandler:SetAttribute('target-bag', bag) - BreakStuffHandler:SetAttribute('target-slot', slot:GetID()) - BreakStuffHandler:SetAllPoints(slot) - BreakStuffHandler:Show() - - AutoCastShine_AutoCastStart(BreakStuffHandler, r, g, b) - end - end - - function BreakStuffParser(self) - local item, link = self:GetItem() - if(item and not InCombatLockdown() and (BreakStuffHandler.ReadyToSmash == true)) then - local spell, r, g, b = ScanTooltip(self) - local rr, gg, bb = 1, 1, 1 - if(spell) then - ApplyButton(link, spell, r, g, b) - else - spell = "Open" - if(DE and IsThisBreakable(link)) then - rr, gg, bb = 0.5, 0.5, 1 - ApplyButton(link, DE, rr, gg, bb) - elseif(PICK and IsThisOpenable(link)) then - rr, gg, bb = 0, 1, 1 - ApplyButton(link, PICK, rr, gg, bb) - elseif(SMITH and IsThisOpenable(link)) then - rr, gg, bb = 0, 1, 1 - local hasKey = DoIHaveAKey() - ApplyButton(link, hasKey, rr, gg, bb) - end - end - BreakStuffHandler.TTextLeft = spell - BreakStuffHandler.TTextRight = item - end - end -end ---[[ -########################################################## -BUILD FOR PACKAGE -########################################################## -]]-- -local BreakStuff_OnModifier = function(self, arg) - if(not self:IsShown() and not arg and (self.ReadyToSmash == false)) then return; end - if(InCombatLockdown()) then - self:SetAlpha(0) - self:RegisterEvent('PLAYER_REGEN_ENABLED') - else - self:ClearAllPoints() - self:SetAlpha(1) - self:Hide() - AutoCastShine_AutoCastStop(self) - end -end - -BreakStuffHandler.MODIFIER_STATE_CHANGED = BreakStuff_OnModifier; - -local BreakStuff_OnHide = function() - BreakStuffHandler.ReadyToSmash = false - BreakStuffButton.ttText = "BreakStuff : OFF"; -end - -local BreakStuff_OnEnter = function(self) - GameTooltip:SetOwner(self,"ANCHOR_TOP",0,4) - GameTooltip:ClearLines() - GameTooltip:AddLine(self.ttText) - GameTooltip:AddLine(self.subText) - if self.ttText2 then - GameTooltip:AddLine(' ') - GameTooltip:AddDoubleLine(self.ttText2,self.ttText2desc,1,1,1) - end - if BreakStuffHandler.ReadyToSmash ~= true then - self:SetPanelColor("class") - self.icon:SetGradient(unpack(SV.Media.gradient.highlight)) - end - GameTooltip:Show() -end - -local BreakStuff_OnLeave = function(self) - if BreakStuffHandler.ReadyToSmash ~= true then - self:SetPanelColor("default") - self.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) - GameTooltip:Hide() - end -end - -local BreakStuff_OnClick = function(self) - if InCombatLockdown() then print(ERR_NOT_IN_COMBAT) return end - if BreakStuffHandler.ReadyToSmash == true then - BreakStuffHandler:MODIFIER_STATE_CHANGED() - BreakStuffHandler.ReadyToSmash = false - self.ttText = "BreakStuff : OFF"; - self:SetPanelColor("default") - self.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) - else - BreakStuffHandler.ReadyToSmash = true - self.ttText = "BreakStuff : ON"; - self:SetPanelColor("green") - self.icon:SetGradient(unpack(SV.Media.gradient.green)) - if(not MOD.BagFrame:IsShown()) then - GameTooltip:Hide() - MOD.BagFrame:Show() - MOD.BagFrame:RefreshBags() - TTIP.GameTooltip_SetDefaultAnchor(GameTooltip,self) - end - end - GameTooltip:ClearLines() - GameTooltip:AddLine(self.ttText) - GameTooltip:AddLine(self.subText) -end - -function BreakStuffHandler:PLAYER_REGEN_ENABLED() - self:UnregisterEvent('PLAYER_REGEN_ENABLED') - BreakStuff_OnModifier(self) -end - -function MOD:PLAYER_REGEN_ENABLED() - self:UnregisterEvent('PLAYER_REGEN_ENABLED') - self:BreakStuffLoader() -end - -local SetClonedTip = function(self) - GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) - GameTooltip:ClearLines() - GameTooltip:AddDoubleLine(self.TTextLeft, self.TTextRight, 0,1,0,1,1,1) - -- for index = 1, #self.TipLines do - -- GameTooltip:AddLine(self.TipLines[index]) - -- end - - GameTooltip:Show() -end - -function MOD:BreakStuffLoader() - if(InCombatLockdown()) then MOD:RegisterEvent("PLAYER_REGEN_ENABLED"); return end - local allowed, spellListing, spellName, _ = false, {}; - - if(IsSpellKnown(51005)) then - --print("Milling") - allowed = true - spellName,_ = GetSpellInfo(51005) - BreakStuff_Cache[ITEM_MILLABLE] = {spellName, 0.5, 1, 0.5} - tinsert(spellListing, spellName) - end - - if(IsSpellKnown(31252)) then - --print("Prospecting") - allowed = true - spellName,_ = GetSpellInfo(31252) - BreakStuff_Cache[ITEM_PROSPECTABLE] = {spellName, 1, 0.33, 0.33} - tinsert(spellListing, spellName) - end - - if(IsSpellKnown(13262)) then - --print("Enchanting") - allowed = true - DE,_ = GetSpellInfo(13262) - tinsert(spellListing, DE) - end - - if(IsSpellKnown(1804)) then - --print("Lockpicking") - allowed = true - PICK,_ = GetSpellInfo(1804) - tinsert(spellListing, PICK) - end - - if(IsSpellKnown(2018)) then - --print("Blacksmithing") - allowed = true - SMITH,_ = GetSpellBookItemInfo((GetSpellInfo(2018))) - tinsert(spellListing, SMITH) - end - - if not allowed then return end - - BreakStuffButton:SetParent(SV.Dock.BottomRight.Bar.ToolBar) - local size = SV.Dock.BottomRight.Bar.ToolBar:GetHeight() - BreakStuffButton:Size(size, size) - BreakStuffButton:Point("RIGHT", SV.Dock.BottomRight.Bar.ToolBar, "LEFT", -6, 0) - BreakStuffButton:Show(); - BreakStuffButton:SetFramedButtonTemplate() - BreakStuffButton.icon=BreakStuffButton:CreateTexture(nil,"OVERLAY") - BreakStuffButton.icon:FillInner(BreakStuffButton,2,2) - BreakStuffButton.icon:SetTexture(ICONARTFILE) - BreakStuffButton.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) - BreakStuffButton.ttText = "BreakStuff : OFF"; - BreakStuffButton.subText = ""; - BreakStuffButton:SetScript("OnEnter", BreakStuff_OnEnter); - BreakStuffButton:SetScript("OnLeave", BreakStuff_OnLeave); - BreakStuffButton:SetScript("OnClick", BreakStuff_OnClick); - BreakStuffButton:SetScript("OnHide", BreakStuff_OnHide) - BreakStuffButton.subText = tcat(spellListing,"\n"); - - BreakStuffHandler:RegisterForClicks('AnyUp') - BreakStuffHandler:SetFrameStrata("TOOLTIP") - BreakStuffHandler:SetAttribute("type1","spell") - BreakStuffHandler:SetScript("OnEnter", SetClonedTip) - BreakStuffHandler:SetScript("OnLeave", BreakStuff_OnModifier) - BreakStuffHandler:RegisterEvent("MODIFIER_STATE_CHANGED") - BreakStuffHandler:Hide() - - GameTooltip:HookScript('OnTooltipSetItem', BreakStuffParser) - - for _, sparks in pairs(BreakStuffHandler.sparkles) do - sparks:SetHeight(sparks:GetHeight() * 3) - sparks:SetWidth(sparks:GetWidth() * 3) - end -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua b/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua deleted file mode 100644 index 33d60e0..0000000 --- a/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua +++ /dev/null @@ -1,882 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -credit: Kemayo. original logic from BankStack. Adapted to SVUI # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local assert = _G.assert; -local type = _G.type; -local error = _G.error; -local pcall = _G.pcall; -local print = _G.print; -local ipairs = _G.ipairs; -local pairs = _G.pairs; -local next = _G.next; -local rawset = _G.rawset; -local rawget = _G.rawget; -local tostring = _G.tostring; -local tonumber = _G.tonumber; -local tinsert = _G.tinsert; -local string = _G.string; -local math = _G.math; -local bit = _G.bit; -local table = _G.table; ---[[ STRING METHODS ]]-- -local gmatch, gsub, match, split = string.gmatch, string.gsub, string.match, string.split; ---[[ MATH METHODS ]]-- -local floor = math.floor; ---[[ BINARY METHODS ]]-- -local band = bit.band; ---[[ TABLE METHODS ]]-- -local tremove, tcopy, twipe, tsort = table.remove, table.copy, table.wipe, table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = select(2, ...) -local L = SV.L; -local MOD = SV.SVBag; ---[[ -########################################################## -LOCAL VARS -########################################################## -]]-- -local WAIT_TIME = 0.05 -local bagGroups = {}; -local initialOrder = {}; -local bagSorted = {}; -local bagLocked = {}; -local targetItems = {}; -local sourceUsed = {}; -local targetSlots = {}; -local specialtyBags = {}; -local emptySlots = {}; -local moveRetries = 0; -local moveTracker = {}; -local blackListedSlots = {}; -local blackList = {}; -local lastItemID, lockStop, lastDestination, lastMove, itemTypes, itemSubTypes; -local IterateBagsForSorting; -local RefEquipmentSlots = { - INVTYPE_AMMO = 0, - INVTYPE_HEAD = 1, - INVTYPE_NECK = 2, - INVTYPE_SHOULDER = 3, - INVTYPE_BODY = 4, - INVTYPE_CHEST = 5, - INVTYPE_ROBE = 5, - INVTYPE_WAIST = 6, - INVTYPE_LEGS = 7, - INVTYPE_FEET = 8, - INVTYPE_WRIST = 9, - INVTYPE_HAND = 10, - INVTYPE_FINGER = 11, - INVTYPE_TRINKET = 12, - INVTYPE_CLOAK = 13, - INVTYPE_WEAPON = 14, - INVTYPE_SHIELD = 15, - INVTYPE_2HWEAPON = 16, - INVTYPE_WEAPONMAINHAND = 18, - INVTYPE_WEAPONOFFHAND = 19, - INVTYPE_HOLDABLE = 20, - INVTYPE_RANGED = 21, - INVTYPE_THROWN = 22, - INVTYPE_RANGEDRIGHT = 23, - INVTYPE_RELIC = 24, - INVTYPE_TABARD = 25 -} - -local sortingCache = { - [1] = {}, --BAG - [2] = {}, --ID - [3] = {}, --PETID - [4] = {}, --STACK - [5] = {}, --MAXSTACK - [6] = {}, --MOVES -} - -local scanningCache = { - ["all"] = {}, - ["bags"] = {}, - ["bank"] = {BANK_CONTAINER}, - ["reagent"] = {REAGENTBANK_CONTAINER}, - ["guild"] = {51,52,53,54,55,56,57,58}, -} - -for i = NUM_BAG_SLOTS + 1, (NUM_BAG_SLOTS + NUM_BANKBAGSLOTS), 1 do - tinsert(scanningCache.bank, i) -end -for i = 0, NUM_BAG_SLOTS do - tinsert(scanningCache.bags, i) -end -for _,i in ipairs(scanningCache.bags) do - tinsert(scanningCache.all, i) -end -for _,i in ipairs(scanningCache.bank) do - tinsert(scanningCache.all, i) -end -for _,i in ipairs(scanningCache.reagent) do - tinsert(scanningCache.all, i) -end -for _,i in ipairs(scanningCache.guild) do - tinsert(scanningCache.all, i) -end ---[[ -########################################################## -SORTING UPDATES HANDLER -########################################################## -]]-- -local SortUpdateTimer = CreateFrame("Frame") -SortUpdateTimer.timeLapse = 0 -SortUpdateTimer:Hide() ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local function ValidateBag(bagid) - return (bagid == BANK_CONTAINER or ((bagid >= 0) and bagid <= (NUM_BAG_SLOTS + NUM_BANKBAGSLOTS))) -end -local function ValidateBank(bagid) - return (bagid == BANK_CONTAINER or bagid == REAGENTBANK_CONTAINER or (bagid > NUM_BAG_SLOTS and bagid <= NUM_BANKBAGSLOTS)) -end -local function ValidateGuildBank(bagid) - return (bagid > 50 and bagid <= 58) -end -local function BagEncoder(bag, slot) return (bag * 100) + slot end -local function BagDecoder(int) return math.floor(int / 100), int % 100 end -local function MoveEncoder(source, target) return (source * 10000) + target end -local function MoveDecoder(move) - local s = math.floor(move / 10000) - local t = move % 10000 - s = (t > 9000) and (s + 1) or s - t = (t > 9000) and (t - 10000) or t - return s, t -end ---[[ -########################################################## -LOCAL FUNCTIONS -########################################################## -]]-- -local function SetBlockedCache(...) - twipe(blackList) - for index = 1, select('#', ...) do - local name = select(index, ...) - local isLink = GetItemInfo(name) - if isLink then - blackList[isLink] = true - end - end -end - -local function BuildSortOrder() - itemTypes = {} - itemSubTypes = {} - for i, iType in ipairs({GetAuctionItemClasses()}) do - itemTypes[iType] = i - itemSubTypes[iType] = {} - for ii, isType in ipairs({GetAuctionItemSubClasses(i)}) do - itemSubTypes[iType][isType] = ii - end - end -end - -local function UpdateLocation(from, to) - if (sortingCache[2][from] == sortingCache[2][to]) and (sortingCache[4][to] < sortingCache[5][to]) then - local stackSize = sortingCache[5][to] - if (sortingCache[4][to] + sortingCache[4][from]) > stackSize then - sortingCache[4][from] = sortingCache[4][from] - (stackSize - sortingCache[4][to]) - sortingCache[4][to] = stackSize - else - sortingCache[4][to] = sortingCache[4][to] + sortingCache[4][from] - sortingCache[4][from] = nil - sortingCache[2][from] = nil - sortingCache[5][from] = nil - end - else - sortingCache[2][from], sortingCache[2][to] = sortingCache[2][to], sortingCache[2][from] - sortingCache[4][from], sortingCache[4][to] = sortingCache[4][to], sortingCache[4][from] - sortingCache[5][from], sortingCache[5][to] = sortingCache[5][to], sortingCache[5][from] - end -end - -local function PrimarySort(a, b) - local aName, _, _, aLvl, _, _, _, _, _, _, aPrice = GetItemInfo(sortingCache[2][a]) - local bName, _, _, bLvl, _, _, _, _, _, _, bPrice = GetItemInfo(sortingCache[2][b]) - if aLvl ~= bLvl and aLvl and bLvl then - return aLvl > bLvl - end - if aPrice ~= bPrice and aPrice and bPrice then - return aPrice > bPrice - end - if aName and bName then - return aName < bName - end -end - -local function DefaultSort(b, a) - local aID = sortingCache[2][a] - local bID = sortingCache[2][b] - if (not aID) or (not bID) then return aID end - if sortingCache[3][a] and sortingCache[3][b] then - local aName, _, aType = C_PetJournal.GetPetInfoBySpeciesID(aID); - local bName, _, bType = C_PetJournal.GetPetInfoBySpeciesID(bID); - if aType and bType and aType ~= bType then - return aType > bType - end - if aName and bName and (type(aName) == type(bName)) and aName ~= bName then - return aName < bName - end - end - local aOrder, bOrder = initialOrder[a], initialOrder[b] - if aID == bID then - local aCount = sortingCache[4][a] - local bCount = sortingCache[4][b] - if aCount and bCount and aCount == bCount then - return aOrder < bOrder - elseif aCount and bCount then - return aCount < bCount - end - end - local _, _, aRarity, _, _, aType, aSubType, _, aEquipLoc = GetItemInfo(aID) - local _, _, bRarity, _, _, bType, bSubType, _, bEquipLoc = GetItemInfo(bID) - if sortingCache[3][a] then - aRarity = 1 - end - if sortingCache[3][b] then - bRarity = 1 - end - if aRarity ~= bRarity and aRarity and bRarity then - return aRarity > bRarity - end - if itemTypes[aType] ~= itemTypes[bType] then - return (itemTypes[aType] or 99) < (itemTypes[bType] or 99) - end - if aType == ARMOR or aType == ENCHSLOT_WEAPON then - local aEquipLoc = RefEquipmentSlots[aEquipLoc] or -1 - local bEquipLoc = RefEquipmentSlots[bEquipLoc] or -1 - if aEquipLoc == bEquipLoc then - return PrimarySort(a, b) - end - if aEquipLoc and bEquipLoc then - return aEquipLoc < bEquipLoc - end - end - if aSubType == bSubType then - return PrimarySort(a, b) - end - return ((itemSubTypes[aType] or {})[aSubType] or 99) < ((itemSubTypes[bType] or {})[bSubType] or 99) -end - -local function ReverseSort(a, b) - return DefaultSort(b, a) -end - -local function ConvertLinkToID(link) - if not link then return; end - if tonumber(match(link, "item:(%d+)")) then - return tonumber(match(link, "item:(%d+)")); - else - return tonumber(match(link, "battlepet:(%d+)")), true; - end -end - -local function GetSortingGroup(id) - if match(id, "^[-%d,]+$") then - local bags = {} - for b in gmatch(id, "-?%d+") do - tinsert(bags, tonumber(b)) - end - return bags - end - return scanningCache[id] -end - -local function GetSortingInfo(bag, slot) - if (ValidateGuildBank(bag)) then - return GetGuildBankItemInfo(bag - 50, slot) - else - return GetContainerItemInfo(bag, slot) - end -end - -local function GetSortingItemLink(bag, slot) - if (ValidateGuildBank(bag)) then - return GetGuildBankItemLink(bag - 50, slot) - else - return GetContainerItemLink(bag, slot) - end -end ---[[ -########################################################## -BAG ITERATION METHOD -########################################################## -]]-- -do - local bagRole; - - local function GetNumSortingSlots(bag, role) - if (ValidateGuildBank(bag)) then - if not role then role = "deposit" end - local name, icon, canView, canDeposit, numWithdrawals = GetGuildBankTabInfo(bag - 50) - if name and canView then - return 98 - end - else - return GetContainerNumSlots(bag) - end - return 0 - end - - local function IterateForwards(bagList, i) - i = i + 1 - local step = 1 - for _,bag in ipairs(bagList) do - local slots = GetNumSortingSlots(bag, bagRole) - if i > slots + step then - step = step + slots - else - for slot = 1, slots do - if step == i then - return i, bag, slot - end - step = step + 1 - end - end - end - bagRole = nil - end - - local function IterateBackwards(bagList, i) - i = i + 1 - local step = 1 - for ii = #bagList, 1, -1 do - local bag = bagList[ii] - local slots = GetNumSortingSlots(bag, bagRole) - if i > slots + step then - step = step + slots - else - for slot=slots, 1, -1 do - if step == i then - return i, bag, slot - end - step = step + 1 - end - end - end - bagRole = nil - end - - function IterateBagsForSorting(bagList, reverse, role) - bagRole = role - return (reverse and IterateBackwards or IterateForwards), bagList, 0 - end -end ---[[ -########################################################## -CORE FUNCTIONS -########################################################## -]]-- --- function MOD.Compress(...) --- for i=1, select("#", ...) do --- local bags = select(i, ...) --- MOD.Stack(bags, bags, MOD.IsPartial) --- end --- end - --- function MOD.Organizer(fnType, sourceBags, targetBags) --- if(fnType == 'stack') then --- MOD.Stack(sourceBags, targetBags, MOD.IsPartial) --- elseif(fnType == 'move') then --- MOD.Stack(sourceBags, targetBags, MOD.IsPartial) --- else --- MOD.Sort() --- end --- end ---[[ -########################################################## -EXTERNAL SORTING CALLS -########################################################## -]]-- -do - local function SetSortingPath(source, target) - UpdateLocation(source, target) - tinsert(sortingCache[6], 1, (MoveEncoder(source, target))) - end - - local function IsPartial(bag, slot) - local bagSlot = BagEncoder(bag, slot) - return ((sortingCache[5][bagSlot] or 0) - (sortingCache[4][bagSlot] or 0)) > 0 - end - - local function IsSpecialtyBag(bagID) - if(bagID == 0 or (ValidateBank(bagID)) or (ValidateGuildBank(bagID))) then return false end - local inventorySlot = ContainerIDToInventoryID(bagID) - if not inventorySlot then return false end - local bag = GetInventoryItemLink("player", inventorySlot) - if not bag then return false end - local family = GetItemFamily(bag) - if family == 0 or family == nil then return false end - return family - end - - local function CanItemGoInBag(bag, slot, targetBag) - if (ValidateGuildBank(targetBag)) then return true end - local item = sortingCache[2][(BagEncoder(bag, slot))] - local itemFamily = GetItemFamily(item) - if itemFamily and itemFamily > 0 then - local equipSlot = select(9, GetItemInfo(item)) - if equipSlot == "INVTYPE_BAG" then - itemFamily = 1 - end - end - local bagFamily = select(2, GetContainerNumFreeSlots(targetBag)) - if itemFamily then - return (bagFamily == 0) or band(itemFamily, bagFamily) > 0 - else - return false; - end - end - - local function ShouldMove(source, destination) - if((destination == source) or (not sortingCache[2][source])) then return; end - if((sortingCache[2][source] == sortingCache[2][destination]) and (sortingCache[4][source] == sortingCache[4][destination])) then return; end - return true - end - - local function UpdateSorted(source, destination) - for i, bs in pairs(bagSorted) do - if bs == source then - bagSorted[i] = destination - elseif bs == destination then - bagSorted[i] = source - end - end - end - - local function Sorter(bags, sorter, reverse) - if not sorter then sorter = reverse and ReverseSort or DefaultSort end - if not itemTypes then BuildSortOrder() end - twipe(blackListedSlots) - local ignoreItems = SV.db.SVBag.ignoreItems - ignoreItems = ignoreItems:gsub(',%s', ',') - SetBlockedCache(split(",", ignoreItems)) - for i, bag, slot in IterateBagsForSorting(bags, nil, 'both') do - local bagSlot = BagEncoder(bag, slot) - local link = GetSortingItemLink(bag, slot); - if link and blackList[GetItemInfo(link)] then - blackListedSlots[bagSlot] = true - end - if not blackListedSlots[bagSlot] then - initialOrder[bagSlot] = i - tinsert(bagSorted, bagSlot) - end - end - tsort(bagSorted, sorter) - local passNeeded = true - while passNeeded do - passNeeded = false - local i = 1 - for _, bag, slot in IterateBagsForSorting(bags, nil, 'both') do - local destination = BagEncoder(bag, slot) - local source = bagSorted[i] - if not blackListedSlots[destination] then - if(ShouldMove(source, destination)) then - if not (bagLocked[source] or bagLocked[destination]) then - SetSortingPath(source, destination) - UpdateSorted(source, destination) - bagLocked[source] = true - bagLocked[destination] = true - else - passNeeded = true - end - end - i = i + 1 - end - end - twipe(bagLocked) - end - twipe(bagSorted) - twipe(initialOrder) - end - - local function SortFiller(sourceBags, targetBags, reverse, canMove) - if not canMove then canMove = true end - for _, bag, slot in IterateBagsForSorting(targetBags, reverse, "deposit") do - local bagSlot = BagEncoder(bag, slot) - if not sortingCache[2][bagSlot] then - tinsert(emptySlots, bagSlot) - end - end - for _, bag, slot in IterateBagsForSorting(sourceBags, not reverse, "withdraw") do - if #emptySlots == 0 then break end - local bagSlot = BagEncoder(bag, slot) - local targetBag, targetSlot = BagDecoder(emptySlots[1]) - if sortingCache[2][bagSlot] and CanItemGoInBag(bag, slot, targetBag) and (canMove == true or canMove(sortingCache[2][bagSlot], bag, slot)) then - SetSortingPath(bagSlot, tremove(emptySlots, 1)) - end - end - twipe(emptySlots) - end - - function MOD.Sort(...) - for i=1, select("#", ...) do - local bags = select(i, ...) - for _, slotNum in ipairs(bags) do - local bagType = IsSpecialtyBag(slotNum) - if bagType == false then bagType = 'Normal' end - if not sortingCache[1][bagType] then sortingCache[1][bagType] = {} end - tinsert(sortingCache[1][bagType], slotNum) - end - for bagType, sortedBags in pairs(sortingCache[1]) do - if bagType ~= 'Normal' then - MOD.Stack(sortedBags, IsPartial) - SortFiller(sortingCache[1]['Normal'], sortedBags, SV.db.SVBag.sortInverted) - MOD.Stack(sortingCache[1]['Normal'], IsPartial) - Sorter(sortedBags, nil, SV.db.SVBag.sortInverted) - twipe(sortedBags) - end - end - if sortingCache[1]['Normal'] then - MOD.Stack(sortingCache[1]['Normal'], IsPartial) - Sorter(sortingCache[1]['Normal'], nil, SV.db.SVBag.sortInverted) - twipe(sortingCache[1]['Normal']) - end - twipe(sortingCache[1]) - twipe(bagGroups) - end - end - - function MOD.Transfer(sourceBags, targetBags, canMove) - if not canMove then canMove = true end - for _, bag, slot in IterateBagsForSorting(targetBags, nil, "deposit") do - local bagSlot = BagEncoder(bag, slot) - local itemID = sortingCache[2][bagSlot] - if itemID and (sortingCache[4][bagSlot] ~= sortingCache[5][bagSlot]) then - targetItems[itemID] = (targetItems[itemID] or 0) + 1 - tinsert(targetSlots, bagSlot) - end - end - - for _, bag, slot in IterateBagsForSorting(sourceBags, true, "withdraw") do - local sourceSlot = BagEncoder(bag, slot) - local itemID = sortingCache[2][sourceSlot] - if itemID and targetItems[itemID] and (canMove == true or canMove(itemID, bag, slot)) then - for i = #targetSlots, 1, -1 do - local targetedSlot = targetSlots[i] - if sortingCache[2][sourceSlot] and sortingCache[2][targetedSlot] == itemID and targetedSlot ~= sourceSlot and not (sortingCache[4][targetedSlot] == sortingCache[5][targetedSlot]) and not sourceUsed[targetedSlot] then - SetSortingPath(sourceSlot, targetedSlot) - sourceUsed[sourceSlot] = true - if sortingCache[4][targetedSlot] == sortingCache[5][targetedSlot] then - targetItems[itemID] = (targetItems[itemID] > 1) and (targetItems[itemID] - 1) or nil - end - if sortingCache[4][sourceSlot] == 0 then - targetItems[itemID] = (targetItems[itemID] > 1) and (targetItems[itemID] - 1) or nil - break - end - if not targetItems[itemID] then break end - end - end - end - end - twipe(targetItems) - twipe(targetSlots) - twipe(sourceUsed) - end - - function MOD.Stack(bags, canMove) - if not canMove then canMove = true end - for _, bag, slot in IterateBagsForSorting(bags, nil, "deposit") do - local bagSlot = BagEncoder(bag, slot) - local itemID = sortingCache[2][bagSlot] - if itemID and (sortingCache[4][bagSlot] ~= sortingCache[5][bagSlot]) then - targetItems[itemID] = (targetItems[itemID] or 0) + 1 - tinsert(targetSlots, bagSlot) - end - end - - for _, bag, slot in IterateBagsForSorting(bags, true, "withdraw") do - local sourceSlot = BagEncoder(bag, slot) - local itemID = sortingCache[2][sourceSlot] - if itemID and targetItems[itemID] and (canMove == true or (type(canMove) == "function" and canMove(itemID, bag, slot))) then - for i = #targetSlots, 1, -1 do - local targetedSlot = targetSlots[i] - if sortingCache[2][sourceSlot] and sortingCache[2][targetedSlot] == itemID and targetedSlot ~= sourceSlot and not (sortingCache[4][targetedSlot] == sortingCache[5][targetedSlot]) and not sourceUsed[targetedSlot] then - SetSortingPath(sourceSlot, targetedSlot) - sourceUsed[sourceSlot] = true - if sortingCache[4][targetedSlot] == sortingCache[5][targetedSlot] then - targetItems[itemID] = (targetItems[itemID] > 1) and (targetItems[itemID] - 1) or nil - end - if sortingCache[4][sourceSlot] == 0 then - targetItems[itemID] = (targetItems[itemID] > 1) and (targetItems[itemID] - 1) or nil - break - end - if not targetItems[itemID] then break end - end - end - end - end - twipe(targetItems) - twipe(targetSlots) - twipe(sourceUsed) - end -end ---[[ -########################################################## -INTERNAL SORTING CALLS -########################################################## -]]-- -do - local function GetSortingItemID(bag, slot) - if (ValidateGuildBank(bag)) then - local link = GetSortingItemLink(bag, slot) - return link and tonumber(string.match(link, "item:(%d+)")) - else - return GetContainerItemID(bag, slot) - end - end - - function SortUpdateTimer:StopStacking(message) - twipe(sortingCache[6]) - twipe(moveTracker) - moveRetries, lastItemID, lockStop, lastDestination, lastMove = 0, nil, nil, nil, nil - self:SetScript("OnUpdate", nil) - self:Hide() - if(message and CombatText_AddMessage) then - CombatText_AddMessage(message, CombatText_StandardScroll, 1, 0.35, 0) - end - end - - function SortUpdateTimer:MoveItem(move) - if GetCursorInfo() == "item" then - return false, 'cursorhasitem' - end - local source, target = MoveDecoder(move) - local sourceBag, sourceSlot = BagDecoder(source) - local targetBag, targetSlot = BagDecoder(target) - local _, sourceCount, sourceLocked = GetSortingInfo(sourceBag, sourceSlot) - local _, targetCount, targetLocked = GetSortingInfo(targetBag, targetSlot) - if sourceLocked or targetLocked then - return false, 'source/target_locked' - end - local sourceLink = GetSortingItemLink(sourceBag, sourceSlot) - local sourceItemID = GetSortingItemID(sourceBag, sourceSlot) - local targetItemID = GetSortingItemID(targetBag, targetSlot) - - if not sourceItemID then - if moveTracker[source] then - return false, 'move incomplete' - else - return self:StopStacking(L['Confused.. Try Again!']) - end - end - - local stackSize = select(8, GetItemInfo(sourceItemID)) - - local sourceGuild = ValidateGuildBank(sourceBag) - local targetGuild = ValidateGuildBank(targetBag) - - if (sourceItemID == targetItemID) and (targetCount ~= stackSize) and ((targetCount + sourceCount) > stackSize) then - local amount = (stackSize - targetCount) - if (sourceGuild) then - SplitGuildBankItem(sourceBag - 50, sourceSlot, amount) - else - SplitContainerItem(sourceBag, sourceSlot, amount) - end - else - if (sourceGuild) then - PickupGuildBankItem(sourceBag - 50, sourceSlot) - else - PickupContainerItem(sourceBag, sourceSlot) - end - end - - if GetCursorInfo() == "item" then - if (targetGuild) then - PickupGuildBankItem(targetBag - 50, targetSlot) - else - PickupContainerItem(targetBag, targetSlot) - end - end - - if sourceGuild then - QueryGuildBankTab(sourceBag - 50) - end - if targetGuild then - QueryGuildBankTab(targetBag - 50) - end - return true, sourceItemID, source, targetItemID, target, sourceGuild or targetGuild - end - - local SortUpdateTimer_OnUpdate = function(self, elapsed) - self.timeLapse = self.timeLapse + (elapsed or 0.01) - if(self.timeLapse > 0.05) then - self.timeLapse = 0 - if InCombatLockdown() then - return self:StopStacking(L["Can't Clean Bags in Combat!"]) - end - local cursorType, cursorItemID = GetCursorInfo() - if cursorType == "item" and cursorItemID then - if lastItemID ~= cursorItemID then - return self:StopStacking(L["Bag Cleaning Error, Try Again"]) - end - if moveRetries < 100 then - local targetBag, targetSlot = BagDecoder(lastDestination) - local _, _, targetLocked = GetSortingInfo(targetBag, targetSlot) - if not targetLocked then - if(ValidateGuildBank(targetBag)) then - PickupGuildBankItem(targetBag - 50, targetSlot) - else - PickupContainerItem(targetBag, targetSlot) - end - WAIT_TIME = 0.1 - lockStop = GetTime() - moveRetries = moveRetries + 1 - return - end - end - end - if lockStop then - local i = 1; - for slot, itemID in pairs(moveTracker) do - local sourceBag, sourceSlot = BagDecoder(slot) - local actualItemID = GetSortingItemID(sourceBag, sourceSlot) - if actualItemID ~= itemID then - WAIT_TIME = 0.1 - if (GetTime() - lockStop) > 1.25 then - if lastMove and moveRetries < 100 then - local success, moveID, moveSource, targetID, moveTarget, wasGuild = self:MoveItem(lastMove) - WAIT_TIME = wasGuild and 0.5 or 0.1 - if not success then - lockStop = GetTime() - moveRetries = moveRetries + 1 - return - end - moveTracker[moveSource] = targetID - moveTracker[moveTarget] = moveID - lastDestination = moveTarget - lastMove = sortingCache[6][i] - lastItemID = moveID - tremove(sortingCache[6], i) - return - end - self:StopStacking() - return - end - return - end - moveTracker[slot] = nil - i = i + 1; - end - end - lastItemID, lockStop, lastDestination, lastMove = nil, nil, nil, nil - twipe(moveTracker) - local start, success, moveID, targetID, moveSource, moveTarget, wasGuild - start = GetTime() - if #sortingCache[6] > 0 then - for i = #sortingCache[6], 1, -1 do - success, moveID, moveSource, targetID, moveTarget, wasGuild = self:MoveItem(sortingCache[6][i]) - if not success then - WAIT_TIME = wasGuild and 0.3 or 0.1 - lockStop = GetTime() - return - end - moveTracker[moveSource] = targetID - moveTracker[moveTarget] = moveID - lastDestination = moveTarget - lastMove = sortingCache[6][i] - lastItemID = moveID - tremove(sortingCache[6], i) - if sortingCache[6][i-1] then - WAIT_TIME = wasGuild and 0.3 or 0; - return - end - end - end - self:StopStacking() - end - end - - function SortUpdateTimer:StartStacking() - twipe(sortingCache[5]) - twipe(sortingCache[4]) - twipe(sortingCache[2]) - twipe(moveTracker) - if #sortingCache[6] > 0 then - self:Show() - self:SetScript("OnUpdate", SortUpdateTimer_OnUpdate) - else - self:StopStacking() - end - end -end - -function MOD:RunSortingProcess(func, groupsDefaults, altFunc) - local bagGroups = {} - return function(groups) - if(altFunc and IsShiftKeyDown()) then - altFunc() - else - if SortUpdateTimer:IsShown() then - SortUpdateTimer:StopStacking(L['Already Running.. Bailing Out!']) - return; - end - twipe(bagGroups) - if not groups or #groups == 0 then - groups = groupsDefaults - end - for bags in (groups or ""):gmatch("[^%s]+") do - if bags == "guild" then - bags = GetSortingGroup(bags) - if bags then - tinsert(bagGroups, {bags[GetCurrentGuildBankTab()]}) - end - else - bags = GetSortingGroup(bags) - if bags then - tinsert(bagGroups, bags) - end - end - end - for _, bag, slot in IterateBagsForSorting(scanningCache.all) do - local bagSlot = BagEncoder(bag, slot) - local itemID, isBattlePet = ConvertLinkToID(GetSortingItemLink(bag, slot)) - if itemID then - if isBattlePet then - sortingCache[3][bagSlot] = itemID - sortingCache[5][bagSlot] = 1 - else - sortingCache[5][bagSlot] = select(8, GetItemInfo(itemID)) - end - sortingCache[2][bagSlot] = itemID - sortingCache[4][bagSlot] = select(2, GetSortingInfo(bag, slot)) - end - end - if func(unpack(bagGroups)) == false then - return - end - twipe(bagGroups) - SortUpdateTimer:StartStacking() - end - collectgarbage("collect") - end -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.lua b/Interface/AddOns/SVUI/packages/override/SVOverride.lua index 8b6e390..0263be0 100644 --- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua @@ -48,65 +48,26 @@ local SV = select(2, ...) local L = SV.L local LSM = LibStub("LibSharedMedia-3.0") local MOD = SV:NewPackage("SVOverride", "Overrides"); -MOD.LewtRollz = {}; - -local MyName = UnitName("player"); +MOD.RollFrames = {}; --[[ ########################################################## LOCAL VARS ########################################################## ]]-- -local UIErrorsFrame = UIErrorsFrame; -local interruptMsg = INTERRUPTED.." %s's \124cff71d5ff\124Hspell:%d\124h[%s]\124h\124r!"; -local POSITION, ANCHOR_POINT, YOFFSET = "TOP", "BOTTOM", -10 -local FORCE_POSITION = false; local NewHook = hooksecurefunc; -local mirrorYOffset={ - ["BREATH"] = 96, - ["EXHAUSTION"] = 119, - ["FEIGNDEATH"] = 142 -} -local mirrorTypeColor={ - EXHAUSTION = {1,.9,0}, - BREATH = {0.31,0.45,0.63}, - DEATH = {1,.7,0}, - FEIGNDEATH = {1,.7,0} -} -local RegisteredMirrorBars = {} -local lastQuality,lastID,lastName; -local dead_rollz = {} -local RollTypePresets = { - [0] = { - "Interface\\Buttons\\UI-GroupLoot-Pass-Up", - "", - "Interface\\Buttons\\UI-GroupLoot-Pass-Down", - [[0]], - [[2]] - }, - [1] = { - "Interface\\Buttons\\UI-GroupLoot-Dice-Up", - "Interface\\Buttons\\UI-GroupLoot-Dice-Highlight", - "Interface\\Buttons\\UI-GroupLoot-Dice-Down", - [[5]], - [[-1]] - }, - [2] = { - "Interface\\Buttons\\UI-GroupLoot-Coin-Up", - "Interface\\Buttons\\UI-GroupLoot-Coin-Highlight", - "Interface\\Buttons\\UI-GroupLoot-Coin-Down", - [[0]], - [[-1]] - }, - [3] = { - "Interface\\Buttons\\UI-GroupLoot-DE-Up", - "Interface\\Buttons\\UI-GroupLoot-DE-Highlight", - "Interface\\Buttons\\UI-GroupLoot-DE-Down", - [[0]], - [[-1]] - } -}; -local LootRollType = {[1] = "need", [2] = "greed", [3] = "disenchant", [0] = "pass"}; -local LOOT_WIDTH, LOOT_HEIGHT = 328, 28 +local BAILOUT_ICON = [[Interface\AddOns\SVUI\assets\artwork\Icons\EXIT]]; + +local SVUI_WorldStateHolder = CreateFrame("Frame", "SVUI_WorldStateHolder", UIParent) +SVUI_WorldStateHolder:SetPoint("TOP", SVUI_DockTopCenter, "BOTTOM", 0, -10) +SVUI_WorldStateHolder:SetSize(200, 45) + +local SVUI_AltPowerBar = CreateFrame("Frame", "SVUI_AltPowerBar", UIParent) +SVUI_AltPowerBar:SetPoint("TOP", SVUI_DockTopCenter, "BOTTOM", 0, -60) +SVUI_AltPowerBar:SetSize(128, 50) + +local SVUI_BailOut = CreateFrame("Button", "SVUI_BailOut", UIParent) +SVUI_BailOut:SetSize(30, 30) +SVUI_BailOut:SetPoint("TOP", SVUI_DockTopCenter, "BOTTOM", 0, -10) --[[ ########################################################## CORE FUNCTIONS @@ -114,40 +75,28 @@ CORE FUNCTIONS ]]-- local PVPRaidNoticeHandler = function(self, event, msg) local _, instanceType = IsInInstance() - if instanceType == 'pvp' or instanceType == 'arena' then + if((instanceType == 'pvp') or (instanceType == 'arena')) then RaidNotice_AddMessage(RaidBossEmoteFrame, msg, ChatTypeInfo["RAID_BOSS_EMOTE"]); end end local CaptureBarHandler = function() - if NUM_EXTENDED_UI_FRAMES then - local captureBar + if(NUM_EXTENDED_UI_FRAMES) then + local lastFrame = SVUI_WorldStateHolder + local offset = 0; for i=1, NUM_EXTENDED_UI_FRAMES do - captureBar = _G["WorldStateCaptureBar" .. i] - - if captureBar and captureBar:IsVisible() then + local captureBar = _G["WorldStateCaptureBar"..i] + if(captureBar and captureBar:IsVisible()) then captureBar:ClearAllPoints() - - if( i == 1 ) then - captureBar:Point("TOP", SVUI_WorldStateHolder, "TOP", 0, 0) - else - captureBar:Point("TOPLEFT", _G["WorldStateCaptureBar" .. i - 1], "TOPLEFT", 0, -45) - end + captureBar:Point("TOP", lastFrame, "TOP", 0, offset) + lastFrame = captureBar + offset = (-45 * i); end end end end -local ErrorFrameHandler = function(self, event) - if not SV.db.general.hideErrorFrame then return end - if event == 'PLAYER_REGEN_DISABLED' then - UIErrorsFrame:UnregisterEvent('UI_ERROR_MESSAGE') - else - UIErrorsFrame:RegisterEvent('UI_ERROR_MESSAGE') - end -end - -local Vehicle_OnSetPoint = function(self,_,parent) +local Vehicle_OnSetPoint = function(self, _, parent) if(parent == "MinimapCluster" or parent == _G["MinimapCluster"]) then VehicleSeatIndicator:ClearAllPoints() if _G.VehicleSeatIndicator_MOVE then @@ -160,852 +109,12 @@ local Vehicle_OnSetPoint = function(self,_,parent) end end -local Dura_OnSetPoint = function(_, _, anchor) - if anchor == "MinimapCluster"or anchor == _G["MinimapCluster"] then - DurabilityFrame:ClearAllPoints() - DurabilityFrame:Point("RIGHT", Minimap, "RIGHT") - DurabilityFrame:SetScale(0.6) - end -end - -function MOD:DisbandRaidGroup() - if InCombatLockdown() then return end -- Prevent user error in combat - - if UnitInRaid("player") then - for i = 1, GetNumGroupMembers() do - local name, _, _, _, _, _, _, online = GetRaidRosterInfo(i) - if online and name ~= MyName then - UninviteUnit(name) - end - end - else - for i = MAX_PARTY_MEMBERS, 1, -1 do - if UnitExists("party"..i) then - UninviteUnit(UnitName("party"..i)) - end - end - end - LeaveParty() -end ---[[ -########################################################## -ALERTS -########################################################## -]]-- -local _hook_AlertFrame_SetLootAnchors = function(self) - if MissingLootFrame:IsShown() then - MissingLootFrame:ClearAllPoints() - MissingLootFrame:SetPoint(POSITION, self, ANCHOR_POINT) - if GroupLootContainer:IsShown() then - GroupLootContainer:ClearAllPoints() - GroupLootContainer:SetPoint(POSITION, MissingLootFrame, ANCHOR_POINT, 0, YOFFSET) - end - elseif GroupLootContainer:IsShown() or FORCE_POSITION then - GroupLootContainer:ClearAllPoints() - GroupLootContainer:SetPoint(POSITION, self, ANCHOR_POINT) - end -end - -local _hook_AlertFrame_SetLootWonAnchors = function(self) - for i = 1, #LOOT_WON_ALERT_FRAMES do - local frame = LOOT_WON_ALERT_FRAMES[i] - if frame:IsShown() then - frame:ClearAllPoints() - frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) - self = frame - end - end -end - -local _hook_AlertFrame_SetMoneyWonAnchors = function(self) - for i = 1, #MONEY_WON_ALERT_FRAMES do - local frame = MONEY_WON_ALERT_FRAMES[i] - if frame:IsShown() then - frame:ClearAllPoints() - frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) - self = frame - end - end -end - -local _hook_AlertFrame_SetAchievementAnchors = function(self) - if AchievementAlertFrame1 then - for i = 1, MAX_ACHIEVEMENT_ALERTS do - local frame = _G["AchievementAlertFrame"..i] - if frame and frame:IsShown() then - frame:ClearAllPoints() - frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) - self = frame - end - end - end -end - -local _hook_AlertFrame_SetCriteriaAnchors = function(self) - if CriteriaAlertFrame1 then - for i = 1, MAX_ACHIEVEMENT_ALERTS do - local frame = _G["CriteriaAlertFrame"..i] - if frame and frame:IsShown() then - frame:ClearAllPoints() - frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) - self = frame - end - end - end -end - -local _hook_AlertFrame_SetChallengeModeAnchors = function(self) - local frame = ChallengeModeAlertFrame1; - if frame:IsShown() then - frame:ClearAllPoints() - frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) - end -end - -local _hook_AlertFrame_SetDungeonCompletionAnchors = function(self) - local frame = DungeonCompletionAlertFrame1; - if frame:IsShown() then - frame:ClearAllPoints() - frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) - end -end - -local _hook_AlertFrame_SetStorePurchaseAnchors = function(self) - local frame = StorePurchaseAlertFrame; - if frame:IsShown() then - frame:ClearAllPoints() - frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) - end -end - -local _hook_AlertFrame_SetScenarioAnchors = function(self) - local frame = ScenarioAlertFrame1; - if frame:IsShown() then - frame:ClearAllPoints() - frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) - end -end - -local _hook_AlertFrame_SetGuildChallengeAnchors = function(self) - local frame = GuildChallengeAlertFrame; - if frame:IsShown() then - frame:ClearAllPoints() - frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) - end -end - -local afrm = CreateFrame("Frame", "SVUI_AlertFrame", UIParent); -afrm:SetWidth(180); -afrm:SetHeight(20); - -local AlertFramePostMove_Hook = function(forced) - local b, c = SVUI_AlertFrame_MOVE:GetCenter() - local d = SV.Screen:GetTop() - if(c > (d / 2)) then - POSITION = "TOP" - ANCHOR_POINT = "BOTTOM" - YOFFSET = -10; - SVUI_AlertFrame_MOVE:SetText(SVUI_AlertFrame_MOVE.textString.." (Grow Down)") - else - POSITION = "BOTTOM" - ANCHOR_POINT = "TOP" - YOFFSET = 10; - SVUI_AlertFrame_MOVE:SetText(SVUI_AlertFrame_MOVE.textString.." (Grow Up)") - end - if SV.db.SVOverride.lootRoll then - local f, g; - for h, i in pairs(MOD.LewtRollz) do - i:ClearAllPoints() - if h ~= 1 then - if POSITION == "TOP" then - i:Point("TOP", f, "BOTTOM", 0, -4) - else - i:Point("BOTTOM", f, "TOP", 0, 4) - end - else - if POSITION == "TOP" then - i:Point("TOP", SVUI_AlertFrame, "BOTTOM", 0, -4) - else - i:Point("BOTTOM", SVUI_AlertFrame, "TOP", 0, 4) - end - end - f = i; - if i:IsShown() then - g = i - end - end - AlertFrame:ClearAllPoints() - if g then - AlertFrame:SetAllPoints(g) - else - AlertFrame:SetAllPoints(SVUI_AlertFrame) - end - else - AlertFrame:ClearAllPoints() - AlertFrame:SetAllPoints(SVUI_AlertFrame) - end - if forced then - FORCE_POSITION = true; - AlertFrame_FixAnchors() - FORCE_POSITION = false - end -end ---[[ -########################################################## -MIRROR BARS -########################################################## -]]-- -local SetMirrorPosition = function(bar) - local yOffset = mirrorYOffset[bar.type] - return bar:Point("TOP", SV.Screen, "TOP", 0, -yOffset) -end - -local MirrorBar_OnUpdate = function(self, elapsed) - if self.paused then - return - end - self.lastupdate = (self.lastupdate or 0) + elapsed; - if self.lastupdate < .1 then - return - end - self.lastupdate = 0; - self:SetValue(GetMirrorTimerProgress(self.type) / 1e3) -end - -local MirrorBar_Start = function(self, min, max, s, t, text) - if t > 0 then - self.paused = 1 - elseif self.paused then - self.paused = nil - end - self.text:SetText(text) - self:SetMinMaxValues(0, max / 1e3) - self:SetValue(min / 1e3) - if not self:IsShown() then - self:Show() - end -end - - -local function MirrorBarRegistry(barType) - if RegisteredMirrorBars[barType] then - return RegisteredMirrorBars[barType] - end - local bar = CreateFrame('StatusBar', nil, SV.Screen) - bar:SetPanelTemplate("Bar", false, 3, 3, 3) - bar:SetScript("OnUpdate", MirrorBar_OnUpdate) - local r, g, b = unpack(mirrorTypeColor[barType]) - bar.text = bar:CreateFontString(nil, 'OVERLAY') - bar.text:FontManager(SV.Media.font.roboto, 12, 'OUTLINE') - bar.text:SetJustifyH('CENTER') - bar.text:SetTextColor(1, 1, 1) - bar.text:SetPoint('LEFT', bar) - bar.text:SetPoint('RIGHT', bar) - bar.text:Point('TOP', bar, 0, 2) - bar.text:SetPoint('BOTTOM', bar) - bar:Size(222, 18) - bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - bar:SetStatusBarColor(r, g, b) - bar.type = barType; - bar.Start = MirrorBar_Start; - -- bar.Stop = nil; - SetMirrorPosition(bar) - RegisteredMirrorBars[barType] = bar; - return bar -end - -local function SetTimerStyle(bar) - for i=1, bar:GetNumRegions()do - local child = select(i, bar:GetRegions()) - if child:GetObjectType() == "Texture"then - child:SetTexture(0,0,0,0) - elseif child:GetObjectType() == "FontString" then - child:FontManager(SV.Media.font.roboto, 12, 'OUTLINE') - end - end - bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - bar:SetStatusBarColor(0.37, 0.92, 0.08) - bar:SetPanelTemplate("Bar", false, 3, 3, 3) -end - -local MirrorBarToggleHandler = function(_, event, arg, ...) - if(event == "START_TIMER") then - for _,timer in pairs(TimerTracker.timerList)do - if timer["bar"] and not timer["bar"].styled then - SetTimerStyle(timer["bar"]) - timer["bar"].styled = true - end - end - elseif(event == "MIRROR_TIMER_START") then - return MirrorBarRegistry(arg):Start(...) - elseif(event == "MIRROR_TIMER_STOP") then - return MirrorBarRegistry(arg):Hide() - elseif(event == "MIRROR_TIMER_PAUSE") then - local pausedValue = (arg > 0 and arg or nil); - for barType,bar in next,RegisteredMirrorBars do - bar.paused = pausedValue; - end - end -end - -local MirrorBarUpdateHandler = function(_, event) - if not GetCVarBool("lockActionBars") and SV.db.SVBar.enable then - SetCVar("lockActionBars", 1) - end - if(event == "PLAYER_ENTERING_WORLD") then - for i = 1, MIRRORTIMER_NUMTIMERS do - local v, q, r, s, t, u = GetMirrorTimerInfo(i) - if v ~= "UNKNOWN"then - MirrorBarRegistry(v):Start(q, r, s, t, u) - end - end - end -end ---[[ -########################################################## -LOOTING -########################################################## -]]-- -local function UpdateLootUpvalues() - LOOT_WIDTH = SV.db.SVOverride.lootRollWidth - LOOT_HEIGHT = SV.db.SVOverride.lootRollHeight -end - -local Loot_OnHide = function(self) - SV:StaticPopup_Hide("CONFIRM_LOOT_DISTRIBUTION"); - CloseLoot() -end - -local SVUI_LootFrameHolder = CreateFrame("Frame","SVUI_LootFrameHolder",SV.Screen); -local SVUI_LootFrame = CreateFrame('Button', 'SVUI_LootFrame', SVUI_LootFrameHolder); -SVUI_LootFrameHolder:SetPoint("BOTTOMRIGHT", SVUI_DockTopLeft, "BOTTOMRIGHT", 0, 0); -SVUI_LootFrameHolder:SetWidth(150); -SVUI_LootFrameHolder:SetHeight(22); - -SVUI_LootFrame:SetClampedToScreen(true); -SVUI_LootFrame:SetPoint('TOPLEFT'); -SVUI_LootFrame:SetSize(256,64); -SVUI_LootFrame:SetFrameStrata("FULLSCREEN_DIALOG"); -SVUI_LootFrame:SetToplevel(true); -SVUI_LootFrame.title = SVUI_LootFrame:CreateFontString(nil,'OVERLAY'); -SVUI_LootFrame.title:SetPoint('BOTTOMLEFT',SVUI_LootFrame,'TOPLEFT',0,1); -SVUI_LootFrame.slots = {}; -SVUI_LootFrame:SetScript("OnHide", Loot_OnHide); - -local function HideItemTip() - GameTooltip:Hide() -end - -local function HideRollTip() - GameTooltip:Hide() - ResetCursor() -end - -local function LootRoll_SetTooltip(self) - GameTooltip:SetOwner(self, "ANCHOR_RIGHT") - GameTooltip:SetText(self.tiptext) - if self:IsEnabled() == 0 then - GameTooltip:AddLine("|cffff3333"..L["Can't Roll"]) - end - for r, s in pairs(self.parent.rolls)do - if LootRollType[s] == LootRollType[self.rolltype] then - GameTooltip:AddLine(r, 1, 1, 1) - end - end - GameTooltip:Show() -end - -local function LootItem_SetTooltip(self) - if not self.link then - return - end - GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT") - GameTooltip:SetHyperlink(self.link) - if IsShiftKeyDown() then - GameTooltip_ShowCompareItem() - end - if IsModifiedClick("DRESSUP") then - ShowInspectCursor() - else - ResetCursor() - end -end - -local function LootItem_OnUpdate(v) - if IsShiftKeyDown() then - GameTooltip_ShowCompareItem() - end - CursorOnUpdate(v) -end - -local function LootRoll_OnClick(self) - if IsControlKeyDown() then - DressUpItemLink(self.link) - elseif IsShiftKeyDown() then - ChatEdit_InsertLink(self.link) - end -end - -local function LootRoll_OnEvent(self, event, value) - dead_rollz[value] = true; - if self.rollID ~= value then - return - end - self.rollID = nil; - self.time = nil; - self:Hide() -end - -local function LootRoll_OnUpdate(self) - if not self.parent.rollID then return end - local remaining = GetLootRollTimeLeft(self.parent.rollID) - local mu = remaining / self.parent.time; - self.spark:Point("CENTER", self, "LEFT", mu * self:GetWidth(), 0) - self:SetValue(remaining) - if remaining > 1000000000 then - self:GetParent():Hide() - end -end - -local DoDaRoll = function(self) - RollOnLoot(self.parent.rollID, self.rolltype) -end - -local LootSlot_OnEnter = function(self) - local slotID = self:GetID() - if LootSlotHasItem(slotID) then - GameTooltip:SetOwner(self, "ANCHOR_RIGHT") - GameTooltip:SetLootItem(slotID) - CursorUpdate(self) - end - self.drop:Show() - self.drop:SetVertexColor(1, 1, 0) -end - -local LootSlot_OnLeave = function(self) - if self.quality and self.quality > 1 then - local color = ITEM_QUALITY_COLORS[self.quality] - self.drop:SetVertexColor(color.r, color.g, color.b) - else - self.drop:Hide() - end - GameTooltip:Hide() - ResetCursor() -end - -local LootSlot_OnClick = function(self) - LootFrame.selectedQuality = self.quality; - LootFrame.selectedItemName = self.name:GetText() - LootFrame.selectedSlot = self:GetID() - LootFrame.selectedLootButton = self:GetName() - LootFrame.selectedTexture = self.icon:GetTexture() - if IsModifiedClick() then - HandleModifiedItemClick(GetLootSlotLink(self:GetID())) - else - StaticPopup_Hide("CONFIRM_LOOT_DISTRIBUTION") - lastID = self:GetID() - lastQuality = self.quality; - lastName = self.name:GetText() - LootSlot(lastID) - end -end - -local LootSlot_OnShow = function(self) - if GameTooltip:IsOwned(self) then - GameTooltip:SetOwner(self, "ANCHOR_RIGHT") - GameTooltip:SetLootItem(self:GetID()) - CursorOnUpdate(self) - end -end - -local function HandleSlots(frame) - local scale = 30; - local counter = 0; - for i = 1, #frame.slots do - local slot = frame.slots[i] - if slot:IsShown() then - counter = counter + 1; - slot:Point("TOP", SVUI_LootFrame, 4, (-8 + scale) - (counter * scale)) - end - end - frame:Height(max(counter * scale + 16, 20)) -end - -local function MakeSlots(id) - local size = LOOT_HEIGHT; - local slot = CreateFrame("Button", "SVUI_LootSlot"..id, SVUI_LootFrame) - slot:Point("LEFT", 8, 0) - slot:Point("RIGHT", -8, 0) - slot:Height(size) - slot:SetID(id) - slot:RegisterForClicks("LeftButtonUp", "RightButtonUp") - slot:SetScript("OnEnter", LootSlot_OnEnter) - slot:SetScript("OnLeave", LootSlot_OnLeave) - slot:SetScript("OnClick", LootSlot_OnClick) - slot:SetScript("OnShow", LootSlot_OnShow) - - slot.iconFrame = CreateFrame("Frame", nil, slot) - slot.iconFrame:Height(size) - slot.iconFrame:Width(size) - slot.iconFrame:SetPoint("RIGHT", slot) - slot.iconFrame:SetPanelTemplate("Transparent") - - slot.icon = slot.iconFrame:CreateTexture(nil, "ARTWORK") - slot.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - slot.icon:FillInner() - - slot.count = slot.iconFrame:CreateFontString(nil, "OVERLAY") - slot.count:SetJustifyH("RIGHT") - slot.count:Point("BOTTOMRIGHT", slot.iconFrame, -2, 2) - slot.count:SetFont(LSM:Fetch("font", "Roboto"), 12, "OUTLINE") - slot.count:SetText(1) - - slot.name = slot:CreateFontString(nil, "OVERLAY") - slot.name:SetJustifyH("LEFT") - slot.name:SetPoint("LEFT", slot) - slot.name:SetPoint("RIGHT", slot.icon, "LEFT") - slot.name:SetNonSpaceWrap(true) - slot.name:SetFont(LSM:Fetch("font", "Roboto"), 12, "OUTLINE") - - slot.drop = slot:CreateTexture(nil, "ARTWORK") - slot.drop:SetTexture("Interface\\QuestFrame\\UI-QuestLogTitleHighlight") - slot.drop:SetPoint("LEFT", slot.icon, "RIGHT", 0, 0) - slot.drop:SetPoint("RIGHT", slot) - slot.drop:SetAllPoints(slot) - slot.drop:SetAlpha(.3) - - slot.questTexture = slot.iconFrame:CreateTexture(nil, "OVERLAY") - slot.questTexture:FillInner() - slot.questTexture:SetTexture(TEXTURE_ITEM_QUEST_BANG) - slot.questTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - - SVUI_LootFrame.slots[id] = slot; - return slot -end - -local function CreateRollButton(rollFrame, type, locale, anchor) - local preset = RollTypePresets[type]; - local rollButton = CreateFrame("Button", nil, rollFrame) - rollButton:Point("LEFT", anchor, "RIGHT", tonumber(preset[4]), tonumber(preset[5])) - rollButton:Size(LOOT_HEIGHT - 4) - rollButton:SetNormalTexture(preset[1]) - if preset[2] and preset[2] ~= "" then - rollButton:SetPushedTexture(preset[2]) - end - rollButton:SetHighlightTexture(preset[3]) - rollButton.rolltype = type; - rollButton.parent = rollFrame; - rollButton.tiptext = locale; - rollButton:SetScript("OnEnter", LootRoll_SetTooltip) - rollButton:SetScript("OnLeave", HideItemTip) - rollButton:SetScript("OnClick", DoDaRoll) - rollButton:SetMotionScriptsWhileDisabled(true) - local text = rollButton:CreateFontString(nil, nil) - text:SetFont(LSM:Fetch("font", "Roboto"),14,"OUTLINE") - text:Point("CENTER", 0, ((type == 2 and 1) or (type == 0 and -1.2) or 0)) - return rollButton, text -end - -local function CreateRollFrame() - UpdateLootUpvalues() - local rollFrame = CreateFrame("Frame",nil,SV.Screen) - rollFrame:Size(LOOT_WIDTH,LOOT_HEIGHT) - rollFrame:SetFixedPanelTemplate('Default') - rollFrame:SetScript("OnEvent",LootRoll_OnEvent) - rollFrame:RegisterEvent("CANCEL_LOOT_ROLL") - rollFrame:Hide() - rollFrame.button = CreateFrame("Button",nil,rollFrame) - rollFrame.button:Point("RIGHT",rollFrame,'LEFT',0,0) - rollFrame.button:Size(LOOT_HEIGHT - 2) - rollFrame.button:SetPanelTemplate('Default') - rollFrame.button:SetScript("OnEnter",LootItem_SetTooltip) - rollFrame.button:SetScript("OnLeave",HideRollTip) - rollFrame.button:SetScript("OnUpdate",LootItem_OnUpdate) - rollFrame.button:SetScript("OnClick",LootRoll_OnClick) - rollFrame.button.icon = rollFrame.button:CreateTexture(nil,'OVERLAY') - rollFrame.button.icon:SetAllPoints() - rollFrame.button.icon:SetTexCoord(0.1,0.9,0.1,0.9 ) - local border = rollFrame:CreateTexture(nil,"BORDER") - border:Point("TOPLEFT",rollFrame,"TOPLEFT",4,0) - border:Point("BOTTOMRIGHT",rollFrame,"BOTTOMRIGHT",-4,0) - border:SetTexture("Interface\\ChatFrame\\ChatFrameBackground") - border:SetBlendMode("ADD") - border:SetGradientAlpha("VERTICAL",.1,.1,.1,0,.1,.1,.1,0) - rollFrame.status=CreateFrame("StatusBar",nil,rollFrame) - rollFrame.status:FillInner() - rollFrame.status:SetScript("OnUpdate",LootRoll_OnUpdate) - rollFrame.status:SetFrameLevel(rollFrame.status:GetFrameLevel() - 1) - rollFrame.status:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - rollFrame.status:SetStatusBarColor(.8,.8,.8,.9) - rollFrame.status.parent = rollFrame; - rollFrame.status.bg = rollFrame.status:CreateTexture(nil,'BACKGROUND') - rollFrame.status.bg:SetAlpha(0.1) - rollFrame.status.bg:SetAllPoints() - rollFrame.status.bg:SetDrawLayer('BACKGROUND',2) - rollFrame.status.spark = rollFrame:CreateTexture(nil,"OVERLAY") - rollFrame.status.spark:Size(LOOT_HEIGHT * 0.5, LOOT_HEIGHT) - rollFrame.status.spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark") - rollFrame.status.spark:SetBlendMode("ADD") - - local needButton,needText = CreateRollButton(rollFrame,1,NEED,rollFrame.button) - local greedButton,greedText = CreateRollButton(rollFrame,2,GREED,needButton,"RIGHT") - local deButton,deText = CreateRollButton(rollFrame,3,ROLL_DISENCHANT,greedButton) - local passButton,passText = CreateRollButton(rollFrame,0,PASS,deButton or greedButton) - rollFrame.NeedIt,rollFrame.WantIt,rollFrame.BreakIt = needButton,greedButton,deButton; - rollFrame.need,rollFrame.greed,rollFrame.pass,rollFrame.disenchant = needText,greedText,passText,deText; - rollFrame.bindText = rollFrame:CreateFontString() - rollFrame.bindText:Point("LEFT",passButton,"RIGHT",3,1) - rollFrame.bindText:SetFont(LSM:Fetch("font", "SVUI Number Font"),14,"OUTLINE") - rollFrame.lootText = rollFrame:CreateFontString(nil,"ARTWORK") - rollFrame.lootText:SetFont(LSM:Fetch("font", "SVUI Number Font"),14,"OUTLINE") - rollFrame.lootText:Point("LEFT",rollFrame.bindText,"RIGHT",0,0) - rollFrame.lootText:Point("RIGHT",rollFrame,"RIGHT",-5,0) - rollFrame.lootText:Size(200,10) - rollFrame.lootText:SetJustifyH("LEFT") - - rollFrame.yourRoll = rollFrame:CreateFontString(nil,"ARTWORK") - rollFrame.yourRoll:SetFont(LSM:Fetch("font", "SVUI Number Font"),18,"OUTLINE") - rollFrame.yourRoll:Size(22,22) - rollFrame.yourRoll:Point("LEFT",rollFrame,"RIGHT",5,0) - rollFrame.yourRoll:SetJustifyH("CENTER") - - rollFrame.rolls = {} - return rollFrame -end ---[[ -########################################################## -CORE FUNCTIONS -########################################################## -]]-- -local AutoConfirmLoot = function(_, event, arg1, arg2, ...) - if event == "CONFIRM_LOOT_ROLL" or event == "CONFIRM_DISENCHANT_ROLL" then - ConfirmLootRoll(arg1, arg2) - StaticPopup_Hide("CONFIRM_LOOT_ROLL") - return - elseif event == "LOOT_BIND_CONFIRM" then - ConfirmLootSlot(arg1, arg2) - StaticPopup_Hide("LOOT_BIND",...) - return - end -end - -local LootSimpleEventsHandler = function(_, event, slot) - if(event == 'LOOT_SLOT_CLEARED') then - if not SVUI_LootFrame:IsShown() then return; end - SVUI_LootFrame.slots[slot]:Hide() - HandleSlots(SVUI_LootFrame) - elseif(event == 'LOOT_CLOSED') then - StaticPopup_Hide("LOOT_BIND") - SVUI_LootFrame:Hide() - for _,slot in pairs(SVUI_LootFrame.slots)do - slot:Hide() - end - elseif(event == 'OPEN_MASTER_LOOT_LIST') then - ToggleDropDownMenu(1, nil, GroupLootDropDown, SVUI_LootFrame.slots[lastID], 0, 0) - elseif(event == 'UPDATE_MASTER_LOOT_LIST') then - MasterLooterFrame_UpdatePlayers() - end -end - -local OpenedLootHandler = function(_, event, autoLoot) - local drops = GetNumLootItems() - if drops > 0 then - SVUI_LootFrame:Show() - else - CloseLoot(autoLoot == 0) - end - - if IsFishingLoot() then - SVUI_LootFrame.title:SetText(L["Fishy Loot"]) - elseif not UnitIsFriend("player", "target") and UnitIsDead"target" then - SVUI_LootFrame.title:SetText(UnitName("target")) - else - SVUI_LootFrame.title:SetText(LOOT) - end - - if GetCVar("lootUnderMouse") == "1" then - local cursorX,cursorY = GetCursorPosition() - cursorX = cursorX / SVUI_LootFrame:GetEffectiveScale() - cursorY = (cursorY / (SVUI_LootFrame:GetEffectiveScale())); - SVUI_LootFrame:ClearAllPoints() - SVUI_LootFrame:SetPoint("TOPLEFT", nil, "BOTTOMLEFT", cursorX - 40, cursorY + 20) - SVUI_LootFrame:GetCenter() - else - SVUI_LootFrame:ClearAllPoints() - SVUI_LootFrame:SetPoint("TOPLEFT", SVUI_LootFrameHolder, "TOPLEFT") - end - - SVUI_LootFrame:Raise() - - local iQuality, nameWidth, titleWidth = 0, 0, SVUI_LootFrame.title:GetStringWidth() - UpdateLootUpvalues() - if drops > 0 then - for i = 1, drops do - local slot = SVUI_LootFrame.slots[i] or MakeSlots(i) - local texture, item, quantity, quality, locked, isQuestItem, questId, isActive = GetLootSlotInfo(i) - local color = ITEM_QUALITY_COLORS[quality] - if texture and texture:find("INV_Misc_Coin") then - item = item:gsub("\n", ", ") - end - if quantity and quantity > 1 then - slot.count:SetText(quantity) - slot.count:Show() - else - slot.count:Hide() - end - if quality and quality > 1 then - slot.drop:SetVertexColor(color.r, color.g, color.b) - slot.drop:Show() - else - slot.drop:Hide() - end - slot.quality = quality; - slot.name:SetText(item) - if color then - slot.name:SetTextColor(color.r, color.g, color.b) - end - slot.icon:SetTexture(texture) - if quality then - iQuality = max(iQuality, quality) - end - nameWidth = max(nameWidth, slot.name:GetStringWidth()) - local qTex = slot.questTexture; - if questId and not isActive then - qTex:Show() - ActionButton_ShowOverlayGlow(slot.iconFrame) - elseif questId or isQuestItem then - qTex:Hide() - ActionButton_ShowOverlayGlow(slot.iconFrame) - else - qTex:Hide() - ActionButton_HideOverlayGlow(slot.iconFrame) - end - slot:Enable() - slot:Show() - ConfirmLootSlot(i) - end - else - local slot = SVUI_LootFrame.slots[1] or MakeSlots(1) - local color = ITEM_QUALITY_COLORS[0] - slot.name:SetText(L["Empty Slot"]) - if color then - slot.name:SetTextColor(color.r, color.g, color.b) - end - slot.icon:SetTexture[[Interface\Icons\INV_Misc_Herb_AncientLichen]] - drops = 1; - nameWidth = max(nameWidth, slot.name:GetStringWidth()) - slot.count:Hide() - slot.drop:Hide() - slot:Disable() - slot:Show() - end - - HandleSlots(SVUI_LootFrame) - nameWidth = nameWidth + 60; - titleWidth = titleWidth + 5; - local color = ITEM_QUALITY_COLORS[iQuality] - SVUI_LootFrame:SetBackdropBorderColor(color.r, color.g, color.b, .8) - SVUI_LootFrame:Width(max(nameWidth, titleWidth)) -end - -local function rollz() - for _,roll in ipairs(MOD.LewtRollz)do - if not roll.rollID then - return roll - end - end - local roll = CreateRollFrame() - roll:Point("TOP", next(MOD.LewtRollz) and MOD.LewtRollz[#MOD.LewtRollz] or SVUI_AlertFrame, "BOTTOM", 0, -4); - tinsert(MOD.LewtRollz, roll) - return roll -end - -local LootComplexEventsHandler = function(_, event, arg1, arg2) - if(event == "START_LOOT_ROLL") then - if dead_rollz[arg1] then return end - local texture,name,count,quality,bindOnPickUp,canNeed,canGreed,canBreak = GetLootRollItemInfo(arg1); - local color = ITEM_QUALITY_COLORS[quality]; - local rollFrame = rollz(); - rollFrame.rollID = arg1; - rollFrame.time = arg2; - for i in pairs(rollFrame.rolls)do - rollFrame.rolls[i] = nil - end - rollFrame.need:SetText(0) - rollFrame.greed:SetText(0) - rollFrame.pass:SetText(0) - rollFrame.disenchant:SetText(0) - rollFrame.button.icon:SetTexture(texture) - rollFrame.button.link = GetLootRollItemLink(arg1) - if canNeed then - rollFrame.NeedIt:Enable() - rollFrame.NeedIt:SetAlpha(1) - else - rollFrame.NeedIt:SetAlpha(0.2) - rollFrame.NeedIt:Disable() - end - if canGreed then - rollFrame.WantIt:Enable() - rollFrame.WantIt:SetAlpha(1) - else - rollFrame.WantIt:SetAlpha(0.2) - rollFrame.WantIt:Disable() - end - if canBreak then - rollFrame.BreakIt:Enable() - rollFrame.BreakIt:SetAlpha(1) - else - rollFrame.BreakIt:SetAlpha(0.2) - rollFrame.BreakIt:Disable() - end - SetDesaturation(rollFrame.NeedIt:GetNormalTexture(),not canNeed) - SetDesaturation(rollFrame.WantIt:GetNormalTexture(),not canGreed) - SetDesaturation(rollFrame.BreakIt:GetNormalTexture(),not canBreak) - rollFrame.bindText:SetText(bindOnPickUp and "BoP" or "BoE") - rollFrame.bindText:SetVertexColor(bindOnPickUp and 1 or 0.3, bindOnPickUp and 0.3 or 1, bindOnPickUp and 0.1 or 0.3) - rollFrame.lootText:SetText(name) - rollFrame.yourRoll:SetText("") - rollFrame.status:SetStatusBarColor(color.r,color.g,color.b,0.7) - rollFrame.status.bg:SetTexture(color.r,color.g,color.b) - rollFrame.status:SetMinMaxValues(0,arg2) - rollFrame.status:SetValue(arg2) - rollFrame:SetPoint("CENTER",WorldFrame,"CENTER") - rollFrame:Show() - AlertFrame_FixAnchors() - 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 - RollOnLoot(arg1,2) - end - end - elseif(event == "LOOT_HISTORY_ROLL_CHANGED") then - local rollID,_,_,_,_,_ = C_LootHistory.GetItem(arg1); - local name,_,rollType,rollResult,_ = C_LootHistory.GetPlayerInfo(arg1,arg2); - if name and rollType then - for _,roll in ipairs(MOD.LewtRollz)do - if roll.rollID == rollID then - roll.rolls[name] = rollType; - roll[LootRollType[rollType]]:SetText(tonumber(roll[LootRollType[rollType]]:GetText()) + 1); - return - end - if rollResult then - roll.yourRoll:SetText(tostring(rollResult)) - end - end - end - end -end - -_G.GroupLootDropDown_GiveLoot = function(self) - if lastQuality >= MASTER_LOOT_THREHOLD then - local confirmed = SV:StaticPopup_Show("CONFIRM_LOOT_DISTRIBUTION",ITEM_QUALITY_COLORS[lastQuality].hex..lastName..FONT_COLOR_CODE_CLOSE,self:GetText()); - if confirmed then confirmed.data = self.value end - else - GiveMasterLoot(lastID, self.value) +local Dura_OnSetPoint = function(self, _, parent) + if((parent == "MinimapCluster") or (parent == _G["MinimapCluster"])) then + self:ClearAllPoints() + self:Point("RIGHT", Minimap, "RIGHT") + self:SetScale(0.6) end - CloseDropDownMenus() - SV.SystemAlert["CONFIRM_LOOT_DISTRIBUTION"].OnAccept = function(self,index) GiveMasterLoot(lastID,index) end end local BailOut_OnEvent = function(self, event, ...) @@ -1021,12 +130,7 @@ LOAD / UPDATE ########################################################## ]]-- function MOD:Load() - HelpOpenTicketButtonTutorial:Die() - TalentMicroButtonAlert:Die() - HelpPlate:Die() - HelpPlateTooltip:Die() CompanionsMicroButtonAlert:Die() - UIPARENT_MANAGED_FRAME_POSITIONS["GroupLootContainer"] = nil; DurabilityFrame:SetFrameStrata("HIGH") NewHook(DurabilityFrame, "SetPoint", Dura_OnSetPoint) @@ -1034,6 +138,10 @@ function MOD:Load() TicketStatusFrame:ClearAllPoints() TicketStatusFrame:SetPoint("TOPRIGHT", SV.Dock.TopLeft, "TOPRIGHT", 0, 0) SV.Mentalo:Add(TicketStatusFrame, L["GM Ticket Frame"], nil, nil, "GM") + + HelpPlate:Die() + HelpPlateTooltip:Die() + HelpOpenTicketButtonTutorial:Die() HelpOpenTicketButton:SetParent(Minimap) HelpOpenTicketButton:ClearAllPoints() HelpOpenTicketButton:SetPoint("TOPRIGHT", Minimap, "TOPRIGHT") @@ -1041,99 +149,42 @@ function MOD:Load() NewHook(VehicleSeatIndicator, "SetPoint", Vehicle_OnSetPoint) VehicleSeatIndicator:SetPoint("TOPLEFT", MinimapCluster, "TOPLEFT", 2, 2) - self:RegisterEvent("CHAT_MSG_BG_SYSTEM_HORDE", PVPRaidNoticeHandler) - self:RegisterEvent("CHAT_MSG_BG_SYSTEM_ALLIANCE", PVPRaidNoticeHandler) - self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL", PVPRaidNoticeHandler) - self:RegisterEvent('PLAYER_REGEN_DISABLED', ErrorFrameHandler) - self:RegisterEvent('PLAYER_REGEN_ENABLED', ErrorFrameHandler) - - local wsc = CreateFrame("Frame", "SVUI_WorldStateHolder", SV.Screen) - wsc:SetSize(200, 45) - wsc:SetPoint("TOP", SV.Dock.TopCenter, "BOTTOM", 0, -10) - SV.Mentalo:Add(wsc, L["Capture Bars"]) + SVUI_WorldStateHolder:Size(200, 45) + SV.Mentalo:Add(SVUI_WorldStateHolder, L["Capture Bars"]) NewHook("UIParent_ManageFramePositions", CaptureBarHandler) - local altPower = CreateFrame("Frame", "SVUI_AltPowerBar", UIParent) - altPower:SetPoint("TOP", SV.Dock.TopCenter, "BOTTOM", 0, -60) - altPower:Size(128, 50) + SVUI_AltPowerBar:Size(128, 50) PlayerPowerBarAlt:ClearAllPoints() - PlayerPowerBarAlt:SetPoint("CENTER", altPower, "CENTER") - PlayerPowerBarAlt:SetParent(altPower) + PlayerPowerBarAlt:SetPoint("CENTER", SVUI_AltPowerBar, "CENTER") + PlayerPowerBarAlt:SetParent(SVUI_AltPowerBar) PlayerPowerBarAlt.ignoreFramePositionManager = true; - SV.Mentalo:Add(altPower, L["Alternative Power"]) - - SVUI_AlertFrame:SetParent(SV.Screen) - SVUI_AlertFrame:SetPoint("TOP", SV.Dock.TopCenter, "BOTTOM", 0, -115); - SV.Mentalo:Add(SVUI_AlertFrame, L["Loot / Alert Frames"], nil, AlertFramePostMove_Hook) - NewHook('AlertFrame_FixAnchors', AlertFramePostMove_Hook) - NewHook('AlertFrame_SetLootAnchors', _hook_AlertFrame_SetLootAnchors) - NewHook('AlertFrame_SetLootWonAnchors', _hook_AlertFrame_SetLootWonAnchors) - NewHook('AlertFrame_SetMoneyWonAnchors', _hook_AlertFrame_SetMoneyWonAnchors) - NewHook('AlertFrame_SetAchievementAnchors', _hook_AlertFrame_SetAchievementAnchors) - NewHook('AlertFrame_SetCriteriaAnchors', _hook_AlertFrame_SetCriteriaAnchors) - NewHook('AlertFrame_SetChallengeModeAnchors', _hook_AlertFrame_SetChallengeModeAnchors) - NewHook('AlertFrame_SetDungeonCompletionAnchors', _hook_AlertFrame_SetDungeonCompletionAnchors) - NewHook('AlertFrame_SetScenarioAnchors', _hook_AlertFrame_SetScenarioAnchors) - NewHook('AlertFrame_SetGuildChallengeAnchors', _hook_AlertFrame_SetGuildChallengeAnchors) - NewHook('AlertFrame_SetStorePurchaseAnchors', _hook_AlertFrame_SetStorePurchaseAnchors) - - LootFrame:UnregisterAllEvents(); - SVUI_LootFrame:SetFixedPanelTemplate('Transparent'); - SVUI_LootFrame.title:SetFont(LSM:Fetch("font", "SVUI Number Font"),18,"OUTLINE") - SV.Mentalo:Add(SVUI_LootFrameHolder, L["Loot Frame"], nil, nil, "SVUI_LootFrame"); - SV:AddToDisplayAudit(SVUI_LootFrame); - SVUI_LootFrame:Hide(); - - UIParent:UnregisterEvent("LOOT_BIND_CONFIRM") - UIParent:UnregisterEvent("CONFIRM_DISENCHANT_ROLL") - UIParent:UnregisterEvent("CONFIRM_LOOT_ROLL") - self:RegisterEvent("CONFIRM_DISENCHANT_ROLL", AutoConfirmLoot) - self:RegisterEvent("CONFIRM_LOOT_ROLL", AutoConfirmLoot) - self:RegisterEvent("LOOT_BIND_CONFIRM", AutoConfirmLoot) - - self:RegisterEvent("LOOT_READY", OpenedLootHandler) - - self:RegisterEvent("LOOT_SLOT_CLEARED", LootSimpleEventsHandler); - self:RegisterEvent("LOOT_CLOSED", LootSimpleEventsHandler); - self:RegisterEvent("OPEN_MASTER_LOOT_LIST", LootSimpleEventsHandler); - self:RegisterEvent("UPDATE_MASTER_LOOT_LIST", LootSimpleEventsHandler); - if SV.db.SVOverride.lootRoll then - self:RegisterEvent("LOOT_HISTORY_ROLL_CHANGED", LootComplexEventsHandler); - self:RegisterEvent("START_LOOT_ROLL", LootComplexEventsHandler); - UIParent:UnregisterEvent("START_LOOT_ROLL"); - UIParent:UnregisterEvent("CANCEL_LOOT_ROLL"); - end - - UIParent:UnregisterEvent("MIRROR_TIMER_START") - self:RegisterEvent("CVAR_UPDATE", MirrorBarUpdateHandler) - self:RegisterEvent("PLAYER_ENTERING_WORLD", MirrorBarUpdateHandler) - self:RegisterEvent("MIRROR_TIMER_START", MirrorBarToggleHandler) - self:RegisterEvent("MIRROR_TIMER_STOP", MirrorBarToggleHandler) - self:RegisterEvent("MIRROR_TIMER_PAUSE", MirrorBarToggleHandler) - self:RegisterEvent("START_TIMER", MirrorBarToggleHandler) - - local exitSize = ExtraActionBarFrame:GetSize() - - local exit = CreateFrame("Button", "SVUI_BailOut", SV.Screen) - exit:Size(exitSize) - exit:Point("BOTTOM", SV.Screen, "BOTTOM", 0, 275) - exit:SetNormalTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\EXIT") - exit:SetPushedTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\EXIT") - exit:SetHighlightTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\EXIT") - exit:SetFixedPanelTemplate("Transparent") - exit:RegisterForClicks("AnyUp") - exit:SetScript("OnClick", VehicleExit) - - exit:RegisterEvent("UNIT_ENTERED_VEHICLE") - exit:RegisterEvent("UNIT_EXITED_VEHICLE") - exit:RegisterEvent("VEHICLE_UPDATE") - exit:RegisterEvent("PLAYER_ENTERING_WORLD") - exit:SetScript("OnEvent", BailOut_OnEvent) - exit:Hide() - - SV.Mentalo:Add(exit, L["Bail Out"]) + SV.Mentalo:Add(SVUI_AltPowerBar, L["Alternative Power"]) + + SVUI_BailOut:Size(30, 30) + SVUI_BailOut:SetNormalTexture(BAILOUT_ICON) + SVUI_BailOut:SetPushedTexture(BAILOUT_ICON) + SVUI_BailOut:SetHighlightTexture(BAILOUT_ICON) + SVUI_BailOut:SetFixedPanelTemplate("Transparent") + SVUI_BailOut:RegisterForClicks("AnyUp") + SVUI_BailOut:SetScript("OnClick", VehicleExit) + SVUI_BailOut:RegisterEvent("UNIT_ENTERED_VEHICLE") + SVUI_BailOut:RegisterEvent("UNIT_EXITED_VEHICLE") + SVUI_BailOut:RegisterEvent("VEHICLE_UPDATE") + SVUI_BailOut:RegisterEvent("PLAYER_ENTERING_WORLD") + SVUI_BailOut:SetScript("OnEvent", BailOut_OnEvent) + SV.Mentalo:Add(SVUI_BailOut, L["Bail Out"]) + SVUI_BailOut:Hide() LossOfControlFrame:ClearAllPoints() - LossOfControlFrame:SetPoint("TOP", SV.Screen, "TOP", 0, -225) + LossOfControlFrame:Point("CENTER", SV.Screen, "CENTER", 0, 50) SV.Mentalo:Add(LossOfControlFrame, L["Loss Control Icon"], nil, nil, "LoC") + + self:RegisterEvent("CHAT_MSG_BG_SYSTEM_HORDE", PVPRaidNoticeHandler) + self:RegisterEvent("CHAT_MSG_BG_SYSTEM_ALLIANCE", PVPRaidNoticeHandler) + self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL", PVPRaidNoticeHandler) + + self:SetAlerts() + self:SetMirrorBars() + self:SetLootFrames() + self:SetErrorFilters() end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.xml b/Interface/AddOns/SVUI/packages/override/SVOverride.xml new file mode 100644 index 0000000..78c3e0f --- /dev/null +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.xml @@ -0,0 +1,7 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file='SVOverride.lua'/> + <Script file="components\alert.lua"/> + <Script file="components\mirror.lua"/> + <Script file="components\loot.lua"/> + <Script file="components\errors.lua"/> +</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/override/components/alert.lua b/Interface/AddOns/SVUI/packages/override/components/alert.lua new file mode 100644 index 0000000..c8d6f8b --- /dev/null +++ b/Interface/AddOns/SVUI/packages/override/components/alert.lua @@ -0,0 +1,235 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local assert = _G.assert; +local type = _G.type; +local error = _G.error; +local pcall = _G.pcall; +local print = _G.print; +local ipairs = _G.ipairs; +local pairs = _G.pairs; +local next = _G.next; +local rawset = _G.rawset; +local rawget = _G.rawget; +local tostring = _G.tostring; +local tonumber = _G.tonumber; +local tinsert = _G.tinsert; +local string = _G.string; +local math = _G.math; +--[[ STRING METHODS ]]-- +local find, format, len, split = string.find, string.format, string.len, string.split; +--[[ MATH METHODS ]]-- +local abs, ceil, floor, round, max = math.abs, math.ceil, math.floor, math.round, math.max; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = select(2, ...) +local L = SV.L +local LSM = LibStub("LibSharedMedia-3.0") +local MOD = SV.SVOverride; +--[[ +########################################################## +LOCAL VARS +########################################################## +]]-- +local POSITION, ANCHOR_POINT, YOFFSET = "TOP", "BOTTOM", -10 +local FORCE_POSITION = false; +local NewHook = hooksecurefunc; + +local SVUI_AlertFrame = CreateFrame("Frame", "SVUI_AlertFrame", UIParent); +SVUI_AlertFrame:SetPoint("TOP", SVUI_DockTopCenter, "BOTTOM", 0, -115); +SVUI_AlertFrame:SetSize(180, 20); +--[[ +########################################################## +ALERTS +########################################################## +]]-- +local _hook_AlertFrame_SetLootAnchors = function(self) + if MissingLootFrame:IsShown() then + MissingLootFrame:ClearAllPoints() + MissingLootFrame:SetPoint(POSITION, self, ANCHOR_POINT) + if GroupLootContainer:IsShown() then + GroupLootContainer:ClearAllPoints() + GroupLootContainer:SetPoint(POSITION, MissingLootFrame, ANCHOR_POINT, 0, YOFFSET) + end + elseif GroupLootContainer:IsShown() or FORCE_POSITION then + GroupLootContainer:ClearAllPoints() + GroupLootContainer:SetPoint(POSITION, self, ANCHOR_POINT) + end +end + +local _hook_AlertFrame_SetLootWonAnchors = function(self) + for i = 1, #LOOT_WON_ALERT_FRAMES do + local frame = LOOT_WON_ALERT_FRAMES[i] + if(frame and frame:IsShown()) then + frame:ClearAllPoints() + frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) + self = frame + end + end +end + +local _hook_AlertFrame_SetMoneyWonAnchors = function(self) + for i = 1, #MONEY_WON_ALERT_FRAMES do + local frame = MONEY_WON_ALERT_FRAMES[i] + if(frame and frame:IsShown()) then + frame:ClearAllPoints() + frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) + self = frame + end + end +end + +local _hook_AlertFrame_SetAchievementAnchors = function(self) + if AchievementAlertFrame1 then + for i = 1, MAX_ACHIEVEMENT_ALERTS do + local frame = _G["AchievementAlertFrame"..i] + if(frame and frame:IsShown()) then + frame:ClearAllPoints() + frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) + self = frame + end + end + end +end + +local _hook_AlertFrame_SetCriteriaAnchors = function(self) + if CriteriaAlertFrame1 then + for i = 1, MAX_ACHIEVEMENT_ALERTS do + local frame = _G["CriteriaAlertFrame"..i] + if(frame and frame:IsShown()) then + frame:ClearAllPoints() + frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) + self = frame + end + end + end +end + +local _hook_AlertFrame_SetChallengeModeAnchors = function(self) + local frame = ChallengeModeAlertFrame1; + if(frame and frame:IsShown()) then + frame:ClearAllPoints() + frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) + end +end + +local _hook_AlertFrame_SetDungeonCompletionAnchors = function(self) + local frame = DungeonCompletionAlertFrame1; + if(frame and frame:IsShown()) then + frame:ClearAllPoints() + frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) + end +end + +local _hook_AlertFrame_SetStorePurchaseAnchors = function(self) + local frame = StorePurchaseAlertFrame; + if(frame and frame:IsShown()) then + frame:ClearAllPoints() + frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) + end +end + +local _hook_AlertFrame_SetScenarioAnchors = function(self) + local frame = ScenarioAlertFrame1; + if(frame and frame:IsShown()) then + frame:ClearAllPoints() + frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) + end +end + +local _hook_AlertFrame_SetGuildChallengeAnchors = function(self) + local frame = GuildChallengeAlertFrame; + if(frame and frame:IsShown()) then + frame:ClearAllPoints() + frame:SetPoint(POSITION, self, ANCHOR_POINT, 0, YOFFSET) + end +end + +local AlertFramePostMove_Hook = function(forced) + local b, c = SVUI_AlertFrame_MOVE:GetCenter() + local d = SV.Screen:GetTop() + if(c > (d / 2)) then + POSITION = "TOP" + ANCHOR_POINT = "BOTTOM" + YOFFSET = -10; + SVUI_AlertFrame_MOVE:SetText(SVUI_AlertFrame_MOVE.textString.." (Grow Down)") + else + POSITION = "BOTTOM" + ANCHOR_POINT = "TOP" + YOFFSET = 10; + SVUI_AlertFrame_MOVE:SetText(SVUI_AlertFrame_MOVE.textString.." (Grow Up)") + end + if(MOD.RollFrames[1]) then + local lastFrame = SVUI_AlertFrame; + local newAnchor; + for index, rollFrame in pairs(MOD.RollFrames) do + rollFrame:ClearAllPoints() + if(POSITION == "TOP") then + rollFrame:Point("TOP", lastFrame, "BOTTOM", 0, -4) + else + rollFrame:Point("BOTTOM", lastFrame, "TOP", 0, 4) + end + lastFrame = rollFrame; + if(rollFrame:IsShown()) then + newAnchor = rollFrame + end + end + AlertFrame:ClearAllPoints() + if(newAnchor) then + AlertFrame:SetAllPoints(newAnchor) + else + AlertFrame:SetAllPoints(SVUI_AlertFrame) + end + else + AlertFrame:ClearAllPoints() + AlertFrame:SetAllPoints(SVUI_AlertFrame) + end + if(forced) then + FORCE_POSITION = true; + AlertFrame_FixAnchors() + FORCE_POSITION = false + end +end +--[[ +########################################################## +PACKAGE CALL +########################################################## +]]-- +function MOD:SetAlerts() + SVUI_AlertFrame:Size(180, 20); + SV.Mentalo:Add(SVUI_AlertFrame, L["Loot / Alert Frames"], nil, AlertFramePostMove_Hook) + + NewHook('AlertFrame_FixAnchors', AlertFramePostMove_Hook) + NewHook('AlertFrame_SetLootAnchors', _hook_AlertFrame_SetLootAnchors) + NewHook('AlertFrame_SetLootWonAnchors', _hook_AlertFrame_SetLootWonAnchors) + NewHook('AlertFrame_SetMoneyWonAnchors', _hook_AlertFrame_SetMoneyWonAnchors) + NewHook('AlertFrame_SetAchievementAnchors', _hook_AlertFrame_SetAchievementAnchors) + NewHook('AlertFrame_SetCriteriaAnchors', _hook_AlertFrame_SetCriteriaAnchors) + NewHook('AlertFrame_SetChallengeModeAnchors', _hook_AlertFrame_SetChallengeModeAnchors) + NewHook('AlertFrame_SetDungeonCompletionAnchors', _hook_AlertFrame_SetDungeonCompletionAnchors) + NewHook('AlertFrame_SetScenarioAnchors', _hook_AlertFrame_SetScenarioAnchors) + NewHook('AlertFrame_SetGuildChallengeAnchors', _hook_AlertFrame_SetGuildChallengeAnchors) + NewHook('AlertFrame_SetStorePurchaseAnchors', _hook_AlertFrame_SetStorePurchaseAnchors) +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/override/components/errors.lua b/Interface/AddOns/SVUI/packages/override/components/errors.lua new file mode 100644 index 0000000..7df4617 --- /dev/null +++ b/Interface/AddOns/SVUI/packages/override/components/errors.lua @@ -0,0 +1,66 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = select(2, ...); +local MOD = SV.SVOverride; +--[[ +########################################################## +LOCAL VARS +########################################################## +]]-- +local UIErrorsFrame = _G.UIErrorsFrame; +--[[ +########################################################## +EVENTS +########################################################## +]]-- +function MOD:UI_ERROR_MESSAGE(event, msg) + if((not msg) or SV.db.SVOverride.errorFilters[msg]) then return end + UIErrorsFrame:AddMessage(msg, 1.0, 0.1, 0.1, 1.0); +end + +local ErrorFrameHandler = function(self, event) + if(event == 'PLAYER_REGEN_DISABLED') then + UIErrorsFrame:UnregisterEvent('UI_ERROR_MESSAGE') + else + UIErrorsFrame:RegisterEvent('UI_ERROR_MESSAGE') + end +end +--[[ +########################################################## +PACKAGE CALL +########################################################## +]]-- +function MOD:SetErrorFilters() + if(SV.db.SVOverride.filterErrors) then + UIErrorsFrame:UnregisterEvent('UI_ERROR_MESSAGE') + self:RegisterEvent('UI_ERROR_MESSAGE') + elseif(SV.db.SVOverride.hideErrorFrame) then + self:RegisterEvent('PLAYER_REGEN_DISABLED', ErrorFrameHandler) + self:RegisterEvent('PLAYER_REGEN_ENABLED', ErrorFrameHandler) + end +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/override/components/loot.lua b/Interface/AddOns/SVUI/packages/override/components/loot.lua new file mode 100644 index 0000000..17813da --- /dev/null +++ b/Interface/AddOns/SVUI/packages/override/components/loot.lua @@ -0,0 +1,675 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local assert = _G.assert; +local type = _G.type; +local error = _G.error; +local pcall = _G.pcall; +local print = _G.print; +local ipairs = _G.ipairs; +local pairs = _G.pairs; +local next = _G.next; +local rawset = _G.rawset; +local rawget = _G.rawget; +local tostring = _G.tostring; +local tonumber = _G.tonumber; +local tinsert = _G.tinsert; +local string = _G.string; +local math = _G.math; +--[[ STRING METHODS ]]-- +local find, format, len, split = string.find, string.format, string.len, string.split; +--[[ MATH METHODS ]]-- +local abs, ceil, floor, round, max = math.abs, math.ceil, math.floor, math.round, math.max; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = select(2, ...) +local L = SV.L +local LSM = LibStub("LibSharedMedia-3.0") +local MOD = SV.SVOverride; +--[[ +########################################################## +LOCAL VARS +########################################################## +]]-- +local POSITION, ANCHOR_POINT, YOFFSET = "TOP", "BOTTOM", -10 +local FORCE_POSITION = false; +local NewHook = hooksecurefunc; +local lastQuality,lastID,lastName; +local dead_rollz = {} +local RollTypePresets = { + [0] = { + "Interface\\Buttons\\UI-GroupLoot-Pass-Up", + "", + "Interface\\Buttons\\UI-GroupLoot-Pass-Down", + [[0]], + [[2]] + }, + [1] = { + "Interface\\Buttons\\UI-GroupLoot-Dice-Up", + "Interface\\Buttons\\UI-GroupLoot-Dice-Highlight", + "Interface\\Buttons\\UI-GroupLoot-Dice-Down", + [[5]], + [[-1]] + }, + [2] = { + "Interface\\Buttons\\UI-GroupLoot-Coin-Up", + "Interface\\Buttons\\UI-GroupLoot-Coin-Highlight", + "Interface\\Buttons\\UI-GroupLoot-Coin-Down", + [[0]], + [[-1]] + }, + [3] = { + "Interface\\Buttons\\UI-GroupLoot-DE-Up", + "Interface\\Buttons\\UI-GroupLoot-DE-Highlight", + "Interface\\Buttons\\UI-GroupLoot-DE-Down", + [[0]], + [[-1]] + } +}; +local LootRollType = {[1] = "need", [2] = "greed", [3] = "disenchant", [0] = "pass"}; +local LOOT_WIDTH, LOOT_HEIGHT = 328, 28; + +local SVUI_LootFrameHolder = CreateFrame("Frame", "SVUI_LootFrameHolder", UIParent); +SVUI_LootFrameHolder:SetPoint("BOTTOMRIGHT", SVUI_DockTopLeft, "BOTTOMRIGHT", 0, 0); +SVUI_LootFrameHolder:SetSize(150, 22); + +local SVUI_LootFrame = CreateFrame('Button', 'SVUI_LootFrame', SVUI_LootFrameHolder); +SVUI_LootFrame:SetClampedToScreen(true); +SVUI_LootFrame:SetPoint('TOPLEFT'); +SVUI_LootFrame:SetSize(256, 64); +SVUI_LootFrame:SetFrameStrata("FULLSCREEN_DIALOG"); +SVUI_LootFrame:SetToplevel(true); +SVUI_LootFrame.title = SVUI_LootFrame:CreateFontString(nil,'OVERLAY'); +SVUI_LootFrame.title:SetPoint('BOTTOMLEFT',SVUI_LootFrame,'TOPLEFT',0,1); +SVUI_LootFrame.slots = {}; +SVUI_LootFrame:SetScript("OnHide", Loot_OnHide); +--[[ +########################################################## +LOOTING +########################################################## +]]-- +local function UpdateLootUpvalues() + LOOT_WIDTH = SV.db.SVOverride.lootRollWidth + LOOT_HEIGHT = SV.db.SVOverride.lootRollHeight +end + +local DoDaRoll = function(self) + RollOnLoot(self.parent.rollID, self.rolltype) +end + +local Loot_OnHide = function(self) + SV:StaticPopup_Hide("CONFIRM_LOOT_DISTRIBUTION"); + CloseLoot() +end + +local LootRoll_OnLeave = function(self) + GameTooltip:Hide() +end + +local LootItem_OnLeave = function(self) + GameTooltip:Hide() + ResetCursor() +end + +local LootRoll_SetTooltip = function(self) + GameTooltip:SetOwner(self, "ANCHOR_RIGHT") + GameTooltip:SetText(self.tiptext) + if self:IsEnabled() == 0 then + GameTooltip:AddLine("|cffff3333"..L["Can't Roll"]) + end + for r, s in pairs(self.parent.rolls)do + if LootRollType[s] == LootRollType[self.rolltype] then + GameTooltip:AddLine(r, 1, 1, 1) + end + end + GameTooltip:Show() +end + +local LootItem_SetTooltip = function(self) + if not self.link then + return + end + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT") + GameTooltip:SetHyperlink(self.link) + if IsShiftKeyDown() then + GameTooltip_ShowCompareItem() + end + if IsModifiedClick("DRESSUP") then + ShowInspectCursor() + else + ResetCursor() + end +end + +local LootItem_OnUpdate = function(self) + if IsShiftKeyDown() then + GameTooltip_ShowCompareItem() + end + CursorOnUpdate(self) +end + +local LootRoll_OnClick = function(self) + if IsControlKeyDown() then + DressUpItemLink(self.link) + elseif IsShiftKeyDown() then + ChatEdit_InsertLink(self.link) + end +end + +local LootRoll_OnEvent = function(self, event, value) + dead_rollz[value] = true; + if self.rollID ~= value then + return + end + self.rollID = nil; + self.time = nil; + self:Hide() +end + +local LootRoll_OnUpdate = function(self) + if not self.parent.rollID then return end + local remaining = GetLootRollTimeLeft(self.parent.rollID) + local mu = remaining / self.parent.time; + self.spark:Point("CENTER", self, "LEFT", mu * self:GetWidth(), 0) + self:SetValue(remaining) + if remaining > 1000000000 then + self:GetParent():Hide() + end +end + +local LootSlot_OnEnter = function(self) + local slotID = self:GetID() + if LootSlotHasItem(slotID) then + GameTooltip:SetOwner(self, "ANCHOR_RIGHT") + GameTooltip:SetLootItem(slotID) + CursorUpdate(self) + end + self.drop:Show() + self.drop:SetVertexColor(1, 1, 0) +end + +local LootSlot_OnLeave = function(self) + if self.quality and self.quality > 1 then + local color = ITEM_QUALITY_COLORS[self.quality] + self.drop:SetVertexColor(color.r, color.g, color.b) + else + self.drop:Hide() + end + GameTooltip:Hide() + ResetCursor() +end + +local LootSlot_OnClick = function(self) + LootFrame.selectedQuality = self.quality; + LootFrame.selectedItemName = self.name:GetText() + LootFrame.selectedSlot = self:GetID() + LootFrame.selectedLootButton = self:GetName() + LootFrame.selectedTexture = self.icon:GetTexture() + if IsModifiedClick() then + HandleModifiedItemClick(GetLootSlotLink(self:GetID())) + else + StaticPopup_Hide("CONFIRM_LOOT_DISTRIBUTION") + lastID = self:GetID() + lastQuality = self.quality; + lastName = self.name:GetText() + LootSlot(lastID) + end +end + +local LootSlot_OnShow = function(self) + if GameTooltip:IsOwned(self) then + GameTooltip:SetOwner(self, "ANCHOR_RIGHT") + GameTooltip:SetLootItem(self:GetID()) + CursorOnUpdate(self) + end +end + +local function HandleSlots(frame) + local scale = 30; + local counter = 0; + for i = 1, #frame.slots do + local slot = frame.slots[i] + if slot:IsShown() then + counter = counter + 1; + slot:Point("TOP", SVUI_LootFrame, 4, (-8 + scale) - (counter * scale)) + end + end + frame:Height(max(counter * scale + 16, 20)) +end + +local function MakeSlots(id) + local size = LOOT_HEIGHT; + local slot = CreateFrame("Button", "SVUI_LootSlot"..id, SVUI_LootFrame) + slot:Point("LEFT", 8, 0) + slot:Point("RIGHT", -8, 0) + slot:Height(size) + slot:SetID(id) + slot:RegisterForClicks("LeftButtonUp", "RightButtonUp") + slot:SetScript("OnEnter", LootSlot_OnEnter) + slot:SetScript("OnLeave", LootSlot_OnLeave) + slot:SetScript("OnClick", LootSlot_OnClick) + slot:SetScript("OnShow", LootSlot_OnShow) + + slot.iconFrame = CreateFrame("Frame", nil, slot) + slot.iconFrame:Height(size) + slot.iconFrame:Width(size) + slot.iconFrame:SetPoint("RIGHT", slot) + slot.iconFrame:SetPanelTemplate("Transparent") + + slot.icon = slot.iconFrame:CreateTexture(nil, "ARTWORK") + slot.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + slot.icon:FillInner() + + slot.count = slot.iconFrame:CreateFontString(nil, "OVERLAY") + slot.count:SetJustifyH("RIGHT") + slot.count:Point("BOTTOMRIGHT", slot.iconFrame, -2, 2) + slot.count:SetFont(LSM:Fetch("font", "Roboto"), 12, "OUTLINE") + slot.count:SetText(1) + + slot.name = slot:CreateFontString(nil, "OVERLAY") + slot.name:SetJustifyH("LEFT") + slot.name:SetPoint("LEFT", slot) + slot.name:SetPoint("RIGHT", slot.icon, "LEFT") + slot.name:SetNonSpaceWrap(true) + slot.name:SetFont(LSM:Fetch("font", "Roboto"), 12, "OUTLINE") + + slot.drop = slot:CreateTexture(nil, "ARTWORK") + slot.drop:SetTexture("Interface\\QuestFrame\\UI-QuestLogTitleHighlight") + slot.drop:SetPoint("LEFT", slot.icon, "RIGHT", 0, 0) + slot.drop:SetPoint("RIGHT", slot) + slot.drop:SetAllPoints(slot) + slot.drop:SetAlpha(.3) + + slot.questTexture = slot.iconFrame:CreateTexture(nil, "OVERLAY") + slot.questTexture:FillInner() + slot.questTexture:SetTexture(TEXTURE_ITEM_QUEST_BANG) + slot.questTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + + SVUI_LootFrame.slots[id] = slot; + return slot +end + +local function CreateRollButton(rollFrame, type, locale, anchor) + local preset = RollTypePresets[type]; + local rollButton = CreateFrame("Button", nil, rollFrame) + rollButton:Point("LEFT", anchor, "RIGHT", tonumber(preset[4]), tonumber(preset[5])) + rollButton:Size(LOOT_HEIGHT - 4) + rollButton:SetNormalTexture(preset[1]) + if preset[2] and preset[2] ~= "" then + rollButton:SetPushedTexture(preset[2]) + end + rollButton:SetHighlightTexture(preset[3]) + rollButton.rolltype = type; + rollButton.parent = rollFrame; + rollButton.tiptext = locale; + rollButton:SetScript("OnEnter", LootRoll_SetTooltip) + rollButton:SetScript("OnLeave", LootRoll_OnLeave) + rollButton:SetScript("OnClick", DoDaRoll) + rollButton:SetMotionScriptsWhileDisabled(true) + local text = rollButton:CreateFontString(nil, nil) + text:SetFont(LSM:Fetch("font", "Roboto"),14,"OUTLINE") + text:Point("CENTER", 0, ((type == 2 and 1) or (type == 0 and -1.2) or 0)) + return rollButton, text +end + +local function CreateRollFrame() + UpdateLootUpvalues() + local rollFrame = CreateFrame("Frame",nil,SV.Screen) + rollFrame:Size(LOOT_WIDTH,LOOT_HEIGHT) + rollFrame:SetFixedPanelTemplate('Default') + rollFrame:SetScript("OnEvent",LootRoll_OnEvent) + rollFrame:RegisterEvent("CANCEL_LOOT_ROLL") + rollFrame:Hide() + rollFrame.button = CreateFrame("Button",nil,rollFrame) + rollFrame.button:Point("RIGHT",rollFrame,'LEFT',0,0) + rollFrame.button:Size(LOOT_HEIGHT - 2) + rollFrame.button:SetPanelTemplate('Default') + rollFrame.button:SetScript("OnEnter",LootItem_SetTooltip) + rollFrame.button:SetScript("OnLeave",LootItem_OnLeave) + rollFrame.button:SetScript("OnUpdate",LootItem_OnUpdate) + rollFrame.button:SetScript("OnClick",LootRoll_OnClick) + rollFrame.button.icon = rollFrame.button:CreateTexture(nil,'OVERLAY') + rollFrame.button.icon:SetAllPoints() + rollFrame.button.icon:SetTexCoord(0.1,0.9,0.1,0.9 ) + local border = rollFrame:CreateTexture(nil,"BORDER") + border:Point("TOPLEFT",rollFrame,"TOPLEFT",4,0) + border:Point("BOTTOMRIGHT",rollFrame,"BOTTOMRIGHT",-4,0) + border:SetTexture("Interface\\ChatFrame\\ChatFrameBackground") + border:SetBlendMode("ADD") + border:SetGradientAlpha("VERTICAL",.1,.1,.1,0,.1,.1,.1,0) + rollFrame.status=CreateFrame("StatusBar",nil,rollFrame) + rollFrame.status:FillInner() + rollFrame.status:SetScript("OnUpdate",LootRoll_OnUpdate) + rollFrame.status:SetFrameLevel(rollFrame.status:GetFrameLevel() - 1) + rollFrame.status:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + rollFrame.status:SetStatusBarColor(.8,.8,.8,.9) + rollFrame.status.parent = rollFrame; + rollFrame.status.bg = rollFrame.status:CreateTexture(nil,'BACKGROUND') + rollFrame.status.bg:SetAlpha(0.1) + rollFrame.status.bg:SetAllPoints() + rollFrame.status.bg:SetDrawLayer('BACKGROUND',2) + rollFrame.status.spark = rollFrame:CreateTexture(nil,"OVERLAY") + rollFrame.status.spark:Size(LOOT_HEIGHT * 0.5, LOOT_HEIGHT) + rollFrame.status.spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark") + rollFrame.status.spark:SetBlendMode("ADD") + + local needButton,needText = CreateRollButton(rollFrame,1,NEED,rollFrame.button) + local greedButton,greedText = CreateRollButton(rollFrame,2,GREED,needButton,"RIGHT") + local deButton,deText = CreateRollButton(rollFrame,3,ROLL_DISENCHANT,greedButton) + local passButton,passText = CreateRollButton(rollFrame,0,PASS,deButton or greedButton) + rollFrame.NeedIt,rollFrame.WantIt,rollFrame.BreakIt = needButton,greedButton,deButton; + rollFrame.need,rollFrame.greed,rollFrame.pass,rollFrame.disenchant = needText,greedText,passText,deText; + rollFrame.bindText = rollFrame:CreateFontString() + rollFrame.bindText:Point("LEFT",passButton,"RIGHT",3,1) + rollFrame.bindText:SetFont(LSM:Fetch("font", "SVUI Number Font"),14,"OUTLINE") + rollFrame.lootText = rollFrame:CreateFontString(nil,"ARTWORK") + rollFrame.lootText:SetFont(LSM:Fetch("font", "SVUI Number Font"),14,"OUTLINE") + rollFrame.lootText:Point("LEFT",rollFrame.bindText,"RIGHT",0,0) + rollFrame.lootText:Point("RIGHT",rollFrame,"RIGHT",-5,0) + rollFrame.lootText:Size(200,10) + rollFrame.lootText:SetJustifyH("LEFT") + + rollFrame.yourRoll = rollFrame:CreateFontString(nil,"ARTWORK") + rollFrame.yourRoll:SetFont(LSM:Fetch("font", "SVUI Number Font"),18,"OUTLINE") + rollFrame.yourRoll:Size(22,22) + rollFrame.yourRoll:Point("LEFT",rollFrame,"RIGHT",5,0) + rollFrame.yourRoll:SetJustifyH("CENTER") + + rollFrame.rolls = {} + return rollFrame +end + +local function FetchRollFrame() + for _,roll in ipairs(MOD.RollFrames)do + if not roll.rollID then + return roll + end + end + local roll = CreateRollFrame() + roll:Point("TOP", next(MOD.RollFrames) and MOD.RollFrames[#MOD.RollFrames] or SVUI_AlertFrame, "BOTTOM", 0, -4); + tinsert(MOD.RollFrames, roll) + return roll +end +--[[ +########################################################## +CORE FUNCTIONS +########################################################## +]]-- +local AutoConfirmLoot = function(_, event, arg1, arg2, ...) + if event == "CONFIRM_LOOT_ROLL" or event == "CONFIRM_DISENCHANT_ROLL" then + ConfirmLootRoll(arg1, arg2) + StaticPopup_Hide("CONFIRM_LOOT_ROLL") + return + elseif event == "LOOT_BIND_CONFIRM" then + ConfirmLootSlot(arg1, arg2) + StaticPopup_Hide("LOOT_BIND",...) + return + end +end + +local LootSimpleEventsHandler = function(_, event, slot) + if(event == 'LOOT_SLOT_CLEARED') then + if not SVUI_LootFrame:IsShown() then return; end + SVUI_LootFrame.slots[slot]:Hide() + HandleSlots(SVUI_LootFrame) + elseif(event == 'LOOT_CLOSED') then + StaticPopup_Hide("LOOT_BIND") + SVUI_LootFrame:Hide() + for _,slot in pairs(SVUI_LootFrame.slots)do + slot:Hide() + end + elseif(event == 'OPEN_MASTER_LOOT_LIST') then + ToggleDropDownMenu(1, nil, GroupLootDropDown, SVUI_LootFrame.slots[lastID], 0, 0) + elseif(event == 'UPDATE_MASTER_LOOT_LIST') then + MasterLooterFrame_UpdatePlayers() + end +end + +local OpenedLootHandler = function(_, event, autoLoot) + local drops = GetNumLootItems() + if drops > 0 then + SVUI_LootFrame:Show() + else + CloseLoot(autoLoot == 0) + end + + if IsFishingLoot() then + SVUI_LootFrame.title:SetText(L["Fishy Loot"]) + elseif not UnitIsFriend("player", "target") and UnitIsDead"target" then + SVUI_LootFrame.title:SetText(UnitName("target")) + else + SVUI_LootFrame.title:SetText(LOOT) + end + + if GetCVar("lootUnderMouse") == "1" then + local cursorX,cursorY = GetCursorPosition() + cursorX = cursorX / SVUI_LootFrame:GetEffectiveScale() + cursorY = (cursorY / (SVUI_LootFrame:GetEffectiveScale())); + SVUI_LootFrame:ClearAllPoints() + SVUI_LootFrame:SetPoint("TOPLEFT", nil, "BOTTOMLEFT", cursorX - 40, cursorY + 20) + SVUI_LootFrame:GetCenter() + else + SVUI_LootFrame:ClearAllPoints() + SVUI_LootFrame:SetPoint("TOPLEFT", SVUI_LootFrameHolder, "TOPLEFT") + end + + SVUI_LootFrame:Raise() + + local iQuality, nameWidth, titleWidth = 0, 0, SVUI_LootFrame.title:GetStringWidth() + UpdateLootUpvalues() + if drops > 0 then + for i = 1, drops do + local slot = SVUI_LootFrame.slots[i] or MakeSlots(i) + local texture, item, quantity, quality, locked, isQuestItem, questId, isActive = GetLootSlotInfo(i) + local color = ITEM_QUALITY_COLORS[quality] + if texture and texture:find("INV_Misc_Coin") then + item = item:gsub("\n", ", ") + end + if quantity and quantity > 1 then + slot.count:SetText(quantity) + slot.count:Show() + else + slot.count:Hide() + end + if quality and quality > 1 then + slot.drop:SetVertexColor(color.r, color.g, color.b) + slot.drop:Show() + else + slot.drop:Hide() + end + slot.quality = quality; + slot.name:SetText(item) + if color then + slot.name:SetTextColor(color.r, color.g, color.b) + end + slot.icon:SetTexture(texture) + if quality then + iQuality = max(iQuality, quality) + end + nameWidth = max(nameWidth, slot.name:GetStringWidth()) + local qTex = slot.questTexture; + if questId and not isActive then + qTex:Show() + ActionButton_ShowOverlayGlow(slot.iconFrame) + elseif questId or isQuestItem then + qTex:Hide() + ActionButton_ShowOverlayGlow(slot.iconFrame) + else + qTex:Hide() + ActionButton_HideOverlayGlow(slot.iconFrame) + end + slot:Enable() + slot:Show() + ConfirmLootSlot(i) + end + else + local slot = SVUI_LootFrame.slots[1] or MakeSlots(1) + local color = ITEM_QUALITY_COLORS[0] + slot.name:SetText(L["Empty Slot"]) + if color then + slot.name:SetTextColor(color.r, color.g, color.b) + end + slot.icon:SetTexture[[Interface\Icons\INV_Misc_Herb_AncientLichen]] + drops = 1; + nameWidth = max(nameWidth, slot.name:GetStringWidth()) + slot.count:Hide() + slot.drop:Hide() + slot:Disable() + slot:Show() + end + + HandleSlots(SVUI_LootFrame) + nameWidth = nameWidth + 60; + titleWidth = titleWidth + 5; + local color = ITEM_QUALITY_COLORS[iQuality] + SVUI_LootFrame:SetBackdropBorderColor(color.r, color.g, color.b, .8) + SVUI_LootFrame:Width(max(nameWidth, titleWidth)) +end + +local LootComplexEventsHandler = function(_, event, arg1, arg2) + if(event == "START_LOOT_ROLL") then + if dead_rollz[arg1] then return end + local texture,name,count,quality,bindOnPickUp,canNeed,canGreed,canBreak = GetLootRollItemInfo(arg1); + local color = ITEM_QUALITY_COLORS[quality]; + local rollFrame = FetchRollFrame(); + rollFrame.rollID = arg1; + rollFrame.time = arg2; + for i in pairs(rollFrame.rolls)do + rollFrame.rolls[i] = nil + end + rollFrame.need:SetText(0) + rollFrame.greed:SetText(0) + rollFrame.pass:SetText(0) + rollFrame.disenchant:SetText(0) + rollFrame.button.icon:SetTexture(texture) + rollFrame.button.link = GetLootRollItemLink(arg1) + if canNeed then + rollFrame.NeedIt:Enable() + rollFrame.NeedIt:SetAlpha(1) + else + rollFrame.NeedIt:SetAlpha(0.2) + rollFrame.NeedIt:Disable() + end + if canGreed then + rollFrame.WantIt:Enable() + rollFrame.WantIt:SetAlpha(1) + else + rollFrame.WantIt:SetAlpha(0.2) + rollFrame.WantIt:Disable() + end + if canBreak then + rollFrame.BreakIt:Enable() + rollFrame.BreakIt:SetAlpha(1) + else + rollFrame.BreakIt:SetAlpha(0.2) + rollFrame.BreakIt:Disable() + end + SetDesaturation(rollFrame.NeedIt:GetNormalTexture(),not canNeed) + SetDesaturation(rollFrame.WantIt:GetNormalTexture(),not canGreed) + SetDesaturation(rollFrame.BreakIt:GetNormalTexture(),not canBreak) + rollFrame.bindText:SetText(bindOnPickUp and "BoP" or "BoE") + rollFrame.bindText:SetVertexColor(bindOnPickUp and 1 or 0.3, bindOnPickUp and 0.3 or 1, bindOnPickUp and 0.1 or 0.3) + rollFrame.lootText:SetText(name) + rollFrame.yourRoll:SetText("") + rollFrame.status:SetStatusBarColor(color.r,color.g,color.b,0.7) + rollFrame.status.bg:SetTexture(color.r,color.g,color.b) + rollFrame.status:SetMinMaxValues(0,arg2) + rollFrame.status:SetValue(arg2) + rollFrame:SetPoint("CENTER",WorldFrame,"CENTER") + rollFrame:Show() + AlertFrame_FixAnchors() + 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 + RollOnLoot(arg1,2) + end + end + elseif(event == "LOOT_HISTORY_ROLL_CHANGED") then + local rollID,_,_,_,_,_ = C_LootHistory.GetItem(arg1); + local name,_,rollType,rollResult,_ = C_LootHistory.GetPlayerInfo(arg1,arg2); + if name and rollType then + for _,roll in ipairs(MOD.RollFrames)do + if roll.rollID == rollID then + roll.rolls[name] = rollType; + roll[LootRollType[rollType]]:SetText(tonumber(roll[LootRollType[rollType]]:GetText()) + 1); + return + end + if rollResult then + roll.yourRoll:SetText(tostring(rollResult)) + end + end + end + end +end + +_G.GroupLootDropDown_GiveLoot = function(self) + if lastQuality >= MASTER_LOOT_THREHOLD then + local confirmed = SV:StaticPopup_Show("CONFIRM_LOOT_DISTRIBUTION",ITEM_QUALITY_COLORS[lastQuality].hex..lastName..FONT_COLOR_CODE_CLOSE,self:GetText()); + if confirmed then confirmed.data = self.value end + else + GiveMasterLoot(lastID, self.value) + end + CloseDropDownMenus() + SV.SystemAlert["CONFIRM_LOOT_DISTRIBUTION"].OnAccept = function(self,index) GiveMasterLoot(lastID,index) end +end +--[[ +########################################################## +PACKAGE CALL +########################################################## +]]-- +function MOD:SetLootFrames() + UIPARENT_MANAGED_FRAME_POSITIONS["GroupLootContainer"] = nil; + LootFrame:UnregisterAllEvents(); + + SVUI_LootFrameHolder:Size(150, 22); + SV.Mentalo:Add(SVUI_LootFrameHolder, L["Loot Frame"], nil, nil, "SVUI_LootFrame"); + + SVUI_LootFrame:Size(256, 64); + SVUI_LootFrame:SetFixedPanelTemplate('Transparent'); + SVUI_LootFrame.title:SetFont(LSM:Fetch("font", "SVUI Number Font"),18,"OUTLINE") + SV:AddToDisplayAudit(SVUI_LootFrame); + SVUI_LootFrame:Hide(); + + UIParent:UnregisterEvent("LOOT_BIND_CONFIRM") + UIParent:UnregisterEvent("CONFIRM_DISENCHANT_ROLL") + UIParent:UnregisterEvent("CONFIRM_LOOT_ROLL") + + self:RegisterEvent("CONFIRM_DISENCHANT_ROLL", AutoConfirmLoot) + self:RegisterEvent("CONFIRM_LOOT_ROLL", AutoConfirmLoot) + self:RegisterEvent("LOOT_BIND_CONFIRM", AutoConfirmLoot) + self:RegisterEvent("LOOT_READY", OpenedLootHandler) + self:RegisterEvent("LOOT_SLOT_CLEARED", LootSimpleEventsHandler); + self:RegisterEvent("LOOT_CLOSED", LootSimpleEventsHandler); + self:RegisterEvent("OPEN_MASTER_LOOT_LIST", LootSimpleEventsHandler); + self:RegisterEvent("UPDATE_MASTER_LOOT_LIST", LootSimpleEventsHandler); + + if SV.db.SVOverride.lootRoll then + self:RegisterEvent("LOOT_HISTORY_ROLL_CHANGED", LootComplexEventsHandler); + self:RegisterEvent("START_LOOT_ROLL", LootComplexEventsHandler); + UIParent:UnregisterEvent("START_LOOT_ROLL"); + UIParent:UnregisterEvent("CANCEL_LOOT_ROLL"); + end +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/override/components/mirror.lua b/Interface/AddOns/SVUI/packages/override/components/mirror.lua new file mode 100644 index 0000000..ffd24a0 --- /dev/null +++ b/Interface/AddOns/SVUI/packages/override/components/mirror.lua @@ -0,0 +1,191 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local assert = _G.assert; +local type = _G.type; +local error = _G.error; +local pcall = _G.pcall; +local print = _G.print; +local ipairs = _G.ipairs; +local pairs = _G.pairs; +local next = _G.next; +local rawset = _G.rawset; +local rawget = _G.rawget; +local tostring = _G.tostring; +local tonumber = _G.tonumber; +local tinsert = _G.tinsert; +local string = _G.string; +local math = _G.math; +--[[ STRING METHODS ]]-- +local find, format, len, split = string.find, string.format, string.len, string.split; +--[[ MATH METHODS ]]-- +local abs, ceil, floor, round, max = math.abs, math.ceil, math.floor, math.round, math.max; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = select(2, ...) +local L = SV.L +local LSM = LibStub("LibSharedMedia-3.0") +local MOD = SV.SVOverride; +--[[ +########################################################## +LOCAL VARS +########################################################## +]]-- +local mirrorYOffset={ + ["BREATH"] = 96, + ["EXHAUSTION"] = 119, + ["FEIGNDEATH"] = 142 +} +local mirrorTypeColor={ + EXHAUSTION = {1,.9,0}, + BREATH = {0.31,0.45,0.63}, + DEATH = {1,.7,0}, + FEIGNDEATH = {1,.7,0} +} +local RegisteredMirrorBars = {} +--[[ +########################################################## +MIRROR BARS +########################################################## +]]-- +local SetMirrorPosition = function(bar) + local yOffset = mirrorYOffset[bar.type] + return bar:Point("TOP", SV.Screen, "TOP", 0, -yOffset) +end + +local MirrorBar_OnUpdate = function(self, elapsed) + if self.paused then + return + end + self.lastupdate = (self.lastupdate or 0) + elapsed; + if self.lastupdate < .1 then + return + end + self.lastupdate = 0; + self:SetValue(GetMirrorTimerProgress(self.type) / 1e3) +end + +local MirrorBar_Start = function(self, min, max, s, t, text) + if t > 0 then + self.paused = 1 + elseif self.paused then + self.paused = nil + end + self.text:SetText(text) + self:SetMinMaxValues(0, max / 1e3) + self:SetValue(min / 1e3) + if not self:IsShown() then + self:Show() + end +end + + +local function MirrorBarRegistry(barType) + if RegisteredMirrorBars[barType] then + return RegisteredMirrorBars[barType] + end + local bar = CreateFrame('StatusBar', nil, SV.Screen) + bar:SetPanelTemplate("Bar", false, 3, 3, 3) + bar:SetScript("OnUpdate", MirrorBar_OnUpdate) + local r, g, b = unpack(mirrorTypeColor[barType]) + bar.text = bar:CreateFontString(nil, 'OVERLAY') + bar.text:FontManager(SV.Media.font.roboto, 12, 'OUTLINE') + bar.text:SetJustifyH('CENTER') + bar.text:SetTextColor(1, 1, 1) + bar.text:SetPoint('LEFT', bar) + bar.text:SetPoint('RIGHT', bar) + bar.text:Point('TOP', bar, 0, 2) + bar.text:SetPoint('BOTTOM', bar) + bar:Size(222, 18) + bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + bar:SetStatusBarColor(r, g, b) + bar.type = barType; + bar.Start = MirrorBar_Start; + SetMirrorPosition(bar) + RegisteredMirrorBars[barType] = bar; + return bar +end + +local function SetTimerStyle(bar) + for i=1, bar:GetNumRegions()do + local child = select(i, bar:GetRegions()) + if child:GetObjectType() == "Texture"then + child:SetTexture(0,0,0,0) + elseif child:GetObjectType() == "FontString" then + child:FontManager(SV.Media.font.roboto, 12, 'OUTLINE') + end + end + bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + bar:SetStatusBarColor(0.37, 0.92, 0.08) + bar:SetPanelTemplate("Bar", false, 3, 3, 3) +end + +local MirrorBarToggleHandler = function(_, event, arg, ...) + if(event == "START_TIMER") then + for _,timer in pairs(TimerTracker.timerList)do + if timer["bar"] and not timer["bar"].styled then + SetTimerStyle(timer["bar"]) + timer["bar"].styled = true + end + end + elseif(event == "MIRROR_TIMER_START") then + return MirrorBarRegistry(arg):Start(...) + elseif(event == "MIRROR_TIMER_STOP") then + return MirrorBarRegistry(arg):Hide() + elseif(event == "MIRROR_TIMER_PAUSE") then + local pausedValue = (arg > 0 and arg or nil); + for barType,bar in next,RegisteredMirrorBars do + bar.paused = pausedValue; + end + end +end + +local MirrorBarUpdateHandler = function(_, event) + if not GetCVarBool("lockActionBars") and SV.db.SVBar.enable then + SetCVar("lockActionBars", 1) + end + if(event == "PLAYER_ENTERING_WORLD") then + for i = 1, MIRRORTIMER_NUMTIMERS do + local v, q, r, s, t, u = GetMirrorTimerInfo(i) + if v ~= "UNKNOWN"then + MirrorBarRegistry(v):Start(q, r, s, t, u) + end + end + end +end +--[[ +########################################################## +PACKAGE CALL +########################################################## +]]-- +function MOD:SetMirrorBars() + UIParent:UnregisterEvent("MIRROR_TIMER_START") + self:RegisterEvent("CVAR_UPDATE", MirrorBarUpdateHandler) + self:RegisterEvent("PLAYER_ENTERING_WORLD", MirrorBarUpdateHandler) + self:RegisterEvent("MIRROR_TIMER_START", MirrorBarToggleHandler) + self:RegisterEvent("MIRROR_TIMER_STOP", MirrorBarToggleHandler) + self:RegisterEvent("MIRROR_TIMER_PAUSE", MirrorBarToggleHandler) + self:RegisterEvent("START_TIMER", MirrorBarToggleHandler) +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua index 4e0824e..c871863 100644 --- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua +++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua @@ -473,7 +473,7 @@ local _hook_GameTooltipStatusBar_OnValueChanged = function(self, value) end local _hook_GameTooltip_OnTooltipSetItem = function(self) - local key,itemID = self:GetItem() + local key,itemLink = self:GetItem() if(key and (not self.itemCleared)) then self.SuperBorder:ClearMaskColors() @@ -483,11 +483,11 @@ local _hook_GameTooltip_OnTooltipSetItem = function(self) self.SuperBorder:SetToneColor(r,g,b) end - if itemID ~= nil and SV.db.SVTip.spellID then + if itemLink ~= nil and SV.db.SVTip.spellID then self:AddLine(" ") left = "|cFFCA3C3CSpell ID: |r" - local tipID = ("|cFFCA3C3C%s|r %s"):format(ID,itemID):match(":(%w+)") - self:AddDoubleLine("|cFFCA3C3CSpell ID: |r", tipID) + local itemID = ("|cFFCA3C3C%s|r %s"):format(left, itemLink):match(":(%w+)") + self:AddDoubleLine("|cFFCA3C3CSpell ID: |r", itemID) end if(self.InjectedDouble[8]) then diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua index 1e588fb..9085efb 100644 --- a/Interface/AddOns/SVUI/system/alerts.lua +++ b/Interface/AddOns/SVUI/system/alerts.lua @@ -177,7 +177,7 @@ SV.SystemAlert["DISBAND_RAID"] = { text = L["Are you sure you want to disband the group?"], button1 = ACCEPT, button2 = CANCEL, - OnAccept = function() SV.SVOverride:DisbandRaidGroup() end, + OnAccept = function() SV:DisbandRaidGroup() end, timeout = 0, whileDead = 1, }; diff --git a/Interface/AddOns/SVUI/system/core.lua b/Interface/AddOns/SVUI/system/core.lua index 29847c2..7919e48 100644 --- a/Interface/AddOns/SVUI/system/core.lua +++ b/Interface/AddOns/SVUI/system/core.lua @@ -35,6 +35,7 @@ local getmetatable = _G.getmetatable; local setmetatable = _G.setmetatable; --STRING local string = _G.string; +local split = string.split; local upper = string.upper; local format = string.format; local find = string.find; @@ -124,6 +125,27 @@ local function _sendmessage(msg, prefix) end end + +local function _needsupdate(value, lowest) + local minimumVersion = 5; + --print(table.dump(self.safedata)) + local version = value or '0.0'; + local vt = version:explode(".") + local MAJOR,MINOR,PATCH = unpack(vt) + if(MAJOR) then + if(type(MAJOR) == "string") then + MAJOR = tonumber(MAJOR) + end + if(type(MAJOR) == "number" and MAJOR < lowest) then + return true + else + return false + end + else + return true + end +end + --[[ CLASS COLOR LOCALS ]]-- local function RegisterCallback(self, m, h) @@ -212,7 +234,7 @@ end -- We have to send the names of our three SavedVariables files since the WoW API -- has no method for parsing them in LUA. -local SVUI = SVLib:NewCore("SVUI_Global", "SVUI_Errors", "SVUI_Profile", "SVUI_Cache") +local SVUI = SVLib:NewCore("SVUI_Global", "SVUI_Errors", "SVUI_Profile", "SVUI_Cache", "SVUI_Filters", "SVUI_Layouts") SVUI.ConfigID = "SVUI_ConfigOMatic"; SVUI.class = playerClass; @@ -364,7 +386,7 @@ function SVUI:ToggleConfig() if state ~= "MISSING" and state ~= "DISABLED" then LoadAddOn(self.ConfigID) local config_version = GetAddOnMetadata(self.ConfigID, "Version") - if(tonumber(config_version) < 4) then + if(_needsupdate(config_version, 5)) then self:StaticPopup_Show("CLIENT_UPDATE_REQUEST") end else @@ -380,18 +402,8 @@ function SVUI:ToggleConfig() end function SVUI:VersionCheck() - local minimumVersion = 5.0; - --print(table.dump(self.safedata)) - local installedVersion = self.safedata.install_version; - if(installedVersion) then - if(type(installedVersion) == "string") then - installedVersion = tonumber(installedVersion) - end - if(type(installedVersion) == "number" and installedVersion < minimumVersion) then - --_removedeprecated() -- No current deprecated entries to remove - self.Setup:Install(true) - end - else + local version = self.safedata.install_version; + if(_needsupdate(version, 5)) then self.Setup:Install(true) end end diff --git a/Interface/AddOns/SVUI/system/credits.lua b/Interface/AddOns/SVUI/system/credits.lua index 51781e3..3c2db82 100644 --- a/Interface/AddOns/SVUI/system/credits.lua +++ b/Interface/AddOns/SVUI/system/credits.lua @@ -28,20 +28,9 @@ local L = SV.L; --[[ CODING CREDITS ]]-- local contributors = { - "Azilroka", - "Sortokk", - "Kkthnx", - "AlleyKat", - "Quokka", - "Duugu", - "Zork", - "Haleth", - "P3lim", - "Haste", - "Totalpackage", - "Kryso", - "Thepilli", - "Phanx" + "Azilroka, Sortokk, Kkthnx, AlleyKat", + "Quokka, Duugu, Zork, Haleth, P3lim", + "Haste, Totalpackage, Kryso, Thepilli, Phanx" }; local coderList = ""; @@ -53,35 +42,31 @@ end --[[ DONATION CREDITS ]]-- local donations = { - "Movster", - "Cazart506", - "FaolanKing", - "Doonga", - "Meggalo", - "Penguinsane", - "Moondoggy", - "Necroo", - "Chief Pullin", - "lkj61", - "BloodEagle", - "Egbert", + "Movster, Penguinsane, FaolanKing, Doonga, Meggalo", + "Cazart506, Moondoggy, Necroo, Chief Pullin, lkj61", + "BloodEagle, Egbert, Jerry Ferguson, Hyti, Elton", + "James Watson, Lathron, Adam Vargas, Daphne, Dave (Naméra)", + "Soulkrusher-Shu-Halo, Talirrine, Gaeline, Malinche, StealthyMangos", + "Monger, JoeyMagz", "Other Silent Partners.. (Let me know if I have forgotten you)" }; local donorList = ""; -for _, name in pairs(contributors) do +for _, name in pairs(donations) do donorList = ("%s\n%s"):format(donorList, name) end +--[[ TEAM CREDITS ]]-- + +local teamList = "\n|cff33FF33DOONGA|r - (The man who keeps me busy)\n|cff33FF33PENGUINSANE|r - (The ace up my sleeve)"; + --[[ TESTER CREDITS ]]-- -local testers = { - "Sinnisterr - (My wife, the MOST ruthless Warlock you will ever meet)", - "Doonga - (The man who keeps me busy)", - "Daigan - (My current 2nd in command)", - "Penguinsane - (Tester extraordinaire)", - "FaolanKing - (King of the bug report portal)" +local testers = { + "Sinnisterr - (My wife, the MOST ruthless Warlock you will ever meet!)", + "Daigan - (Quality control with NO MERCY!)", + "FaolanKing - (King of the bug report portal)", }; local testerList = ""; @@ -93,31 +78,11 @@ end --[[ COMMUNITY CREDITS ]]-- local community = { - "Movster", - "Judicate", - "Cazart506", - "MuffinMonster", - "Joelsoul", - "Trendkill09", - "Luamar", - "Zharooz", - "Lyn3x5", - "Madh4tt3r", - "Xarioth", - "AtomicKiller", - "Meljen", - "Moondoggy", - "Stormblade", - "Schreibstift", - "Anj", - "Risien", - "Cromax", - "Nitro_Turtle", - "Shinzou", - "Autolykus", - "Taotao", - "ColorsGaming", - "Necroo", + "Movster, Judicate, Cazart506, MuffinMonster, Joelsoul", + "Trendkill09, Luamar, Zharooz, Lyn3x5, Madh4tt3r", + "Xarioth, AtomicKiller, Meljen, Moondoggy, Stormblade", + "Schreibstift, Anj, Risien, Cromax, Nitro_Turtle", + "Shinzou, Autolykus, Taotao, ColorsGaming, Necroo", "The Wowinterface Community", }; @@ -129,22 +94,20 @@ end --[[ BUILD STRING ]]-- -local creditHeader = "|cffff9900SUPERVILLAIN CREDITS:|r\n|cff4f4f4f---------------------------------------------|r\n|cffff9900CREATED BY:|r Munglunch\n|cff4f4f4f---------------------------------------------|r\n|cffff9900CODE GRANTS BY:|r Azilroka, Sortokk, Kkthnx\n|cff4f4f4f---------------------------------------------|r\n"; - -local creditThanks1 = "|cffff9900SPECIAL THANKS TO: |r|cfff81422Cairenn|r |cff2288cc(@WowInterface.com)|r ..the most patient and accomodating person I know!\n\n"; +local creditHeader = "|cffff9900SUPERVILLAIN CREDITS:|r\n|cff4f4f4f---------------------------------------------|r\n|cffff9900CREATED BY:|r Munglunch\n|cff4f4f4f---------------------------------------------|r\n|cffff9900CODE GRANTS BY:|r Azilroka, Sortokk, Kkthnx\n|cff4f4f4f---------------------------------------------|r\n|cffff9900SPECIAL THANKS TO: |r|cfff81422Cairenn|r |cff2288cc(@WowInterface.com)|r ..the most patient and accomodating person I know!\n\n|cffff9900A VERY SPECIAL THANKS TO: |r|cffffff00Movster|r ..who inspired me to bring this project back to life!\n|cff4f4f4f---------------------------------------------|r\n\n"; -local creditThanks2 = "|cffff9900A VERY SPECIAL THANKS TO: |r|cffffff00Movster|r ..who inspired me to bring this project back to life!\n|cff4f4f4f---------------------------------------------|r\n"; +local creditTeam = ("|cffFFFF00THE HIGH COUNCIL (aka EXECUTIVES):|r\n%s\n|cff4f4f4f---------------------------------------------|r\n\n"):format(teamList); -local creditCoders = ("|cff3399ffCODE MONKEYS (aka CONTRIBUTORS):|r%s\n|cff4f4f4f---------------------------------------------|r\n"):format(coderList); +local creditCoders = ("|cff3399ffCODE MONKEYS (aka CONTRIBUTORS):|r\n%s\n|cff4f4f4f---------------------------------------------|r\n\n"):format(coderList); -local creditDonations = ("|cff99ff33KINGPINS (aka INVESTORS):|r%s\n|cff4f4f4f---------------------------------------------|r\n"):format(donorList); +local creditDonations = ("|cff99ff33KINGPINS (aka INVESTORS):|r\n%s\n|cff4f4f4f---------------------------------------------|r\n\n"):format(donorList); -local creditTesters = ("|cffaa33ffPERFECTIONISTS (aka CORE TESTING TEAM):|r%s\n|cff4f4f4f---------------------------------------------|r\n"):format(testerList); +local creditTesters = ("|cffaa33ffPERFECTIONISTS (aka TESTING TEAM):|r\n%s\n|cff4f4f4f---------------------------------------------|r\n\n"):format(testerList); -local creditCommunity = ("|cffaa33ffMINIONS (aka COMMUNITY TESTERS):|r%s\n|cff4f4f4f---------------------------------------------|r\n"):format(communityList); +local creditCommunity = ("|cffaa33ffMINIONS (aka COMMUNITY TESTERS):|r\n%s\n|cff4f4f4f---------------------------------------------|r\n\n"):format(communityList); local creditMusic = "|cff00ccffTheme Song By: Fingathing [taken from the song: SuperHero Music]|r"; --[[ FINAL CREDITS STRING ]]-- -SV.Credits = creditHeader .. creditThanks1 .. creditThanks2 .. creditCoders .. creditDonations .. creditTesters .. creditCommunity .. creditMusic; \ No newline at end of file +SV.Credits = creditHeader .. creditTeam .. creditDonations .. creditCoders .. creditTesters .. creditCommunity .. creditMusic; \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/utilities.lua b/Interface/AddOns/SVUI/system/utilities.lua index 28fdc95..499ce24 100644 --- a/Interface/AddOns/SVUI/system/utilities.lua +++ b/Interface/AddOns/SVUI/system/utilities.lua @@ -55,6 +55,7 @@ MISC UTILITY FUNCTIONS ]]-- local RefClassRoles, RefUnitRoles; local PlayerClass = select(2,UnitClass("player")); +local PlayerName = UnitName("player"); if(PlayerClass == "PRIEST") then RefClassRoles = {"C", "C", "C"} @@ -91,6 +92,25 @@ elseif(PlayerClass == "PALADIN") then RefUnitRoles = {"HEALER", "TANK", "DAMAGER"} end +function SV:DisbandRaidGroup() + if InCombatLockdown() then return end + if UnitInRaid("player") then + for i = 1, GetNumGroupMembers() do + local name, _, _, _, _, _, _, online = GetRaidRosterInfo(i) + if(online and (name ~= PlayerName)) then + UninviteUnit(name) + end + end + else + for i = MAX_PARTY_MEMBERS, 1, -1 do + if UnitExists("party"..i) then + UninviteUnit(UnitName("party"..i)) + end + end + end + LeaveParty() +end + function SV:PlayerInfoUpdate() local spec = GetSpecialization() local role, unitRole; diff --git a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc index 2d0f165..ffd45ef 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc +++ b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.2 +## Version: 5.3.0 ## Title: |cffFF9900SVUI |r|cffFFEF00Chat-O-Matic|r ## Notes: Supervillain UI [|cff9911FFVarious Chat Gadgets|r] ## SavedVariables: ChatOMatic_Data diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua index facc34f..6de51fd 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua @@ -233,23 +233,15 @@ SV.Options.args.common = { get = function(j)return SV.db.general.multiMonitor end, set = function(j,value)SV.db.general.multiMonitor = value;SV:StaticPopup_Show("RL_CLIENT")end }, - hideErrorFrame = { - order = 3, - name = L["Hide Error Text"], - desc = L["Hides the red error text at the top of the screen while in combat."], - type = "toggle", - get = function(j)return SV.db.general.hideErrorFrame end, - set = function(j,value)SV.db.general.hideErrorFrame = value;SV:StaticPopup_Show("RL_CLIENT")end - }, LoginMessage = { - order = 4, + order = 3, type = 'toggle', name = L['Login Message'], get = function(j)return SV.db.general.loginmessage end, set = function(j,value)SV.db.general.loginmessage = value end }, scaleAdjust = { - order = 5, + order = 4, name = L["Base Scale"], desc = L["You can use this to adjust the base value applied to auto-scaling."], type = "range", @@ -852,12 +844,56 @@ SV.Options.args.common = { } } } - } + }, + errors = { + order = 4, + type = "group", + name = L["Error Handling"], + args = { + filterErrors = { + order = 1, + name = L["Filter Errors"], + desc = L["Choose specific errors from the list below to hide/ignore"], + type = "toggle", + get = function(j)return SV.db.SVOverride.filterErrors end, + set = function(j,value)SV.db.SVOverride.filterErrors = value; SV:StaticPopup_Show("RL_CLIENT") end + }, + hideErrorFrame = { + order = 2, + name = L["Hide Error Text"], + desc = L["Hides the red error text at the top of the screen while in combat."], + type = "toggle", + get = function(j)return SV.db.SVOverride.hideErrorFrame end, + set = function(j,value)SV.db.SVOverride.hideErrorFrame = value; SV:StaticPopup_Show("RL_CLIENT") end + }, + filterGroup = { + order = 3, + type = "group", + guiInline = true, + name = L["Filters"], + args = {} + }, + } + }, }, }, } }; +if(SV.db.SVOverride.errorFilters) then + local listIndex = 1 + for errorName, state in pairs(SV.db.SVOverride.errorFilters) do + SV.Options.args.common.args.commonGroup.args.errors.args.filterGroup.args[errorName] = { + order = listIndex, + type = 'toggle', + name = errorName, + get = function(key) return SV.db.SVOverride.errorFilters[errorName]; end, + set = function(key,value) SV.db.SVOverride.errorFilters[errorName] = value; end + } + listIndex = listIndex + 1 + end +end + SV.Options.args.credits = { type = "group", name = L["Credits"], diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc index cc6419b..ee3c16e 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.2 +## Version: 5.3.0 ## Title: |cffFF9900SVUI |r|cffFFEF00Config-O-Matic|r ## Notes: Supervillain UI [|cff9911FFConfig Options|r] ## RequiredDeps: SVUI diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc index 1346fba..ddc3e84 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc +++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.2 +## Version: 5.3.0 ## Title: |cffFF9900SVUI |r|cffFFEF00Craft-O-Matic|r ## Notes: Supervillain UI [|cff9911FFProfession Tools|r]. ## SavedVariablesPerCharacter: CraftOMatic_Profile, CraftOMatic_Cache diff --git a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc index cf4006d..3cf06a7 100644 --- a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc +++ b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.2 +## Version: 5.3.0 ## Title: |cffFF9900SVUI |r|cffFFEF00Fight-O-Matic|r ## Notes: Supervillain UI [|cff9911FFPvP Tools|r]. ## SavedVariablesPerCharacter: FightOMatic_Profile, FightOMatic_Cache diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc index dadff82..1ac4962 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.2 +## Version: 5.3.0 ## Title: |cffFF9900SVUI |r|cffFFEF00Log-O-Matic|r ## Notes: Supervillain UI [|cff9911FFData Logging|r]. ## SavedVariables: LogOMatic_Data diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc index 69bb70d..e86e29c 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch, Azilroka, Sortokk -## Version: 5.2 +## Version: 5.3.0 ## Title: |cffFF9900SVUI |r|cffFFEF00Style-O-Matic|r ## Notes: Supervillain UI [|cff9911FFAddon Skins|r]. ## SavedVariables: StyleOMatic_Global diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua index 6209a24..ea70ce2 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua @@ -426,10 +426,12 @@ local function AlertStyle() frame.SetAlpha = AlphaBlock frame:DisableDrawLayer("BACKGROUND") - PLUGIN:ApplyItemAlertStyle(frame, true) + PLUGIN:ApplyItemAlertStyle(frame) frame.IconBG:ClearAllPoints() - frame.IconBG:SetPoint("LEFT", frame.AlertPanel, "LEFT", 10, 0) + frame.IconBG:SetPoint("CENTER", frame.AlertPanel.icon, "CENTER", 0, 0) frame.IconBG:SetTexture('') + frame.MissionType:ClearAllPoints() + frame.MissionType:SetPoint("CENTER", frame.AlertPanel.icon, "CENTER", 0, 0) frame.Title:SetTextColor(1, 1, 1) if(_G[frameName .. 'Glow']) then _G[frameName .. 'Glow']:Die() end @@ -446,9 +448,9 @@ local function AlertStyle() frame.SetAlpha = AlphaBlock frame:DisableDrawLayer("BACKGROUND") - PLUGIN:ApplyItemAlertStyle(frame, true) + PLUGIN:ApplyItemAlertStyle(frame) frame.Icon:ClearAllPoints() - frame.Icon:SetPoint("LEFT", frame.AlertPanel, "LEFT", 10, 0) + frame.Icon:SetPoint("CENTER", frame.AlertPanel.icon, "CENTER", 0, 0) frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) frame.Title:SetTextColor(1, 1, 1) diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/garrison.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/garrison.lua index 65658a8..c203ab4 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/garrison.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/garrison.lua @@ -44,6 +44,18 @@ local function AddFadeBanner(frame) bg:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 0.9) end +local function StyleFollowerPortrait(frame) + frame.PortraitRing:SetTexture(RING_TEXTURE) + frame.PortraitRingQuality:SetTexture('') + frame.LevelBorder:SetTexture('') + if(not frame.LevelCallout) then + frame.LevelCallout = frame:CreateTexture(nil, 'BORDER', 4) + frame.LevelCallout:SetAllPoints(frame) + frame.LevelCallout:SetTexture(LVL_TEXTURE) + frame.LevelBorder:SetDrawLayer('OVERLAY') + end +end + local _hook_ReagentUpdate = function(self) local reagents = GarrisonCapacitiveDisplayFrame.CapacitiveDisplay.Reagents; for i = 1, #reagents do @@ -75,18 +87,11 @@ local _hook_GarrisonFollowerListUpdate = function(self) button:RemoveTextures() button:SetPanelTemplate('Blackout', true, 1, 0, 0) if(button.PortraitFrame) then - --button.PortraitFrame.PortraitRing:ClearAllPoints() - --button.PortraitFrame.PortraitRing:SetPoint("TOPLEFT", button.PortraitFrame, "TOPLEFT", -10, 10) - --button.PortraitFrame.PortraitRing:SetPoint("BOTTOMRIGHT", button.PortraitFrame, "BOTTOMRIGHT", 10, 0) - button.PortraitFrame.PortraitRing:SetTexture(RING_TEXTURE) - button.PortraitFrame.PortraitRingQuality:SetTexture('') - button.PortraitFrame.LevelBorder:SetTexture('') - if(not button.PortraitFrame.LevelCallout) then - button.PortraitFrame.LevelCallout = button.PortraitFrame:CreateTexture(nil, 'BORDER', 4) - button.PortraitFrame.LevelCallout:SetAllPoints(button.PortraitFrame) - button.PortraitFrame.LevelCallout:SetTexture(LVL_TEXTURE) - button.PortraitFrame.LevelBorder:SetDrawLayer('OVERLAY') - end + StyleFollowerPortrait(button.PortraitFrame) + end + if(button.XPBar) then + button.XPBar:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) + button.XPBar:SetGradient('HORIZONTAL', 0.5, 0, 1, 1, 0, 1) end end if(button.PortraitFrame) then @@ -101,6 +106,17 @@ local _hook_GarrisonFollowerListUpdate = function(self) end end +local _hook_GarrisonMissionFrame_SetFollowerPortrait = function(portraitFrame, followerInfo) + StyleFollowerPortrait(portraitFrame) + local color = ITEM_QUALITY_COLORS[followerInfo.quality]; + portraitFrame.PortraitRing:SetVertexColor(color.r, color.g, color.b) +end + +local _hook_GarrisonMissionComplete_SetFollowerLevel = function(followerFrame, level, quality) + local color = ITEM_QUALITY_COLORS[quality]; + followerFrame.PortraitFrame.PortraitRing:SetVertexColor(color.r, color.g, color.b) +end + local _hook_GarrisonFollowerPage_ShowFollower = function(self, followerID) local followerInfo = C_Garrison.GetFollowerInfo(followerID); if(not self.XPBar.Panel) then @@ -108,23 +124,6 @@ local _hook_GarrisonFollowerPage_ShowFollower = function(self, followerID) self.XPBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) self.XPBar:SetFixedPanelTemplate("Bar") end - - if(self.PortraitFrame) then - local color = ITEM_QUALITY_COLORS[followerInfo.quality]; - --self.PortraitFrame.PortraitRing:ClearAllPoints() - --self.PortraitFrame.PortraitRing:SetPoint("TOPLEFT", self.PortraitFrame, "TOPLEFT", -10, 10) - --self.PortraitFrame.PortraitRing:SetPoint("BOTTOMRIGHT", self.PortraitFrame, "BOTTOMRIGHT", 10, 0) - self.PortraitFrame.PortraitRing:SetTexture(RING_TEXTURE) - self.PortraitFrame.PortraitRingQuality:SetTexture('') - self.PortraitFrame.LevelBorder:SetTexture('') - if(not self.PortraitFrame.LevelCallout) then - self.PortraitFrame.LevelCallout = self.PortraitFrame:CreateTexture(nil, 'BORDER', 4) - self.PortraitFrame.LevelCallout:SetAllPoints(self.PortraitFrame) - self.PortraitFrame.LevelCallout:SetTexture(LVL_TEXTURE) - self.PortraitFrame.LevelBorder:SetDrawLayer('OVERLAY') - end - self.PortraitFrame.PortraitRing:SetVertexColor(color.r, color.g, color.b) - end for i=1, #self.AbilitiesFrame.Abilities do local abilityFrame = self.AbilitiesFrame.Abilities[i]; @@ -271,15 +270,29 @@ local function LoadGarrisonStyle() --GarrisonMissionFrameFollowersListScrollFrame - GarrisonMissionFrame.MissionComplete:RemoveTextures() - GarrisonMissionFrame.MissionComplete:SetPanelTemplate('Paper', false, 4, 0, 0) - GarrisonMissionFrame.MissionComplete:SetPanelColor("special") - GarrisonMissionFrame.MissionComplete.Stage:RemoveTextures() - GarrisonMissionFrame.MissionComplete.Stage.MissionInfo:RemoveTextures() - GarrisonMissionFrame.MissionComplete.Stage.FollowersFrame:RemoveTextures() - AddFadeBanner(GarrisonMissionFrame.MissionComplete.Stage) - GarrisonMissionFrame.MissionComplete.NextMissionButton:RemoveTextures(true) - GarrisonMissionFrame.MissionComplete.NextMissionButton:SetButtonTemplate() + local mComplete = GarrisonMissionFrame.MissionComplete; + local mStage = mComplete.Stage; + local mFollowers = mStage.FollowersFrame; + + mComplete:RemoveTextures() + mComplete:SetPanelTemplate('Paper', false, 4, 0, 0) + mComplete:SetPanelColor("special") + mStage:RemoveTextures() + mStage.MissionInfo:RemoveTextures() + + if(mFollowers.Follower1 and mFollowers.Follower1.PortraitFrame) then + StyleFollowerPortrait(mFollowers.Follower1.PortraitFrame) + end + if(mFollowers.Follower2 and mFollowers.Follower2.PortraitFrame) then + StyleFollowerPortrait(mFollowers.Follower2.PortraitFrame) + end + if(mFollowers.Follower3 and mFollowers.Follower3.PortraitFrame) then + StyleFollowerPortrait(mFollowers.Follower3.PortraitFrame) + end + + AddFadeBanner(mStage) + mComplete.NextMissionButton:RemoveTextures(true) + mComplete.NextMissionButton:SetButtonTemplate() --GarrisonMissionFrame.MissionComplete.BonusRewards:RemoveTextures() --GarrisonMissionFrame.MissionComplete.BonusRewards:SetFixedPanelTemplate("Model") @@ -308,6 +321,8 @@ local function LoadGarrisonStyle() hooksecurefunc("GarrisonCapacitiveDisplayFrame_Update", _hook_ReagentUpdate) hooksecurefunc("GarrisonFollowerList_Update", _hook_GarrisonFollowerListUpdate) + hooksecurefunc("GarrisonMissionFrame_SetFollowerPortrait", _hook_GarrisonMissionFrame_SetFollowerPortrait) + hooksecurefunc("GarrisonMissionComplete_SetFollowerLevel", _hook_GarrisonMissionComplete_SetFollowerLevel) hooksecurefunc("GarrisonFollowerPage_ShowFollower", _hook_GarrisonFollowerPage_ShowFollower) hooksecurefunc("GarrisonMissionFrame_SetItemRewardDetails", _hook_GarrisonMissionFrame_SetItemRewardDetails) diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua index 76cff46..5ac6a5f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua @@ -734,7 +734,7 @@ function PLUGIN:ApplyItemAlertStyle(frame, noicon) if lvl < 1 then lvl = 1 end local alertpanel = CreateFrame("Frame", nil, frame) - alertpanel:SetPoint("TOPLEFT", frame, "TOPLEFT", -30, 10) + alertpanel:SetPoint("TOPLEFT", frame, "TOPLEFT", -25, 10) alertpanel:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 10, 10) alertpanel:SetHeight(size) alertpanel:SetFrameLevel(lvl - 1) @@ -750,7 +750,7 @@ function PLUGIN:ApplyItemAlertStyle(frame, noicon) alertpanel.icon = alertpanel:CreateTexture(nil, "BACKGROUND", nil, 2) alertpanel.icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-ICON-BORDER]]) alertpanel.icon:SetGradient('VERTICAL', 1, 0.35, 0, 1, 1, 0) - alertpanel.icon:SetPoint("LEFT", alertpanel, "LEFT", -50, 20) + alertpanel.icon:SetPoint("LEFT", alertpanel, "LEFT", -45, 20) alertpanel.icon:SetSize(size, size) frame.AlertColor = SetIconAlertColor end diff --git a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc index 1e699e0..8e339de 100644 --- a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc +++ b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.2 +## Version: 5.3.0 ## Title: |cffFF9900SVUI |r|cffFFEF00Track-O-Matic|r ## Notes: Supervillain UI [|cff9911FFRaid & Party Member Tracking|r]. ## SavedVariables: TrackOMatic_Global