diff --git a/Interface/AddOns/SVUI/assets/artwork/Unitframe/Class/ROGUE-ANTICIPATION.blp b/Interface/AddOns/SVUI/assets/artwork/Unitframe/Class/ROGUE-ANTICIPATION.blp index 8d6bdac..3c849a7 100644 Binary files a/Interface/AddOns/SVUI/assets/artwork/Unitframe/Class/ROGUE-ANTICIPATION.blp and b/Interface/AddOns/SVUI/assets/artwork/Unitframe/Class/ROGUE-ANTICIPATION.blp differ diff --git a/Interface/AddOns/SVUI/data/filterdefaults.lua b/Interface/AddOns/SVUI/data/filterdefaults.lua index f5d53e5..18df59d 100644 --- a/Interface/AddOns/SVUI/data/filterdefaults.lua +++ b/Interface/AddOns/SVUI/data/filterdefaults.lua @@ -24,12 +24,7 @@ local filterClass = playerClass or "NONE"; local function safename(id) local n = GetSpellInfo(id) if not n then - if type(id) == "string" then - n = id - else - --SV:Debugger('|cffFF9900SVUI:|r Spell not found: (#ID) '..id) - n = "Voodoo Doll"; - end + return false end return n end @@ -65,10 +60,11 @@ for k, x in pairs(FilterIDs) do local src = {}; for id in x:gmatch("([^,]+)") do if(id) then - local saved - local n = safename(id); - saved = {['enable'] = true, ['priority'] = 0, ['isDefault'] = true} - src[n] = saved + local spellID = tonumber(id); + local n = safename(spellID); + if(n) then + src[id] = {['enable'] = true, ['id'] = spellID, ['priority'] = 0, ['isDefault'] = true} + end end end SV.filterdefaults[k] = src diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HunterTraps/oUF_HunterTraps.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HunterTraps/oUF_HunterTraps.lua index efda33a..8ed4287 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HunterTraps/oUF_HunterTraps.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HunterTraps/oUF_HunterTraps.lua @@ -16,6 +16,8 @@ local _, ns = ... local oUF = oUF or ns.oUF if not oUF then return end +local ENHANCED_TRAPS_ID = 157751; +local ENHANCED_TRAPS = IsSpellKnown(ENHANCED_TRAPS_ID); local FIRE_TRAP = GetSpellInfo(13813); local FROST_TRAP = GetSpellInfo(1499); local ICE_TRAP = GetSpellInfo(13809); @@ -81,6 +83,7 @@ end local Update = function(self, event, ...) local bar = self.HunterTraps if(event and event == "SPELLS_CHANGED") then + ENHANCED_TRAPS = IsSpellKnown(ENHANCED_TRAPS_ID); local ice_icon = select(3, GetSpellInfo(13809)); if(ice_icon == SNAKE_ICON) then TRAP_IDS[3] = SNAKE_TRAP @@ -96,15 +99,18 @@ local Update = function(self, event, ...) if(bar.PreUpdate) then bar:PreUpdate(event) end - local name, start, duration, isReady; + local name, start, duration, isReady, enable; local unit, _, _, _, spellID = ... if(unit and (self.unit ~= unit)) then return end if(spellID) then name = GetSpellInfo(spellID) - start, isReady = GetSpellCooldown(spellID) + start, isReady, enable = GetSpellCooldown(spellID) duration = GetSpellBaseCooldown(spellID) + if((duration and duration > 0) and ENHANCED_TRAPS) then + duration = duration * 0.5 + end end if bar:IsShown() then diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua index cad70cc..9468c11 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua @@ -109,10 +109,10 @@ local Update = function(self, event, unit) if(guile) then local insight = UpdateGuile() if(insight and insight > 0) then - guile.Text:SetText(insight) - guile.Text:SetTextColor(unpack(TextColors[insight])) + guile:SetText(insight) + guile:SetTextColor(unpack(TextColors[insight])) else - guile.Text:SetText("") + guile:SetText("") end end diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua index bd70c67..194871f 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua @@ -113,6 +113,7 @@ local Update = function(self, event, unit, powerType) fury.bar:SetStatusBarColor(unpack(colors)) fury.bar:SetMinMaxValues(0, maxPower) fury.bar:SetValue(power) + fury.bar.text:SetText(power) if(fury.bar.Update) then local filled = (percent > 80) and 1 or 0 diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua index e371cc8..ef0587f 100644 --- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua +++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua @@ -532,7 +532,7 @@ local _hook_GameTooltip_OnTooltipSetItem = function(self) self:AddLine(" ") local left = "|cFFCA3C3CSpell ID: |r" local itemID = ("|cFFCA3C3C%s|r %s"):format(left, itemLink):match(":(%w+)") - self:AddDoubleLine("|cFFCA3C3CSpell ID: |r", itemID) + self:AddLine(("|cFFCA3C3C%s# %d|r"):format(ID, itemID)) end if(self.InjectedDouble[8]) then @@ -579,10 +579,10 @@ local _hook_OnSetUnitAura = function(self, unit, index, filter) local color = RAID_CLASS_COLORS[class] if color then self.SuperBorder:SetMaskBorderColor(color.r, color.g, color.b) - self:AddDoubleLine(("|cFFCA3C3C%s|r %d"):format(ID, spellID), format("|c%s%s|r", color.colorStr, name)) + self:AddDoubleLine(("|cFFCA3C3C%s# %d|r"):format(ID, spellID), format("|c%s%s|r", color.colorStr, name)) end else - self:AddLine(("|cFFCA3C3C%s|r %d"):format(ID, spellID)) + self:AddLine(("|cFFCA3C3C%s# %d|r"):format(ID, spellID)) end self:Show() end @@ -611,7 +611,7 @@ end local _hook_GameTooltip_OnTooltipSetSpell = function(self) local ref = select(3, self:GetSpell()) if not ref then return end - local text = ("|cFFCA3C3C%s|r%d"):format(ID, ref) + local text = ("|cFFCA3C3C%s# %d|r"):format(ID, ref) local max = self:NumLines() local check; for i = 1, max do diff --git a/Interface/AddOns/SVUI/packages/unit/elements/auras.lua b/Interface/AddOns/SVUI/packages/unit/elements/auras.lua index 8038216..01267fb 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/auras.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/auras.lua @@ -397,9 +397,11 @@ local CommonAuraFilter = function(self, unit, icon, auraName, _, _, _, debuffTyp icon.owner = caster; icon.name = auraName; - if(auraDB.filterWhiteList and (not SV.filters.WhiteList[auraName])) then + local filterKey = tostring(spellID) + + if(auraDB.filterWhiteList and (not SV.filters.WhiteList[filterKey])) then return false; - elseif(SV.filters.BlackList[auraName] and SV.filters.BlackList[auraName].enable) then + elseif(SV.filters.BlackList[filterKey] and SV.filters.BlackList[filterKey].enable) then return false; else if(auraDB.filterPlayer and (not isPlayer)) then @@ -421,7 +423,7 @@ local CommonAuraFilter = function(self, unit, icon, auraName, _, _, _, debuffTyp local active = auraDB.useFilter if(active and SV.filters[active]) then local spellDB = SV.filters[active]; - if(spellDB[auraName] and spellDB[auraName].enable) then + if(spellDB[filterKey] and spellDB[filterKey].enable) then return false end end @@ -438,9 +440,11 @@ local CommonBarFilter = function(self, unit, auraName, _, _, _, debuffType, dura local isPlayer = caster == "player" or caster == "vehicle"; local isEnemy = UnitIsEnemy("player", unit); - if(auraDB.filterWhiteList and (not SV.filters.WhiteList[auraName])) then + local filterKey = tostring(spellID) + + if(auraDB.filterWhiteList and (not SV.filters.WhiteList[filterKey])) then return false; - elseif(SV.filters.BlackList[auraName] and SV.filters.BlackList[auraName].enable) then + elseif(SV.filters.BlackList[filterKey] and SV.filters.BlackList[filterKey].enable) then return false else if(auraDB.filterPlayer and (not isPlayer)) then @@ -462,7 +466,7 @@ local CommonBarFilter = function(self, unit, auraName, _, _, _, debuffType, dura local active = auraDB.useFilter if(active and SV.filters[active]) then local spellDB = SV.filters[active]; - if(spellDB[auraName] and spellDB[auraName].enable) then + if(spellDB[filterKey] and spellDB[filterKey].enable) then return false end end @@ -498,11 +502,13 @@ local DetailedAuraFilter = function(self, unit, icon, auraName, _, _, _, debuffT icon.owner = caster; icon.name = auraName; + local filterKey = tostring(spellID) + if(filter_test(auraDB.filterAll, isEnemy)) then return false - elseif(filter_test(auraDB.filterWhiteList, isEnemy) and (not SV.filters.WhiteList[auraName])) then + elseif(filter_test(auraDB.filterWhiteList, isEnemy) and (not SV.filters.WhiteList[filterKey])) then return false; - elseif(SV.filters.BlackList[auraName] and SV.filters.BlackList[auraName].enable) then + elseif(SV.filters.BlackList[filterKey] and SV.filters.BlackList[filterKey].enable) then return false else if(filter_test(auraDB.filterPlayer, isEnemy) and (not isPlayer)) then @@ -522,7 +528,7 @@ local DetailedAuraFilter = function(self, unit, icon, auraName, _, _, _, debuffT local active = auraDB.useFilter if(active and SV.filters[active]) then local spellDB = SV.filters[active]; - if(spellDB[auraName] and spellDB[auraName].enable) then + if(spellDB[filterKey] and spellDB[filterKey].enable) then return false end end @@ -539,11 +545,13 @@ local DetailedBarFilter = function(self, unit, auraName, _, _, _, debuffType, du local isPlayer = caster == "player" or caster == "vehicle"; local isEnemy = UnitIsEnemy("player", unit); + local filterKey = tostring(spellID) + if(filter_test(auraDB.filterAll, isEnemy)) then return false - elseif(filter_test(auraDB.filterWhiteList, isEnemy) and (not SV.filters.WhiteList[auraName])) then + elseif(filter_test(auraDB.filterWhiteList, isEnemy) and (not SV.filters.WhiteList[filterKey])) then return false; - elseif(SV.filters.BlackList[auraName] and SV.filters.BlackList[auraName].enable) then + elseif(SV.filters.BlackList[filterKey] and SV.filters.BlackList[filterKey].enable) then return false else if(filter_test(auraDB.filterPlayer, isEnemy) and (not isPlayer)) then @@ -561,7 +569,7 @@ local DetailedBarFilter = function(self, unit, auraName, _, _, _, debuffType, du local active = auraDB.useFilter if(active and SV.filters[active]) then local spellDB = SV.filters[active]; - if(spellDB[auraName] and spellDB[auraName].enable) then + if(spellDB[filterKey] and spellDB[filterKey].enable) then return false end end diff --git a/Interface/AddOns/SVUI/packages/unit/resources/mage.lua b/Interface/AddOns/SVUI/packages/unit/resources/mage.lua index ee89507..eb79627 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/mage.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/mage.lua @@ -122,9 +122,6 @@ end function MOD:CreateClassBar(playerFrame) local max = 5 - local spec = GetSpecialization() - local color = specColors[spec] - local effectName = specEffects[spec] local bar = CreateFrame("Frame",nil,playerFrame) bar:SetFrameLevel(playerFrame.TextGrip:GetFrameLevel() + 30) @@ -133,7 +130,7 @@ function MOD:CreateClassBar(playerFrame) bar[i]:SetStatusBarTexture(CHARGE_ICON) bar[i]:GetStatusBarTexture():SetHorizTile(false) bar[i]:SetOrientation("VERTICAL") - bar[i]:SetStatusBarColor(unpack(color)) + bar[i]:SetStatusBarColor(0.95, 1, 1, 0.75) bar[i].noupdate = true; bar[i].bg = bar[i]:CreateTexture(nil, "BACKGROUND") @@ -141,14 +138,14 @@ function MOD:CreateClassBar(playerFrame) bar[i].bg:SetTexture(ORB_BG); bar[i].bg:SetVertexColor(0.25,0.5,0.5) - SV.SpecialFX:SetFXFrame(bar[i], effectName) + SV.SpecialFX:SetFXFrame(bar[i], "arcane") --bar[i].FX:SetFrameLevel(0) bar[i].FX:SetAlpha(0.5) end local bgFrame = CreateFrame("Frame", nil, bar) bgFrame:SetAllPointsIn(bar) - SV.SpecialFX:SetFXFrame(bgFrame, effectName) + SV.SpecialFX:SetFXFrame(bgFrame, "arcane") local bgTexture = bgFrame:CreateTexture(nil, "BACKGROUND") bgTexture:SetAllPoints(bgFrame) diff --git a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua index 9a60c2c..a837dc2 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua @@ -89,18 +89,12 @@ local Reposition = function(self) if i==1 then points[i]:SetPoint("LEFT", points) else - points[i]:SetPointToScale("LEFT", points[i - 1], "RIGHT", -2, 0) + points[i]:SetPointToScale("LEFT", points[i - 1], "RIGHT", -8, 0) end end if(bar.Guile) then - bar.Guile:ClearAllPoints() - bar.Guile:SetHeight(size) - bar.Guile:SetWidth(textwidth) - bar.Guile:SetPoint("LEFT", points, "RIGHT", -2, 0) - bar.Guile.Text:ClearAllPoints() - bar.Guile.Text:SetAllPoints(bar.Guile) - bar.Guile.Text:SetFont(TRACKER_FONT, size, 'OUTLINE') + bar.Guile:SetFont(TRACKER_FONT, height, 'OUTLINE') end end --[[ @@ -114,7 +108,7 @@ function MOD:CreateClassBar(playerFrame) local coords local bar = CreateFrame("Frame", nil, playerFrame) - bar:SetFrameStrata("DIALOG") + bar:SetFrameLevel(playerFrame.TextGrip:GetFrameLevel() + 30) bar.Combo = CreateFrame("Frame",nil,bar) for i = 1, max do @@ -123,15 +117,16 @@ function MOD:CreateClassBar(playerFrame) SV.SpecialFX:SetFXFrame(cpoint, "default") - local icon = cpoint:CreateTexture(nil,"BACKGROUND",nil,-7) - icon:SetPoint("TOPLEFT", cpoint, "TOPLEFT", -10, 8) - icon:SetPoint("BOTTOMRIGHT", cpoint, "BOTTOMRIGHT", 4, -4) - icon:SetTexture(ICON_BG) - icon:SetBlendMode("BLEND") - cpoint.Icon = icon + -- local icon = cpoint:CreateTexture(nil,"BACKGROUND",nil,-7) + -- icon:SetPoint("TOPLEFT", cpoint, "TOPLEFT", -10, 8) + -- icon:SetPoint("BOTTOMRIGHT", cpoint, "BOTTOMRIGHT", 4, -4) + -- icon:SetTexture(ICON_BG) + -- icon:SetBlendMode("BLEND") + -- cpoint.Icon = icon local anti = CreateFrame('Frame',nil,bar.Combo) anti:SetAllPointsOut(cpoint, 8, 8) + anti:SetFrameLevel(bar.Combo:GetFrameLevel() - 2) local antiicon = anti:CreateTexture(nil,"BACKGROUND",nil,-1) antiicon:SetPoint("TOPLEFT", anti, "TOPLEFT", -8, 0) antiicon:SetPoint("BOTTOMRIGHT", anti, "BOTTOMRIGHT", 6, -2) @@ -142,14 +137,10 @@ function MOD:CreateClassBar(playerFrame) bar.Combo[i] = cpoint end - local guile = CreateFrame('Frame',nil,bar) - guile:SetFrameStrata("DIALOG") - guile:SetSizeToScale(30,30) - - guile.Text = guile:CreateFontString(nil,'OVERLAY') - guile.Text:SetAllPoints(guile) - guile.Text:SetFont(TRACKER_FONT,30,'OUTLINE') - guile.Text:SetTextColor(1,1,1) + local guile = bar:CreateFontString(nil, 'OVERLAY', nil, 7) + guile:SetPoint("RIGHT", bar, "LEFT", 0, -3) + guile:SetFont(TRACKER_FONT, 30, 'OUTLINE') + guile:SetTextColor(1,1,1) bar.Guile = guile; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua b/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua index dbc3705..3443215 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua @@ -249,6 +249,12 @@ function MOD:CreateClassBar(playerFrame) demonBar:SetAllPointsIn(bgFrame) demonBar:SetOrientation("HORIZONTAL") demonBar:SetStatusBarTexture(SV.Media.bar.glow) + demonBar.text = demonBar:CreateFontString(nil, "OVERLAY") + demonBar.text:SetPoint("LEFT") + demonBar.text:SetFontObject(SVUI_Font_Unit_Small) + demonBar.text:SetJustifyH('LEFT') + demonBar.text:SetTextColor(1,1,0) + demonBar.text:SetText("0") SV.SpecialFX:SetFXFrame(demonBar, "overlay_demonbar", true) demonBar.FX:SetScript("OnShow", EffectModel_OnShow) diff --git a/Interface/AddOns/SVUI/setup/installer.lua b/Interface/AddOns/SVUI/setup/installer.lua index 0444153..e910330 100644 --- a/Interface/AddOns/SVUI/setup/installer.lua +++ b/Interface/AddOns/SVUI/setup/installer.lua @@ -160,7 +160,6 @@ local function UFMoveBottomQuadrant(toggle) anchors.SVUI_PlayerCastbar_MOVE = "BOTTOMSVUIParentBOTTOM-278122" anchors.SVUI_Target_MOVE = "BOTTOMSVUIParentBOTTOM278182" anchors.SVUI_TargetCastbar_MOVE = "BOTTOMSVUIParentBOTTOM278122" - --anchors.SVUI_Pet_MOVE = "BOTTOMSVUIParentBOTTOM0181" anchors.SVUI_TargetTarget_MOVE = "BOTTOMSVUIParentBOTTOM0182" anchors.SVUI_Focus_MOVE = "BOTTOMSVUIParentBOTTOM310432" anchors.SVUI_ThreatBar_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-495182" @@ -169,7 +168,6 @@ local function UFMoveBottomQuadrant(toggle) anchors.SVUI_PlayerCastbar_MOVE = "BOTTOMSVUIParentBOTTOM-278150" anchors.SVUI_Target_MOVE = "BOTTOMSVUIParentBOTTOM278210" anchors.SVUI_TargetCastbar_MOVE = "BOTTOMSVUIParentBOTTOM278150" - --anchors.SVUI_Pet_MOVE = "BOTTOMSVUIParentBOTTOM0209" anchors.SVUI_TargetTarget_MOVE = "BOTTOMSVUIParentBOTTOM0210" anchors.SVUI_Focus_MOVE = "BOTTOMSVUIParentBOTTOM310432" anchors.SVUI_ThreatBar_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-495210" @@ -178,7 +176,6 @@ local function UFMoveBottomQuadrant(toggle) anchors.SVUI_PlayerCastbar_MOVE = "BOTTOMSVUIParentBOTTOM-278122" anchors.SVUI_Target_MOVE = "BOTTOMSVUIParentBOTTOM278182" anchors.SVUI_TargetCastbar_MOVE = "BOTTOMSVUIParentBOTTOM278122" - --anchors.SVUI_Pet_MOVE = "BOTTOMSVUIParentBOTTOM0181" anchors.SVUI_TargetTarget_MOVE = "BOTTOMSVUIParentBOTTOM0182" anchors.SVUI_Focus_MOVE = "BOTTOMSVUIParentBOTTOM310432" anchors.SVUI_ThreatBar_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-495182" diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/filters/aura.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/filters/aura.lua index 2279c26..17b33df 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/components/filters/aura.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/filters/aura.lua @@ -55,7 +55,7 @@ local GetSpellInfo = _G.GetSpellInfo; local collectgarbage = _G.collectgarbage; ns.FilterOptionGroups['_NEW'] = function(filterType) - return function(selectedSpell) + return function() local RESULT, FILTER if(SV.filters.Custom[filterType]) then FILTER = SV.filters.Custom[filterType] @@ -82,11 +82,8 @@ ns.FilterOptionGroups['_NEW'] = function(filterType) SV:AddonMessage(L["Value must be a number"]) elseif(not GetSpellInfo(spellID)) then SV:AddonMessage(L["Not valid spell id"]) - elseif(not FILTER[spellID]) then - FILTER[spellID] = { - ["enable"] = true, - ["priority"] = 0 - } + elseif(not FILTER[value]) then + FILTER[value] = {['enable'] = true, ['id'] = spellID, ['priority'] = 0} end ns:SetFilterOptions(filterType) MOD:RefreshUnitFrames() @@ -106,8 +103,9 @@ ns.FilterOptionGroups['_NEW'] = function(filterType) end, values = function() wipe(tempFilterTable) - for g in pairs(FILTER) do - tempFilterTable[g] = g + for id, filterData in pairs(FILTER) do + local auraName = GetSpellInfo(filterData.id) + tempFilterTable[id] = auraName end return tempFilterTable end, @@ -151,19 +149,23 @@ ns.FilterSpellGroups['_NEW'] = function(filterType) args = {} }; - for aura, filterData in pairs(FILTER) do - RESULT.args[aura] = { - name = aura, - type = "toggle", - get = function() - return FILTER[aura].enable - end, - set = function(key, value) - FILTER[aura].enable = value; - MOD:RefreshUnitFrames() - ns:SetFilterOptions() - end - }; + for id, filterData in pairs(FILTER) do + local auraName = GetSpellInfo(filterData.id) + --print(auraName) + if(auraName) then + RESULT.args[auraName] = { + name = auraName, + type = "toggle", + get = function() + return FILTER[id].enable + end, + set = function(key, value) + FILTER[id].enable = value; + MOD:RefreshUnitFrames() + ns:SetFilterOptions(filterType) + end + }; + end end end diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/filters/core.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/filters/core.lua index d402453..ce54d3f 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/components/filters/core.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/filters/core.lua @@ -36,6 +36,7 @@ local getmetatable = _G.getmetatable; local setmetatable = _G.setmetatable; local tinsert = _G.tinsert; local table = _G.table; +local wipe = _G.wipe; --[[ TABLE METHODS ]]-- local tsort = table.sort; --[[ @@ -53,33 +54,39 @@ local _, ns = ...; ns.FilterOptionGroups = {}; ns.FilterSpellGroups = {}; -local tempFilterTable = {}; +local allFilterTable, userFilterTable = {},{}; local CURRENT_FILTER_TYPE = NONE; -local publicFilters = { - ["BlackList"] = "Blacklisted Auras", - ["WhiteList"] = "Whitelisted Auras", - ["Raid"] = "Consolidated Auras", - ["AuraBars"] = "Aura Bars", - ["Player"] = "Player Auras", - ["BuffWatch"] = "(AuraWatch) Player Auras", - ["PetBuffWatch"] = "(AuraWatch) Pet Auras", -}; - -local templateFilters = { - [""] = NONE, - ["BlackList"] = "BlackList", - ["WhiteList"] = "WhiteList", - ["Raid"] = "Raid", - ["AuraBars"] = "AuraBars", - ["Player"] = "Player", - ["BuffWatch"] = "BuffWatch", - ["PetBuffWatch"] = "PetBuffWatch", -}; local NONE = _G.NONE; local GetSpellInfo = _G.GetSpellInfo; local collectgarbage = _G.collectgarbage; +local function GetUserFilterList() + wipe(userFilterTable); + + userFilterTable[""] = NONE; + for filter in pairs(SV.filters.Custom) do + userFilterTable[filter] = filter + end + return userFilterTable +end +local function GetAllFilterList() + wipe(allFilterTable); + + allFilterTable[""] = NONE; + allFilterTable["BlackList"] = "Blacklist"; + allFilterTable["WhiteList"] = "Whitelist"; + allFilterTable["Raid"] = "Consolidated"; + allFilterTable["AuraBars"] = "AuraBars"; + allFilterTable["Player"] = "Player"; + allFilterTable["BuffWatch"] = "AuraWatch"; + allFilterTable["PetBuffWatch"] = "PetAuraWatch"; + for filter in pairs(SV.filters.Custom) do + allFilterTable[filter] = filter + end + return allFilterTable +end + SV.Options.args.filters = { type = "group", name = L["Aura Filters"], @@ -97,7 +104,8 @@ SV.Options.args.filters = { elseif(SV.filters.Custom[value]) then SV:AddonMessage(L["Filter already exists"]) else - SV.filters.Custom[value] = {} + SV.filters.Custom[value] = {}; + ns:SetFilterOptions(value); end end }, @@ -111,14 +119,7 @@ SV.Options.args.filters = { SV.filters.Custom[value] = nil; SV.Options.args.filters.args.filterGroup = nil end, - values = function() - wipe(tempFilterTable) - tempFilterTable[""] = NONE; - for g in pairs(SV.filters.Custom) do - tempFilterTable[g] = g - end - return tempFilterTable - end + values = GetUserFilterList() }, selectFilter = { order = 3, @@ -126,19 +127,7 @@ SV.Options.args.filters = { name = L["Select Filter"], get = function(key) return CURRENT_FILTER_TYPE end, set = function(key, value) ns:SetFilterOptions(value) end, - values = function() - wipe(tempFilterTable) - tempFilterTable = templateFilters; - for g in pairs(SV.filters) do - if(publicFilters[g]) then - tempFilterTable[g] = publicFilters[g] - end - end - for g in pairs(SV.filters.Custom) do - tempFilterTable[g] = g - end - return tempFilterTable - end + values = GetAllFilterList() } } }; diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/tip.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/tip.lua index 31ef726..53780d4 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/components/tip.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/tip.lua @@ -43,7 +43,7 @@ SV.Options.args.SVTip = { name = MOD.TitleID, childGroups = "tab", get = function(a)return SV.db.SVTip[a[#a]] end, - set = function(a, b)SV.db.SVTip[a[#a]] = b end, + set = function(a, b) MOD:ChangeDBVar(b,a[#a]); end, args = { commonGroup = { order = 1, @@ -105,7 +105,7 @@ SV.Options.args.SVTip = { name = L["Spell/Item IDs"], desc = L["Display the spell or item ID when mousing over a spell or item tooltip."], get = function(a)return SV.db.SVTip.spellID end, - set = function(a, b)SV.db.SVTip.spellID = b;SV:StaticPopup_Show("RL_CLIENT") end, + set = function(a, b)SV.db.SVTip.spellID = b; SV:StaticPopup_Show("RL_CLIENT") end, } }