diff --git a/Interface/AddOns/SVUI/assets/artwork/Unitframe/UNIT-STUNNED-LG.blp b/Interface/AddOns/SVUI/assets/artwork/Unitframe/UNIT-STUNNED-LG.blp new file mode 100644 index 0000000..07dcd94 Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Unitframe/UNIT-STUNNED-LG.blp differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Unitframe/UNIT-STUNNED.blp b/Interface/AddOns/SVUI/assets/artwork/Unitframe/UNIT-STUNNED.blp index 811f123..861744a 100644 Binary files a/Interface/AddOns/SVUI/assets/artwork/Unitframe/UNIT-STUNNED.blp and b/Interface/AddOns/SVUI/assets/artwork/Unitframe/UNIT-STUNNED.blp differ diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Combatant/oUF_Combatant.lua b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Combatant/oUF_Combatant.lua index ce08b25..48cd364 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Combatant/oUF_Combatant.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Combatant/oUF_Combatant.lua @@ -7,6 +7,17 @@ local trinketSpells = { [7744] = 45, } +local timeLeft = 0 +local Trinket_OnUpdate = function(self, elapsed) + local expires = (self.duration - (GetTime() - self.start)); + if(expires == 0) then + local parent = self:GetParent() + parent.Icon:SetDesaturated(false) + parent.Unavailable:Hide() + self:SetScript("OnUpdate", nil) + end +end + local function GetPVPIcons(unit, frameID) local _, trinket, badge local unitFactionGroup = UnitFactionGroup(unit) @@ -37,7 +48,15 @@ local function LogUpdate(self, event, ...) if(event == "COMBAT_LOG_EVENT_UNFILTERED") then local _, eventType, _, sourceGUID, _, _, _, _, _, _, _, spellID = ... if eventType == "SPELL_CAST_SUCCESS" and sourceGUID == UnitGUID(self.unit) and trinketSpells[spellID] then - CooldownFrame_SetTimer(trinket.cooldownFrame, GetTime(), trinketSpells[spellID], 1) + local startTime = GetTime() + local duration = trinketSpells[spellID] + trinket.CD.start = startTime + trinket.CD.duration = duration + trinket.CD.nextUpdate = 0 + trinket.CD:SetScript("OnUpdate", Trinket_OnUpdate) + trinket.Icon:SetDesaturated(true) + trinket.Unavailable:Show() + CooldownFrame_SetTimer(trinket.CD, startTime, duration, 1) end elseif(alert and event == "UNIT_SPELLCAST_SUCCEEDED") then local unitID, spellName, _, _, spellID = ... @@ -63,7 +82,7 @@ local Update = function(self, event, ...) trinket.Icon:SetTexture(tIcon) trinket:Show() if event == 'PLAYER_ENTERING_WORLD' then - CooldownFrame_SetTimer(trinket.cooldownFrame, 1, 1, 1) + CooldownFrame_SetTimer(trinket.CD, 1, 1, 1) end end end @@ -81,9 +100,9 @@ local Enable = function(self, unit) if(trinket) then self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED", Update) self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", Update) - if not trinket.cooldownFrame then - trinket.cooldownFrame = CreateFrame("Cooldown", nil, trinket) - trinket.cooldownFrame:SetAllPoints(trinket) + if not trinket.CD then + trinket.CD = CreateFrame("Cooldown", nil, trinket) + trinket.CD:SetAllPoints(trinket) end if not trinket.Icon then @@ -92,6 +111,13 @@ local Enable = function(self, unit) trinket.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) trinket.Icon:SetTexture([[INTERFACE\ICONS\INV_MISC_QUESTIONMARK]]) end + + if not trinket.Unavailable then + trinket.Unavailable = trinket:CreateTexture(nil, "OVERLAY") + trinket.Unavailable:SetAllPoints(trinket) + trinket.Unavailable:SetTexCoord(0.1, 0.9, 0.1, 0.9) + trinket.Unavailable:SetTexture([[Interface\BUTTONS\UI-GroupLoot-Pass-Up]]) + end trinket:Show() end diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Friendship/oUF_Friendship.lua b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Friendship/oUF_Friendship.lua index 4382346..f37e03f 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Friendship/oUF_Friendship.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Friendship/oUF_Friendship.lua @@ -8,7 +8,7 @@ assert(oUF, 'oUF Friendship was unable to locate oUF install') The list is currently generated with the following: for index = 1100, 1500 do - if(GetFriendshipReputationByID(index)) then + if(GetFriendshipReputation(index)) then friendships[GetFactionInfoByID(index)] = index end end @@ -39,35 +39,35 @@ for tag, func in pairs({ ['curfriendship'] = function() local id = GetFriendshipID() if(id) then - local _, cur, _, _, _, _, threshold = GetFriendshipReputationByID(id) + local _, cur, _, name, details, _, standing, threshold, maximum = GetFriendshipReputation(id) return cur - threshold end end, ['currawfriendship'] = function() local id = GetFriendshipID() if(id) then - local _, cur = GetFriendshipReputationByID(id) + local _, cur = GetFriendshipReputation(id) return cur end end, ['perfriendship'] = function() local id = GetFriendshipID() if(id) then - local _, cur, _, _, _, _, threshold = GetFriendshipReputationByID(id) + local _, cur, _, name, details, _, standing, threshold, maximum = GetFriendshipReputation(id) return math.floor((cur - threshold) / 8400 * 100) end end, ['perfullfriendship'] = function() local id = GetFriendshipID() if(id) then - local _, cur = GetFriendshipReputationByID(id) + local _, cur = GetFriendshipReputation(id) return math.floor(cur / 42999 * 100) end end, ['friendshipstanding'] = function() local id = GetFriendshipID() if(id) then - local _, _, _, _, _, standing = GetFriendshipReputationByID(id) + local _, cur, _, name, details, _, standing, threshold, maximum = GetFriendshipReputation(id) return standing end end, @@ -77,7 +77,7 @@ for tag, func in pairs({ end local function OnEnter(self) - local _, cur, _, details, _, standing, threshold = GetFriendshipReputationByID(GetFriendshipID()) + local _, cur, _, name, details, _, standing, threshold, maximum = GetFriendshipReputation(GetFriendshipID()) GameTooltip:SetOwner(self, 'ANCHOR_BOTTOMRIGHT') GameTooltip:SetText(UnitName('target'), 1, 1, 1) GameTooltip:AddLine(details, nil, nil, nil, true) @@ -90,7 +90,7 @@ local function Update(self) local id = GetFriendshipID() if(id) then - local _, cur, _, _, _, _, threshold = GetFriendshipReputationByID(id) + local _, cur, _, name, details, _, standing, threshold, maximum = GetFriendshipReputation(id) friendship:SetMinMaxValues(0, 8400) friendship:SetValue(cur - threshold) friendship:Show() diff --git a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua index 3c2ce9a..b324737 100644 --- a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua +++ b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua @@ -241,13 +241,13 @@ local Bar_OnEnter = function(self) if(self._fade) then SuperVillain:SecureFadeIn(self, 0.2, self:GetAlpha(), self._alpha) end -end; +end local Bar_OnLeave = function(self) if(self._fade) then SuperVillain:SecureFadeOut(self, 1, self:GetAlpha(), 0) end -end; +end function MOD:FixKeybindText(button) local hotkey = _G[button:GetName()..'HotKey'] @@ -270,10 +270,10 @@ function MOD:FixKeybindText(button) hotkeyText = hotkeyText:gsub('NMINUS', "N-") hotkeyText = hotkeyText:gsub('NPLUS', "N+") hotkey:SetText(hotkeyText) - end; + end hotkey:ClearAllPoints() hotkey:SetAllPoints() -end; +end local function Pinpoint(parent) local centerX,centerY = parent:GetCenter() @@ -282,7 +282,7 @@ local function Pinpoint(parent) local result; if not centerX or not centerY then return "CENTER" - end; + end local heightTop = screenHeight * 0.75; local heightBottom = screenHeight * 0.25; local widthLeft = screenWidth * 0.25; @@ -305,9 +305,9 @@ local function Pinpoint(parent) result="RIGHT" else result="CENTER" - end; + end return result -end; +end local function SaveActionButton(parent) local button = parent:GetName() @@ -319,10 +319,10 @@ local function SaveActionButton(parent) MOD.Storage.Cache[parent] = true end parent:SetSlotTemplate(true, 2, 0, 0) -end; +end local function SetFlyoutButton(button) - if not button or not button.FlyoutArrow or not button.FlyoutArrow:IsShown() or not button.FlyoutBorder then return end; + if not button or not button.FlyoutArrow or not button.FlyoutArrow:IsShown() or not button.FlyoutBorder then return end local LOCKDOWN = InCombatLockdown() button.FlyoutBorder:SetAlpha(0) button.FlyoutBorderShadow:SetAlpha(0) @@ -336,10 +336,10 @@ local function SetFlyoutButton(button) maxFlyoutCount = max; break end - end; + end local offset = 0; - if SpellFlyout:IsShown() and SpellFlyout:GetParent() == button or GetMouseFocus() == button then offset = 5 else offset = 2 end; - if button:GetParent() and button:GetParent():GetParent() and button:GetParent():GetParent():GetName() and button:GetParent():GetParent():GetName() == "SpellBookSpellIconsFrame" then return end; + if SpellFlyout:IsShown() and SpellFlyout:GetParent() == button or GetMouseFocus() == button then offset = 5 else offset = 2 end + if button:GetParent() and button:GetParent():GetParent() and button:GetParent():GetParent():GetName() and button:GetParent():GetParent():GetName() == "SpellBookSpellIconsFrame" then return end if button:GetParent() then local point = Pinpoint(button:GetParent()) if point:find("RIGHT") then @@ -372,7 +372,7 @@ local function SetFlyoutButton(button) end end end -end; +end local function ModifyActionButton(parent) local button = parent:GetName() @@ -390,42 +390,42 @@ local function ModifyActionButton(parent) local checked = parent:GetCheckedTexture() if cooldown then cooldown.SizeOverride = MOD.db.cooldownSize - end; + end if highlight then highlight:SetTexture(1,1,1,.2) - end; + end if pushed then pushed:SetTexture(0,0,0,.4) - end; + end if checked then checked:SetTexture(1,1,1,.2) - end; + end if flash then flash:SetTexture(nil) - end; + end if normal then normal:SetTexture(nil) normal:Hide() normal:SetAlpha(0) - end; + end if parentTex then parentTex:SetTexture(nil) parentTex:Hide() parentTex:SetAlpha(0) - end; - if border then border:MUNG()end; + end + if border then border:MUNG()end if count then count:ClearAllPoints() count:SetPoint("BOTTOMRIGHT",1,1) count:SetShadowOffset(1,-1) count:SetFontTemplate(SuperVillain.Shared:Fetch("font",MOD.db.countFont),MOD.db.countFontSize,MOD.db.countFontOutline) - end; + end if icon then icon:SetTexCoord(.1,.9,.1,.9) icon:SetGradient("VERTICAL",.5,.5,.5,1,1,1) icon:FillInner() - end; - if shine then shine:SetAllPoints()end; + end + if shine then shine:SetAllPoints()end if MOD.db.hotkeytext then hotkey:ClearAllPoints() hotkey:SetAllPoints() @@ -433,19 +433,19 @@ local function ModifyActionButton(parent) hotkey:SetJustifyH("RIGHT") hotkey:SetJustifyV("TOP") hotkey:SetShadowOffset(1,-1) - end; + end if parent.style then parent.style:SetDrawLayer('BACKGROUND',-7) - end; + end parent.FlyoutUpdateFunc = SetFlyoutButton; MOD:FixKeybindText(parent) -end; +end do local SpellFlyoutButton_OnEnter = function(self) local parent = self:GetParent() local anchor = select(2, parent:GetPoint()) - if not MOD.Storage.Cache[anchor] then return end; + if not MOD.Storage.Cache[anchor] then return end local anchorParent = anchor:GetParent() if anchorParent._fade then local alpha = anchorParent._alpha @@ -457,7 +457,7 @@ do local SpellFlyoutButton_OnLeave = function(self) local parent = self:GetParent() local anchor = select(2, parent:GetPoint()) - if not MOD.Storage.Cache[anchor] then return end; + if not MOD.Storage.Cache[anchor] then return end local anchorParent = anchor:GetParent() if anchorParent._fade then local actual = anchorParent:GetAlpha() @@ -467,7 +467,7 @@ do local SpellFlyout_OnEnter = function(self) local anchor = select(2,self:GetPoint()) - if not MOD.Storage.Cache[anchor] then return end; + if not MOD.Storage.Cache[anchor] then return end local anchorParent = anchor:GetParent() if anchorParent._fade then Bar_OnEnter(anchorParent) @@ -476,7 +476,7 @@ do local SpellFlyout_OnLeave = function(self) local anchor = select(2, self:GetPoint()) - if not MOD.Storage.Cache[anchor] then return end; + if not MOD.Storage.Cache[anchor] then return end local anchorParent=anchor:GetParent() if anchorParent._fade then Bar_OnLeave(anchorParent) @@ -493,25 +493,25 @@ do _G["SpellFlyoutButton"..i]:HookScript('OnLeave', SpellFlyoutButton_OnLeave) end - end; + end SpellFlyout:HookScript('OnEnter', SpellFlyout_OnEnter) SpellFlyout:HookScript('OnLeave', SpellFlyout_OnLeave) end local QualifyFlyouts = function() - if InCombatLockdown() then return end; + if InCombatLockdown() then return end for button,_ in pairs(MOD.Storage.Cache)do if(button and button.FlyoutArrow) then SetFlyoutButton(button) end - end; - end; + end + end function SetSpellFlyoutHook() SpellFlyout:HookScript("OnShow",SpellFlyout_OnShow); SuperVillain:ExecuteTimer(QualifyFlyouts, 5) end -end; +end --[[ ########################################################## CORE FUNCTIONS @@ -545,22 +545,22 @@ function MOD:UpdateBarBindings(pet,stance) MOD:FixKeybindText(_G["PetActionButton"..i]) else _G["PetActionButton"..i.."HotKey"]:Hide() - end; + end end end -end; +end function MOD:UpdateAllBindings(event) if event == "UPDATE_BINDINGS" then MOD:UpdateBarBindings(true,true) - end; + end MOD:UnregisterEvent("PLAYER_REGEN_DISABLED") - if InCombatLockdown()then return end; + if InCombatLockdown()then return end for barID,stored in pairs(MOD.Storage)do if (type(stored) == "table" and (barID ~= "Pet" and barID ~= "Stance" and barID ~= "Cache")) then local bar = stored.bar; local buttons = stored.buttons; - if not bar or not buttons then return end; + if not bar or not buttons then return end ClearOverrideBindings(bar); local nameMod = bar:GetName().."Button"; local thisBinding = stored.binding; @@ -571,12 +571,12 @@ function MOD:UpdateAllBindings(event) local key = select(x,GetBindingKey(binding)) if (key and key ~= "") then SetOverrideBindingClick(bar,false,key,btn) - end; + end end end end - end; -end; + end +end function MOD:SetBarConfigData(barID) local data = self.Storage[barID] @@ -601,13 +601,13 @@ function MOD:SetBarConfigData(barID) button:SetAttribute("checkfocuscast",true) button:UpdateConfig(data.config) end -end; +end function MOD:UpdateBarPagingDefaults() local parse = "[vehicleui,mod:alt,mod:ctrl] %d; [possessbar] %d; [overridebar] %d; [form,noform] 0; [shapeshift] 13; [bar:2] 2; [bar:3] 3; [bar:4] 4; [bar:5] 5; [bar:6] 6;"; if self.db.Bar6.enable then parse = "[vehicleui,mod:alt,mod:ctrl] %d; [possessbar] %d; [overridebar] %d; [form,noform] 0; [shapeshift] 13; [bar:3] 3; [bar:4] 4; [bar:5] 5; [bar:6] 6;"; - end; + end if self.db.Bar1.useCustomPaging then parse = parse .. " " .. self.db.Bar1.customPaging[SuperVillain.class]; end @@ -616,8 +616,8 @@ function MOD:UpdateBarPagingDefaults() if self.db['Bar'..i].useCustomPaging then self.Storage['Bar'..i].conditions = self.db['Bar'..i].customPaging[SuperVillain.class]; end - end; - if((not SuperVillain.db.SVBar.enable or InCombatLockdown()) or not self.isInitialized) then return end; + end + if((not SuperVillain.db.SVBar.enable or InCombatLockdown()) or not self.isInitialized) then return end local Bar2Option = InterfaceOptionsActionBarsPanelBottomRight local Bar3Option = InterfaceOptionsActionBarsPanelBottomLeft local Bar4Option = InterfaceOptionsActionBarsPanelRightTwo @@ -652,7 +652,7 @@ function MOD:UpdateBarPagingDefaults() elseif (self.db.Bar5.enable and not Bar5Option:GetChecked()) or (not self.db.Bar5.enable and Bar5Option:GetChecked()) then Bar5Option:Click() end -end; +end --[[ ########################################################## CORE FUNCTIONS @@ -664,7 +664,7 @@ do if parent and parent._fade then SuperVillain:SecureFadeIn(parent, 0.2, parent:GetAlpha(), parent._alpha) end - end; + end local Button_OnLeave = function(self) local parent = self:GetParent() @@ -672,11 +672,11 @@ do if parent and parent._fade then SuperVillain:SecureFadeOut(parent, 1, parent:GetAlpha(), 0) end - end; + end local function _refreshButtons(bar, id, max, space, cols, totalButtons, size, point, selfcast) - if InCombatLockdown() then return end; - if not bar then return end; + if InCombatLockdown() then return end + if not bar then return end local hideByScale = id == "Pet" and true or false; local isStance = id == "Stance" and true or false; local button,lastButton,lastRow; @@ -691,7 +691,7 @@ do if(selfcast) then button:SetAttribute("unit2", "player") - end; + end if(not button._hookFade) then button:HookScript('OnEnter', Button_OnEnter) @@ -700,7 +700,7 @@ do -- NewHook(button, "SetAlpha", function(self) print(self:GetName());print(self:GetAlpha()) end) -- end button._hookFade = true; - end; + end local x,y,anchor1,anchor2; @@ -735,7 +735,7 @@ do anchor2 = "LEFT" end button:Point(anchor1,lastButton,anchor2,x,y) - end; + end if(i > totalButtons) then if hideByScale then @@ -751,14 +751,14 @@ do else button:Show() end - end; + end if (not isStance or (isStance and not button.FlyoutUpdateFunc)) then ModifyActionButton(button); SaveActionButton(button); end - end; - end; + end + end local function _getPage(bar, defaultPage, condition) local page = MOD.db[bar].customPaging[SuperVillain.class] @@ -772,7 +772,7 @@ do end function MOD:RefreshBar(id) - if(InCombatLockdown() or (not self.Storage[id] or not self.Storage[id].bar or not self.db[id])) then return end; + if(InCombatLockdown() or (not self.Storage[id] or not self.Storage[id].bar or not self.db[id])) then return end local db = self.db[id]; local data = self.Storage[id] local selfcast = self.db.rightClickSelf @@ -788,8 +788,8 @@ do local max = isStance and GetNumShapeshiftForms() or totalButtons; local rows = ceil(max / cols); - if max < cols then cols = max end; - if rows < 1 then rows = 1 end; + if max < cols then cols = max end + if rows < 1 then rows = 1 end bar:Width(space + (size * cols) + ((space * (cols - 1)) + space)); bar:Height((space + (size * rows)) + ((space * (rows - 1)) + space)); bar.backdrop:ClearAllPoints() @@ -801,13 +801,13 @@ do bar.backdrop:Show() else bar.backdrop:Hide() - end; + end if(not bar._hookFade) then bar:HookScript('OnEnter', Bar_OnEnter) bar:HookScript('OnLeave', Bar_OnLeave) bar._hookFade = true; - end; + end if(db.mouseover == true) then bar:SetAlpha(0) @@ -815,7 +815,7 @@ do else bar:SetAlpha(db.alpha) bar._fade = false - end; + end _refreshButtons(bar, id, max, space, cols, totalButtons, size, point, selfcast); @@ -858,14 +858,14 @@ do else bar:Hide() UnregisterStateDriver(bar, "visibility") - end; + end SuperVillain:SetSnapOffset("SVUI_Action"..id.."_MOVE", (space / 2)) end - end; -end; + end +end function MOD:RefreshActionBars() - if InCombatLockdown() then return end; + if InCombatLockdown() then return end self:UpdateBarPagingDefaults() for button,_ in pairs(self.Storage.Cache)do if button then @@ -877,10 +877,10 @@ function MOD:RefreshActionBars() else self.Storage.Cache[button]=nil end - end; + end for t=1,6 do self:RefreshBar("Bar"..t) - end; + end self:RefreshBar("Pet") self:RefreshBar("Stance") self:UpdateBarBindings(true,true) @@ -888,8 +888,8 @@ function MOD:RefreshActionBars() if barID ~= "Pet" and barID ~= "Stance" then self:SetBarConfigData(barID) end - end; -end; + end +end local Vehicle_Updater = function() local bar = MOD.Storage['Bar1'].bar @@ -910,7 +910,7 @@ local Vehicle_Updater = function() bar.backdrop:SetFrameLevel(0); end MOD:RefreshBar("Bar1") -end; +end --[[ ########################################################## HOOKED / REGISTERED FUNCTIONS @@ -918,7 +918,7 @@ HOOKED / REGISTERED FUNCTIONS ]]-- local CreateExtraBar = function(self) local specialBar = CreateFrame("Frame", "SVUI_SpecialAbility", SuperVillain.UIParent) - specialBar:Point("BOTTOM", SuperVillain.UIParent, "BOTTOM", 0, 150) + specialBar:Point("TOP", SuperVillain.UIParent, "CENTER", 0, -50) specialBar:Size(ExtraActionBarFrame:GetSize()) ExtraActionBarFrame:SetParent(specialBar) ExtraActionBarFrame:ClearAllPoints() @@ -944,17 +944,6 @@ local CreateExtraBar = function(self) ExtraActionBarFrame:Show() end SuperVillain:SetSVMovable(specialBar, "SVUI_SpecialAbility_MOVE", L["Boss Button"], nil, nil, nil, "ALL, ACTIONBAR") - - local exitButton = CreateFrame("Button", "SVUI_BailOut", SuperVillain.UIParent, "SecureHandlerClickTemplate") - exitButton:Size(64, 64) - exitButton:Point("TOPLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 2, -30) - exitButton:SetNormalTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\EXIT") - exitButton:SetPushedTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\EXIT") - exitButton:SetHighlightTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\EXIT") - exitButton:SetFixedPanelTemplate("Transparent") - exitButton:RegisterForClicks("AnyUp") - exitButton:SetScript("OnClick", VehicleExit) - RegisterStateDriver(exitButton, "visibility", "[vehicleui] show;hide") end local SVUIOptionsPanel_OnEvent = function() @@ -966,120 +955,120 @@ local SVUIOptionsPanel_OnEvent = function() InterfaceOptionsActionBarsPanelBottomLeft:SetScript('OnEnter',nil) InterfaceOptionsActionBarsPanelRightTwo:SetScript('OnEnter',nil) InterfaceOptionsActionBarsPanelRight:SetScript('OnEnter',nil) -end; +end local SVUIButton_ShowOverlayGlow = function(self) - if not self.overlay then return end; + if not self.overlay then return end local size = self:GetWidth() / 3; self.overlay:WrapOuter(self, size) -end; +end local function ResetAllBindings() - if InCombatLockdown()then return end; + if InCombatLockdown()then return end for barID,stored in pairs(MOD.Storage)do local bar = stored.bar; - if not bar then return end; + if not bar then return end ClearOverrideBindings(bar); - end; + end MOD:RegisterEvent("PLAYER_REGEN_DISABLED","UpdateAllBindings") -end; +end local function RemoveDefaults() - local removalManager=CreateFrame("Frame") - removalManager:Hide() - MultiBarBottomLeft:SetParent(removalManager) - MultiBarBottomRight:SetParent(removalManager) - MultiBarLeft:SetParent(removalManager) - MultiBarRight:SetParent(removalManager) - for i=1,12 do - _G["ActionButton"..i]:Hide() - _G["ActionButton"..i]:UnregisterAllEvents() - _G["ActionButton"..i]:SetAttribute("statehidden",true) - _G["MultiBarBottomLeftButton"..i]:Hide() - _G["MultiBarBottomLeftButton"..i]:UnregisterAllEvents() - _G["MultiBarBottomLeftButton"..i]:SetAttribute("statehidden",true) - _G["MultiBarBottomRightButton"..i]:Hide() - _G["MultiBarBottomRightButton"..i]:UnregisterAllEvents() - _G["MultiBarBottomRightButton"..i]:SetAttribute("statehidden",true) - _G["MultiBarRightButton"..i]:Hide() - _G["MultiBarRightButton"..i]:UnregisterAllEvents() - _G["MultiBarRightButton"..i]:SetAttribute("statehidden",true) - _G["MultiBarLeftButton"..i]:Hide() - _G["MultiBarLeftButton"..i]:UnregisterAllEvents() - _G["MultiBarLeftButton"..i]:SetAttribute("statehidden",true) - if _G["VehicleMenuBarActionButton"..i] then - _G["VehicleMenuBarActionButton"..i]:Hide() - _G["VehicleMenuBarActionButton"..i]:UnregisterAllEvents() - _G["VehicleMenuBarActionButton"..i]:SetAttribute("statehidden",true) - end; - if _G['OverrideActionBarButton'..i] then - _G['OverrideActionBarButton'..i]:Hide() - _G['OverrideActionBarButton'..i]:UnregisterAllEvents() - _G['OverrideActionBarButton'..i]:SetAttribute("statehidden",true) - end; - _G['MultiCastActionButton'..i]:Hide() - _G['MultiCastActionButton'..i]:UnregisterAllEvents() - _G['MultiCastActionButton'..i]:SetAttribute("statehidden",true) - end; - ActionBarController:UnregisterAllEvents() - ActionBarController:RegisterEvent('UPDATE_EXTRA_ACTIONBAR') - MainMenuBar:EnableMouse(false) - MainMenuBar:SetAlpha(0) - MainMenuExpBar:UnregisterAllEvents() - MainMenuExpBar:Hide() - MainMenuExpBar:SetParent(removalManager) - local maxChildren = MainMenuBar:GetNumChildren(); - for i=1,maxChildren do - local child=select(i,MainMenuBar:GetChildren()) - if child then - child:UnregisterAllEvents() - child:Hide() - child:SetParent(removalManager) - end - end; - ReputationWatchBar:UnregisterAllEvents() - ReputationWatchBar:Hide() - ReputationWatchBar:SetParent(removalManager) - MainMenuBarArtFrame:UnregisterEvent("ACTIONBAR_PAGE_CHANGED") - MainMenuBarArtFrame:UnregisterEvent("ADDON_LOADED") - MainMenuBarArtFrame:Hide() - MainMenuBarArtFrame:SetParent(removalManager) - StanceBarFrame:UnregisterAllEvents() - StanceBarFrame:Hide() - StanceBarFrame:SetParent(removalManager) - OverrideActionBar:UnregisterAllEvents() - OverrideActionBar:Hide() - OverrideActionBar:SetParent(removalManager) - PossessBarFrame:UnregisterAllEvents() - PossessBarFrame:Hide() - PossessBarFrame:SetParent(removalManager) - PetActionBarFrame:UnregisterAllEvents() - PetActionBarFrame:Hide() - PetActionBarFrame:SetParent(removalManager) - MultiCastActionBarFrame:UnregisterAllEvents() - MultiCastActionBarFrame:Hide() - MultiCastActionBarFrame:SetParent(removalManager) - IconIntroTracker:UnregisterAllEvents() - IconIntroTracker:Hide() - IconIntroTracker:SetParent(removalManager) - InterfaceOptionsCombatPanelActionButtonUseKeyDown:SetScale(0.0001) - InterfaceOptionsCombatPanelActionButtonUseKeyDown:SetAlpha(0) - InterfaceOptionsActionBarsPanelAlwaysShowActionBars:EnableMouse(false) - InterfaceOptionsActionBarsPanelPickupActionKeyDropDownButton:SetScale(0.0001) - InterfaceOptionsActionBarsPanelLockActionBars:SetScale(0.0001) - InterfaceOptionsActionBarsPanelAlwaysShowActionBars:SetAlpha(0) - InterfaceOptionsActionBarsPanelPickupActionKeyDropDownButton:SetAlpha(0) - InterfaceOptionsActionBarsPanelLockActionBars:SetAlpha(0) - InterfaceOptionsActionBarsPanelPickupActionKeyDropDown:SetAlpha(0) - InterfaceOptionsActionBarsPanelPickupActionKeyDropDown:SetScale(0.00001) - InterfaceOptionsStatusTextPanelXP:SetAlpha(0) - InterfaceOptionsStatusTextPanelXP:SetScale(0.00001) - if PlayerTalentFrame then - PlayerTalentFrame:UnregisterEvent("ACTIVE_TALENT_GROUP_CHANGED") - else - hooksecurefunc("TalentFrame_LoadUI", function() PlayerTalentFrame:UnregisterEvent("ACTIVE_TALENT_GROUP_CHANGED") end) - end -end; + local removalManager=CreateFrame("Frame") + removalManager:Hide() + MultiBarBottomLeft:SetParent(removalManager) + MultiBarBottomRight:SetParent(removalManager) + MultiBarLeft:SetParent(removalManager) + MultiBarRight:SetParent(removalManager) + for i=1,12 do + _G["ActionButton"..i]:Hide() + _G["ActionButton"..i]:UnregisterAllEvents() + _G["ActionButton"..i]:SetAttribute("statehidden",true) + _G["MultiBarBottomLeftButton"..i]:Hide() + _G["MultiBarBottomLeftButton"..i]:UnregisterAllEvents() + _G["MultiBarBottomLeftButton"..i]:SetAttribute("statehidden",true) + _G["MultiBarBottomRightButton"..i]:Hide() + _G["MultiBarBottomRightButton"..i]:UnregisterAllEvents() + _G["MultiBarBottomRightButton"..i]:SetAttribute("statehidden",true) + _G["MultiBarRightButton"..i]:Hide() + _G["MultiBarRightButton"..i]:UnregisterAllEvents() + _G["MultiBarRightButton"..i]:SetAttribute("statehidden",true) + _G["MultiBarLeftButton"..i]:Hide() + _G["MultiBarLeftButton"..i]:UnregisterAllEvents() + _G["MultiBarLeftButton"..i]:SetAttribute("statehidden",true) + if _G["VehicleMenuBarActionButton"..i] then + _G["VehicleMenuBarActionButton"..i]:Hide() + _G["VehicleMenuBarActionButton"..i]:UnregisterAllEvents() + _G["VehicleMenuBarActionButton"..i]:SetAttribute("statehidden",true) + end + if _G['OverrideActionBarButton'..i] then + _G['OverrideActionBarButton'..i]:Hide() + _G['OverrideActionBarButton'..i]:UnregisterAllEvents() + _G['OverrideActionBarButton'..i]:SetAttribute("statehidden",true) + end + _G['MultiCastActionButton'..i]:Hide() + _G['MultiCastActionButton'..i]:UnregisterAllEvents() + _G['MultiCastActionButton'..i]:SetAttribute("statehidden",true) + end + ActionBarController:UnregisterAllEvents() + ActionBarController:RegisterEvent('UPDATE_EXTRA_ACTIONBAR') + MainMenuBar:EnableMouse(false) + MainMenuBar:SetAlpha(0) + MainMenuExpBar:UnregisterAllEvents() + MainMenuExpBar:Hide() + MainMenuExpBar:SetParent(removalManager) + local maxChildren = MainMenuBar:GetNumChildren(); + for i=1,maxChildren do + local child=select(i,MainMenuBar:GetChildren()) + if child then + child:UnregisterAllEvents() + child:Hide() + child:SetParent(removalManager) + end + end + ReputationWatchBar:UnregisterAllEvents() + ReputationWatchBar:Hide() + ReputationWatchBar:SetParent(removalManager) + MainMenuBarArtFrame:UnregisterEvent("ACTIONBAR_PAGE_CHANGED") + MainMenuBarArtFrame:UnregisterEvent("ADDON_LOADED") + MainMenuBarArtFrame:Hide() + MainMenuBarArtFrame:SetParent(removalManager) + StanceBarFrame:UnregisterAllEvents() + StanceBarFrame:Hide() + StanceBarFrame:SetParent(removalManager) + OverrideActionBar:UnregisterAllEvents() + OverrideActionBar:Hide() + OverrideActionBar:SetParent(removalManager) + PossessBarFrame:UnregisterAllEvents() + PossessBarFrame:Hide() + PossessBarFrame:SetParent(removalManager) + PetActionBarFrame:UnregisterAllEvents() + PetActionBarFrame:Hide() + PetActionBarFrame:SetParent(removalManager) + MultiCastActionBarFrame:UnregisterAllEvents() + MultiCastActionBarFrame:Hide() + MultiCastActionBarFrame:SetParent(removalManager) + IconIntroTracker:UnregisterAllEvents() + IconIntroTracker:Hide() + IconIntroTracker:SetParent(removalManager) + InterfaceOptionsCombatPanelActionButtonUseKeyDown:SetScale(0.0001) + InterfaceOptionsCombatPanelActionButtonUseKeyDown:SetAlpha(0) + InterfaceOptionsActionBarsPanelAlwaysShowActionBars:EnableMouse(false) + InterfaceOptionsActionBarsPanelPickupActionKeyDropDownButton:SetScale(0.0001) + InterfaceOptionsActionBarsPanelLockActionBars:SetScale(0.0001) + InterfaceOptionsActionBarsPanelAlwaysShowActionBars:SetAlpha(0) + InterfaceOptionsActionBarsPanelPickupActionKeyDropDownButton:SetAlpha(0) + InterfaceOptionsActionBarsPanelLockActionBars:SetAlpha(0) + InterfaceOptionsActionBarsPanelPickupActionKeyDropDown:SetAlpha(0) + InterfaceOptionsActionBarsPanelPickupActionKeyDropDown:SetScale(0.00001) + InterfaceOptionsStatusTextPanelXP:SetAlpha(0) + InterfaceOptionsStatusTextPanelXP:SetScale(0.00001) + if PlayerTalentFrame then + PlayerTalentFrame:UnregisterEvent("ACTIVE_TALENT_GROUP_CHANGED") + else + hooksecurefunc("TalentFrame_LoadUI", function() PlayerTalentFrame:UnregisterEvent("ACTIVE_TALENT_GROUP_CHANGED") end) + end +end --[[ ########################################################## BUILD FUNCTION / UPDATE @@ -1087,10 +1076,10 @@ BUILD FUNCTION / UPDATE ]]-- function MOD:ReLoad() self:RefreshActionBars(); -end; +end function MOD:Load() - if not SuperVillain.db.SVBar.enable then return end; + if not SuperVillain.db.SVBar.enable then return end RemoveDefaults(); self:Protect("RefreshActionBars"); self:UpdateBarPagingDefaults(); @@ -1104,13 +1093,13 @@ function MOD:Load() ResetAllBindings() else self:UpdateAllBindings() - end; + end NewHook("BlizzardOptionsPanel_OnEvent", SVUIOptionsPanel_OnEvent) NewHook("ActionButton_ShowOverlayGlow", SVUIButton_ShowOverlayGlow) - if not GetCVarBool("lockActionBars") then SetCVar("lockActionBars", 1) end; + if not GetCVarBool("lockActionBars") then SetCVar("lockActionBars", 1) end SetSpellFlyoutHook() MOD.IsLoaded = true -end; +end SuperVillain.Registry:NewPackage(MOD, "SVBar") SuperVillain.Registry:Temp("SVBar", CreateExtraBar) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/laborer/common/archaeology.lua b/Interface/AddOns/SVUI/packages/laborer/common/archaeology.lua index d508775..228cb92 100644 --- a/Interface/AddOns/SVUI/packages/laborer/common/archaeology.lua +++ b/Interface/AddOns/SVUI/packages/laborer/common/archaeology.lua @@ -57,6 +57,7 @@ local refArtifacts = {}; for i = 1, 12 do refArtifacts[i] = {} end +local NEEDS_UPDATE = true; local ArchLaborer = CreateFrame("Frame", "SVUI_ArchLaborer", UIParent) --[[ ########################################################## @@ -160,7 +161,7 @@ end local function UpdateArtifactCache() local found, raceName, raceItemID, cache, _; - for index=1, 12 do + for index = 1, 12 do found = GetNumArtifactsByRace(index) raceName, _, raceItemID = GetArchaeologyRaceInfo(index) cache = refArtifacts[index] @@ -202,6 +203,7 @@ local function UpdateArtifactCache() end UpdateArtifactBars(index) end + NEEDS_UPDATE = false end local function GetTitleAndSkill() @@ -245,7 +247,13 @@ do local Arch_OnEvent = function(self, event, ...) if(InCombatLockdown() or not archSpell) then return end - if(event == "ZONE_CHANGED" or event == "ARTIFACT_DIG_SITE_UPDATED" or event == "ARTIFACT_DIGSITE_COMPLETE") then + if(ArchCanSurvey and (event == "ARCHAEOLOGY_SURVEY_CAST" or event == "CURRENCY_DISPLAY_UPDATE")) then + UpdateArtifactCache() + elseif(event == "ARTIFACT_COMPLETE" or event == "ARTIFACT_DIG_SITE_UPDATED") then + UpdateArtifactCache() + elseif(event == "ARTIFACT_HISTORY_READY" or event == "ARTIFACT_DIGSITE_COMPLETE") then + NEEDS_UPDATE = true + else ArchCanSurvey = CanScanResearchSite() if(ArchCanSurvey and not ArchWillSurvey) then _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") @@ -258,6 +266,7 @@ do ModeAlert.HelpText = "Double-Right-Click anywhere on the screen to open the artifacts window."; ArchWillSurvey = false end + if(event == "ZONE_CHANGED_NEW_AREA") then ArchSiteFound = nil end if(not ArchSiteFound) then local sites = ArchaeologyMapUpdateAll(); if(sites and sites > 0) then @@ -267,11 +276,9 @@ do ArchSiteFound = nil end end - if(event == "ARTIFACT_DIG_SITE_UPDATED" or event == "ARTIFACT_DIGSITE_COMPLETE") then + if(NEEDS_UPDATE) then UpdateArtifactCache() end - elseif(ArchCanSurvey and (event == "ARTIFACT_HISTORY_READY" or event == "CURRENCY_DISPLAY_UPDATE" or event == "ARTIFACT_COMPLETE")) then - UpdateArtifactCache() end end; @@ -302,14 +309,16 @@ do UpdateArtifactCache() ArchEventHandler:RegisterEvent("ZONE_CHANGED") + ArchEventHandler:RegisterEvent("ZONE_CHANGED_NEW_AREA") + ArchEventHandler:RegisterEvent("ZONE_CHANGED_INDOORS") + ArchEventHandler:RegisterEvent("ARTIFACT_DIG_SITE_UPDATED") ArchEventHandler:RegisterEvent("ARTIFACT_DIGSITE_COMPLETE") ArchEventHandler:RegisterEvent("ARTIFACT_HISTORY_READY") ArchEventHandler:RegisterEvent("ARTIFACT_COMPLETE") + ArchEventHandler:RegisterEvent("CURRENCY_DISPLAY_UPDATE") - --ArchEventHandler:RegisterEvent("ZONE_CHANGED_NEW_AREA") - --ArchEventHandler:RegisterEvent("ZONE_CHANGED_INDOORS") - --ArchEventHandler:RegisterEvent("ARCHAEOLOGY_SURVEY_CAST") + ArchEventHandler:RegisterEvent("ARCHAEOLOGY_SURVEY_CAST") ArchEventHandler:SetScript("OnEvent", Arch_OnEvent) if(playerRace ~= "Dwarf") then diff --git a/Interface/AddOns/SVUI/packages/map/common/mmbar.lua b/Interface/AddOns/SVUI/packages/map/common/mmbar.lua index 019f2cb..fa9dd6a 100644 --- a/Interface/AddOns/SVUI/packages/map/common/mmbar.lua +++ b/Interface/AddOns/SVUI/packages/map/common/mmbar.lua @@ -211,8 +211,4 @@ function MOD:LoadMinimapButtons() MMBBar:SetScript("OnEnter",MMB_OnEnter) MMBBar:SetScript("OnLeave",MMB_OnLeave) self:UpdateMinimapButtonSettings() - - if SVUI_BailOut then - SVUI_BailOut:SetPoint("TOPLEFT",SVUI_MinimapFrame,"BOTTOMLEFT",2,-(SVUI_MiniMapButtonHolder:GetHeight() + 4)) - 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 4c5d5d9..2a75729 100644 --- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua @@ -87,11 +87,30 @@ end local Vehicle_OnSetPoint = function(self,_,parent) if(parent == "MinimapCluster" or parent == _G["MinimapCluster"]) then VehicleSeatIndicator:ClearAllPoints() - if VehicleSeat_MOVE then - VehicleSeatIndicator:Point("TOPLEFT",VehicleSeat_MOVE,"TOPLEFT",0,0) - else - VehicleSeatIndicator:Point("TOPLEFT",SuperVillain.UIParent,"TOPLEFT",22,-45) - SuperVillain:SetSVMovable(VehicleSeatIndicator,"VehicleSeat_MOVE",L["Vehicle Seat Frame"]) + if SVUI_VehicleFrame_MOVE then + VehicleSeatIndicator:Point("BOTTOM", SVUI_VehicleFrame_MOVE, "BOTTOM", 0, 0) + else + local width,height = VehicleSeatIndicator:GetSize() + local holder = CreateFrame("Frame", "SVUI_VehicleFrame", SuperVillain.UIParent) + holder:SetSize(width, ((height + width) + 2)) + holder:Point("TOPLEFT", SuperVillain.UIParent, "TOPLEFT", 22, -45) + + VehicleSeatIndicator:SetParent(holder) + VehicleSeatIndicator:Point("BOTTOM", holder, "BOTTOM", 0, 0) + VehicleSeatIndicator:SetFixedPanelTemplate("Transparent") + + local exit = CreateFrame("Button", "SVUI_BailOut", holder, "SecureHandlerClickTemplate") + exit:Size(width, width) + exit:Point("TOP", holder, "TOP", 0, 0) + 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) + RegisterStateDriver(exit, "visibility", "[vehicleui] show;hide") + + SuperVillain:SetSVMovable(holder, "SVUI_VehicleFrame_MOVE", L["Vehicle Seat Frame"]) end; VehicleSeatIndicator:SetScale(0.8) end diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua index 3a2aeff..02e41d8 100644 --- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua +++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua @@ -51,16 +51,26 @@ local targetList, inspectCache = {}, {}; local NIL_COLOR = { r = 1, g = 1, b = 1 }; local TAPPED_COLOR = { r = .6, g = .6, b = .6 }; local SKULL_ICON = "|TInterface\\TARGETINGFRAME\\UI-TargetingFrame-Skull.blp:16:16|t"; -local TAMABLE_INDICATOR = "|cffFFFF00Possibly Tamable|r"; +local TAMABLE_INDICATOR = "|cffFFFF00Tamable|r"; local TT_TOP = [[Interface\Addons\SVUI\assets\artwork\Template\Tooltip\TT-TOP]] local TT_BOTTOM = [[Interface\Addons\SVUI\assets\artwork\Template\Tooltip\TT-BOTTOM]] local TT_RIGHT = [[Interface\Addons\SVUI\assets\artwork\Template\Tooltip\TT-RIGHT-OVERLAY]] local TT_LEFT = [[Interface\Addons\SVUI\assets\artwork\Template\Tooltip\TT-LEFT-OVERLAY]] ---local TT_TOP = [[Interface\Addons\SVUI\assets\artwork\Template\Tooltip\TT-TOP]] ---local TT_BOTTOM = [[Interface\Addons\SVUI\assets\artwork\Template\Tooltip\TT-BOTTOM]] ---local TT_RIGHT = [[Interface\Addons\SVUI\assets\artwork\Template\Tooltip\TT-RIGHT]] ---local TT_LEFT = [[Interface\Addons\SVUI\assets\artwork\Template\Tooltip\TT-LEFT]] +local TAMABLE_FAMILIES = { + ["Basilisk"] = true, ["Bat"] = true, ["Bear"] = true, ["Beetle"] = true, + ["Bird of Prey"] = true, ["Boar"] = true, ["Carrion Bird"] = true, ["Cat"] = true, + ["Chimaera"] = true, ["Core Hound"] = true, ["Crab"] = true, ["Crane"] = true, + ["Crocolisk"] = true, ["Devilsaur"] = true, ["Direhorn"] = true, ["Dog"] = true, + ["Dragonhawk"] = true, ["Fox"] = true, ["Goat"] = true, ["Gorilla"] = true, + ["Wasp"] = true, ["Hydra"] = true, ["Hyena"] = true, ["Monkey"] = true, + ["Moth"] = true, ["Nether Ray"] = true, ["Porcupine"] = true, ["Quilen"] = true, + ["Raptor"] = true, ["Ravager"] = true, ["Rhino"] = true, ["Riverbeast"] = true, + ["Scorpid"] = true, ["Shale Spider"] = true, ["Spirit Beast"] = true, ["Serpent"] = true, + ["Silithid"] = true, ["Spider"] = true, ["Sporebat"] = true, ["Tallstrider"] = true, + ["Turtle"] = true, ["Warp Stalker"] = true, ["Wasp"] = true, ["Water strider"] = true, + ["Wind Serpent"] = true, ["Wolf"] = true, ["Worm"] = true +} local tooltips = { GameTooltip, ItemRefTooltip, ItemRefShoppingTooltip1, @@ -70,13 +80,14 @@ local tooltips = { WorldMapCompareTooltip1, WorldMapCompareTooltip2, WorldMapCompareTooltip3, DropDownList1MenuBackdrop, DropDownList2MenuBackdrop, DropDownList3MenuBackdrop, BNToastFrame -}; +} + local classification = { worldboss = format("|cffAF5050%s|r", BOSS), rareelite = format("|cffAF5050+%s|r", ITEM_QUALITY3_DESC), elite = "|cffAF5050+|r", rare = format("|cffAF5050%s|r", ITEM_QUALITY3_DESC) -}; +} --[[ ########################################################## LOCAL FUNCTIONS @@ -354,13 +365,13 @@ local _hook_GameTooltip_OnTooltipSetUnit = function(self) end if(UnitIsAFK(unit)) then - unitName = unitName .. " " .. L["AFK"] + GameTooltipTextLeft1:SetFormattedText("[|cffFF0000%s|r] |c%s%s|r ", L["AFK"], colors.colorStr, unitName) elseif(UnitIsDND(unit)) then - unitName = unitName .. " " .. L["DND"] + GameTooltipTextLeft1:SetFormattedText("[|cffFF9900%s|r] |c%s%s|r ", L["DND"], colors.colorStr, unitName) + else + GameTooltipTextLeft1:SetFormattedText("|c%s%s|r", colors.colorStr, unitName) end - GameTooltipTextLeft1:SetFormattedText("|c%s%s|r", colors.colorStr, unitName) - if(guildName) then if(guildRealm and isShiftKeyDown) then guildName = guildName.."-"..guildRealm @@ -420,7 +431,7 @@ local _hook_GameTooltip_OnTooltipSetUnit = function(self) if(creatureType) then local family = UnitCreatureFamily(unit) or creatureType - if(SuperVillain.class == "HUNTER" and creatureType == PET_TYPE_SUFFIX[8]) then + if(SuperVillain.class == "HUNTER" and creatureType == PET_TYPE_SUFFIX[8] and (family and TAMABLE_FAMILIES[family])) then local hunterLevel = UnitLevel("player") if(unitLevel <= hunterLevel) then TamablePet = true diff --git a/Interface/AddOns/SVUI/packages/unit/common/actionpanel.lua b/Interface/AddOns/SVUI/packages/unit/common/actionpanel.lua index 5a145fe..3370203 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/actionpanel.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/actionpanel.lua @@ -25,6 +25,7 @@ assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); local ELITE_TOP = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Border\ELITE-TOP]] local ELITE_BOTTOM = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Border\ELITE-BOTTOM]] local ELITE_RIGHT = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Border\ELITE-RIGHT]] +local STUNNED_ANIM = [[Interface\Addons\SVUI\assets\artwork\Unitframe\UNIT-STUNNED]] --[[ ########################################################## LOCAL FUNCTIONS @@ -259,6 +260,32 @@ function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) frame.ActionPanel.special[3]:SetBlendMode("BLEND") frame.ActionPanel.special:SetAlpha(0.7) frame.ActionPanel.special:Hide() + else + frame.LossOfControl = CreateFrame("Frame", nil, frame) + frame.LossOfControl:SetAllPoints(frame) + frame.LossOfControl:SetFrameStrata("DIALOG") + frame.LossOfControl:SetFrameLevel(99) + + local stunned = frame.LossOfControl:CreateTexture(nil, "OVERLAY", nil, 1) + stunned:SetAllPoints() + stunned:SetTexture(STUNNED_ANIM) + stunned:SetVertexColor(1, 1, 0) + stunned:SetBlendMode("BLEND") + SuperVillain.Animate:Sprite(stunned, 0.15, false, true) + stunned:Hide() + + frame.LossOfControl.stunned = stunned + + LossOfControlFrame:HookScript("OnShow", function() + if(_G["SVUI_Player"] and _G["SVUI_Player"].LossOfControl) then + _G["SVUI_Player"].LossOfControl:Show() + end + end) + LossOfControlFrame:HookScript("OnHide", function() + if(_G["SVUI_Player"] and _G["SVUI_Player"].LossOfControl) then + _G["SVUI_Player"].LossOfControl:Hide() + end + end) end else frame.ActionPanel = CreateActionPanel(frame, 2) diff --git a/Interface/AddOns/SVUI/packages/unit/common/auras.lua b/Interface/AddOns/SVUI/packages/unit/common/auras.lua index ac50ef2..a4dacba 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/auras.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/auras.lua @@ -422,45 +422,51 @@ end UPDATE ########################################################## ]]-- -local temp = {} -function MOD:UpdateAuraWatch(frame, override) - local AW = frame.AuraWatch; - local unit = frame.unit - local key = frame.___key +local WATCH_CACHE = {} +function MOD:UpdateAuraWatch(frame, key, override) + twipe(WATCH_CACHE) + local AW = frame.AuraWatch + if not MOD.db[key] then return end - local db = MOD.db[key].buffIndicator; + local db = MOD.db[key].buffIndicator if not db then return end + if not db.enable then AW:Hide() return else AW:Show() - end + end + local bwSize = db.size; - if unit == "pet" and not override then - local petBW = SuperVillain.Filters["PetBuffWatch"] or {} - for _, buff in pairs(petBW)do - if buff.style == "text"then - buff.style = "NONE" - end - tinsert(temp, buff) - end + if key == "pet" and not override then + local petBW = SuperVillain.Filters["PetBuffWatch"] + if(petBW) then + for _, buff in pairs(petBW)do + if buff.style == "text" then + buff.style = "NONE" + end + tinsert(WATCH_CACHE, buff) + end + end else - local unitBW = SuperVillain.Filters["BuffWatch"] or {} - for _, buff in pairs(unitBW)do - if buff.style == "text"then - buff.style = "NONE" - end - tinsert(temp, buff) - end + local unitBW = SuperVillain.Filters["BuffWatch"] + if(unitBW) then + for _, buff in pairs(unitBW)do + if buff.style == "text" then + buff.style = "NONE" + end + tinsert(WATCH_CACHE, buff) + end + end end if AW.icons then for i = 1, #AW.icons do local iconTest = false; - for j = 1, #temp do - if #temp[j].id and #temp[j].id == AW.icons[i] then + for j = 1, #WATCH_CACHE do + if #WATCH_CACHE[j].id and #WATCH_CACHE[j].id == AW.icons[i] then iconTest = true; break end @@ -472,30 +478,34 @@ function MOD:UpdateAuraWatch(frame, override) end end - for i = 1, #temp do - if temp[i].id then - local buffName, _, buffTexture = GetSpellInfo(temp[i].id) + local fontFile = SuperVillain.Shared:Fetch("font", MOD.db.auraFont) + local fontSize = MOD.db.auraFontSize + local fontOutline = MOD.db.auraFontOutline + + for i = 1, #WATCH_CACHE do + if WATCH_CACHE[i].id then + local buffName, _, buffTexture = GetSpellInfo(WATCH_CACHE[i].id) if buffName then local watchedAura; - if not AW.icons[temp[i].id]then + if not AW.icons[WATCH_CACHE[i].id]then watchedAura = CreateFrame("Frame", nil, AW) else - watchedAura = AW.icons[temp[i].id] + watchedAura = AW.icons[WATCH_CACHE[i].id] end watchedAura.name = buffName; watchedAura.image = buffTexture; - watchedAura.spellID = temp[i].id; - watchedAura.anyUnit = temp[i].anyUnit; - watchedAura.style = temp[i].style; - watchedAura.onlyShowMissing = temp[i].onlyShowMissing; + watchedAura.spellID = WATCH_CACHE[i].id; + watchedAura.anyUnit = WATCH_CACHE[i].anyUnit; + watchedAura.style = WATCH_CACHE[i].style; + watchedAura.onlyShowMissing = WATCH_CACHE[i].onlyShowMissing; watchedAura.presentAlpha = watchedAura.onlyShowMissing and 0 or 1; watchedAura.missingAlpha = watchedAura.onlyShowMissing and 1 or 0; - watchedAura.textThreshold = temp[i].textThreshold or -1; - watchedAura.displayText = temp[i].displayText; + watchedAura.textThreshold = WATCH_CACHE[i].textThreshold or -1; + watchedAura.displayText = WATCH_CACHE[i].displayText; watchedAura:Width(bwSize) watchedAura:Height(bwSize) watchedAura:ClearAllPoints() - watchedAura:SetPoint(temp[i].point, frame.Health, temp[i].point, temp[i].xOffset, temp[i].yOffset) + watchedAura:SetPoint(WATCH_CACHE[i].point, frame.Health, WATCH_CACHE[i].point, WATCH_CACHE[i].xOffset, WATCH_CACHE[i].yOffset) if not watchedAura.icon then watchedAura.icon = watchedAura:CreateTexture(nil, "BORDER") watchedAura.icon:SetAllPoints(watchedAura) @@ -520,8 +530,8 @@ function MOD:UpdateAuraWatch(frame, override) end if watchedAura.style == "coloredIcon"then watchedAura.icon:SetTexture([[Interface\BUTTONS\WHITE8X8]]) - if temp[i]["color"]then - watchedAura.icon:SetVertexColor(temp[i]["color"].r, temp[i]["color"].g, temp[i]["color"].b) + if WATCH_CACHE[i]["color"]then + watchedAura.icon:SetVertexColor(WATCH_CACHE[i]["color"].r, WATCH_CACHE[i]["color"].g, WATCH_CACHE[i]["color"].b) else watchedAura.icon:SetVertexColor(0.8, 0.8, 0.8) end @@ -543,8 +553,8 @@ function MOD:UpdateAuraWatch(frame, override) if watchedAura.displayText then watchedAura.text:Show() local r, g, b = 1, 1, 1; - if temp[i].textColor then - r, g, b = temp[i].textColor.r, temp[i].textColor.g, temp[i].textColor.b + if WATCH_CACHE[i].textColor then + r, g, b = WATCH_CACHE[i].textColor.r, WATCH_CACHE[i].textColor.g, WATCH_CACHE[i].textColor.b end watchedAura.text:SetTextColor(r, g, b) else @@ -555,29 +565,25 @@ function MOD:UpdateAuraWatch(frame, override) end watchedAura.count:ClearAllPoints() if watchedAura.displayText then - local anchor, relative, x, y = unpack(textCounterOffsets[temp[i].point]) + local anchor, relative, x, y = unpack(textCounterOffsets[WATCH_CACHE[i].point]) watchedAura.count:SetPoint(anchor, watchedAura.text, relative, x, y) else - watchedAura.count:SetPoint("CENTER", unpack(counterOffsets[temp[i].point])) + watchedAura.count:SetPoint("CENTER", unpack(counterOffsets[WATCH_CACHE[i].point])) end - local fontFile = SuperVillain.Shared:Fetch("font", MOD.db.auraFont) - local fontSize = MOD.db.auraFontSize - local fontOutline = MOD.db.auraFontOutline - watchedAura.count:SetFont(fontFile, fontSize, fontOutline) watchedAura.text:SetFont(fontFile, fontSize, fontOutline) watchedAura.text:ClearAllPoints() - watchedAura.text:SetPoint(temp[i].point, watchedAura, temp[i].point) - if temp[i].enable then - AW.icons[temp[i].id] = watchedAura; + watchedAura.text:SetPoint(WATCH_CACHE[i].point, watchedAura, WATCH_CACHE[i].point) + if WATCH_CACHE[i].enable then + AW.icons[WATCH_CACHE[i].id] = watchedAura; if AW.watched then - AW.watched[temp[i].id] = watchedAura + AW.watched[WATCH_CACHE[i].id] = watchedAura end else - AW.icons[temp[i].id] = nil; + AW.icons[WATCH_CACHE[i].id] = nil; if AW.watched then - AW.watched[temp[i].id] = nil + AW.watched[WATCH_CACHE[i].id] = nil end watchedAura:Hide() watchedAura = nil @@ -588,14 +594,14 @@ function MOD:UpdateAuraWatch(frame, override) if frame.AuraWatch.Update then frame.AuraWatch.Update(frame) end - twipe(temp) + twipe(WATCH_CACHE) end -function MOD:UpdateAuraWatchFromHeader(header, override) +function MOD:UpdateGroupAuraWatch(header, override) assert(self.Headers[header], "Invalid group specified.") local group = self.Headers[header] for i = 1, group:GetNumChildren() do local frame = select(i, group:GetChildren()) - if frame and frame.Health then MOD:UpdateAuraWatch(frame, override) end + if frame and frame.Health then MOD:UpdateAuraWatch(frame, header, override) end end end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/common/misc.lua b/Interface/AddOns/SVUI/packages/unit/common/misc.lua index 74f3666..8b2a8b2 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/misc.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/misc.lua @@ -117,11 +117,20 @@ function MOD:CreateCombatant(frame) local trinket = CreateFrame("Frame", nil, pvp) BasicBG(trinket) - trinket.Icon = trinket:CreateTexture(nil, "OVERLAY") + trinket.Icon = trinket:CreateTexture(nil, "BORDER") trinket.Icon:FillInner(trinket, 2, 2) trinket.Icon:SetTexture([[Interface\Icons\INV_MISC_QUESTIONMARK]]) trinket.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + trinket.Unavailable = trinket:CreateTexture(nil, "OVERLAY") + trinket.Unavailable:SetAllPoints(trinket) + trinket.Unavailable:SetTexCoord(0.1, 0.9, 0.1, 0.9) + trinket.Unavailable:SetTexture([[Interface\BUTTONS\UI-GroupLoot-Pass-Up]]) + trinket.Unavailable:Hide() + + trinket.CD = CreateFrame("Cooldown", nil, trinket) + trinket.CD:SetAllPoints(trinket) + pvp.Trinket = trinket local badge = CreateFrame("Frame", nil, pvp) diff --git a/Interface/AddOns/SVUI/packages/unit/frames/groups.lua b/Interface/AddOns/SVUI/packages/unit/frames/groups.lua index dd7820d..3d8847e 100644 --- a/Interface/AddOns/SVUI/packages/unit/frames/groups.lua +++ b/Interface/AddOns/SVUI/packages/unit/frames/groups.lua @@ -252,7 +252,7 @@ local UpdateRaidSubUnit = function(self, key, db) end end MOD.RefreshUnitMedia(self, key) - MOD:UpdateAuraWatch(self) + MOD:UpdateAuraWatch(self, key) MOD:RefreshUnitLayout(self, key) if(key ~= "raidpet") then self:EnableElement("ReadyCheck") @@ -590,7 +590,7 @@ local UpdatePartySubUnit = function(self, key, db) self:Size(db.width,db.height) end MOD:RefreshUnitLayout(self, key) - MOD:UpdateAuraWatch(self) + MOD:UpdateAuraWatch(self, key) end self:EnableElement('ReadyCheck') self:UpdateAllElements() diff --git a/Interface/AddOns/SVUI/packages/unit/frames/units.lua b/Interface/AddOns/SVUI/packages/unit/frames/units.lua index 6f2a1c3..9c4cd1c 100644 --- a/Interface/AddOns/SVUI/packages/unit/frames/units.lua +++ b/Interface/AddOns/SVUI/packages/unit/frames/units.lua @@ -462,7 +462,7 @@ local UpdatePetFrame = function(self) self:SetParent(SVUI_Player) end end - MOD:UpdateAuraWatch(self) + MOD:UpdateAuraWatch(self, "pet") self:UpdateAllElements() end UPDATERS["pet"] = UpdatePetFrame @@ -561,7 +561,7 @@ local UpdateFocusFrame = function(self) self.XRay:Hide() end - MOD:UpdateAuraWatch(self) + MOD:UpdateAuraWatch(self, "focus") self:UpdateAllElements() end UPDATERS["focus"] = UpdateFocusFrame diff --git a/Interface/AddOns/SVUI/scripts/pvp.lua b/Interface/AddOns/SVUI/scripts/pvp.lua index 1a890bb..ac90b0a 100644 --- a/Interface/AddOns/SVUI/scripts/pvp.lua +++ b/Interface/AddOns/SVUI/scripts/pvp.lua @@ -31,53 +31,89 @@ local SuperVillain, L = unpack(select(2, ...)); LOCALS ########################################################## ]]-- -local function EnteringBattleGround() - SVUI_PVPComm:Show() - local numButtons = 1 - local points = GetNumMapLandmarks() - for i = 1, points do - if(numButtons <= 6) then - local name, description, icon, _, _, _, active = GetMapLandmarkInfo(i) - local buttonName = ("SVUI_PVPCommButton"):format(numButtons) - local button = _G[buttonName] - button.name = name - button.description = description - button.Text:SetText(name) - button:SetFontString(button.Text) - button:Show() - numButtons = numButtons + 1 - end - end -end +local PVP_NODES = { + [461] = { --Arathi Basin (5) + "Stables", "Lumber", "Blacksmith", "Mine", "Farm" + }, + [935] = { --Deepwind Gorge (3) + "Center Mine", "North Mine", "South Mine" + }, + [482] = { --Eye of the Storm (4) + "Fel Reaver", "Blood Elf", "Draenei", "Mage" + }, + [736] = { --The Battle for Gilneas (3) + "LightHouse", "WaterWorks", "Mines" + }, +} + +-- local PVP_POI = { +-- [401] = { --Alterac Valley (15) +-- "Stormpike Aid Station", "Dun Baldar North Bunker", "Dun Baldar South Bunker", +-- "Stormpike Graveyard", "Icewing Bunker", "Stonehearth Graveyard", +-- "Stonehearth Bunker", "Snowfall Graveyard", "Iceblood Tower", +-- "Iceblood Graveyard", "Tower Point", "Frostwolf Graveyard", +-- "West Frostwolf Tower", "East Frostwolf Tower", "Frostwolf Relief Hut" +-- }, +-- [935] = { --Deepwind Gorge (2) +-- "Horde Cart", "Alliance Cart" +-- }, +-- [482] = { --Eye of the Storm (1) +-- "Flag" +-- }, +-- [860] = { --Silvershard Mines (1) +-- "Cart" +-- }, +-- [512] = { --Strand of the Ancients (5) +-- "Green Emerald", "Blue Sapphire", "Purple Amethyst", "Red Sun", "Yellow Moon" +-- }, +-- [540] = { --Isle of Conquest (5) +-- "Quarry", "Hangar", "Workshop", "Docks", "Refinery" +-- }, +-- [856] = { --Temple of Kotmogu (4) +-- "Red Orb", "Blue Orb", "Orange Orb", "Purple Orb" +-- }, +-- [626] = { --Twin Peaks (2) +-- "Horde Flag", "Alliance Flag" +-- }, +-- [443] = { --Warsong Gulch (2) +-- "Horde Flag", "Alliance Flag" +-- }, +-- } -local function UpdateBattleGroundLinks() +local function EnteringBattleGround() SVUI_PVPComm:Show() local numButtons = 1 - local points = GetNumMapLandmarks() - for i = 1, points do - if(numButtons <= 6) then - local name, description, icon, _, _, _, active = GetMapLandmarkInfo(i) - local buttonName = ("SVUI_PVPCommButton"):format(numButtons) - local button = _G[buttonName] - button.name = name - button.description = description - button.Text:SetText(name) - button:SetFontString(button.Text) - button:Show() + local mapID = GetCurrentMapAreaID() + local points = PVP_NODES[mapID] + if(not points) then return end + for i = 1, #points do + if(numButtons <= 5) then + local name = points[i] + local nodeName = ("SVUI_PVPNode%d"):format(numButtons) + local node = _G[nodeName] + local safe = node.Safe + local help = node.Help + safe.name = name + help.name = name + node.Text:SetText(name) + node:SetFontString(node.Text) + node:Show() numButtons = numButtons + 1 end end end local function ExitingBattleGround() - for i = 1, 6 do - local buttonName = ("SVUI_PVPCommButton"):format(numButtons) - local button = _G[buttonName] - button.name = "" - button.description = "" - button.Text:SetText("") - button:SetFontString(button.Text) - button:Hide() + for i = 1, 5 do + local nodeName = ("SVUI_PVPNode%d"):format(numButtons) + local node = _G[nodeName] + local safe = node.Safe + local help = node.Help + safe.name = "" + help.name = "" + node.Text:SetText("") + node:SetFontString(node.Text) + node:Hide() end SVUI_PVPComm:Hide() end @@ -86,7 +122,7 @@ end HANDLERS ########################################################## ]]-- -local Incoming_OnEnter = function(self) +local Node_OnEnter = function(self) if InCombatLockdown() then return end if(self.description and self.description ~= "") then self:SetBackdropBorderColor(1,0.45,0) @@ -97,13 +133,20 @@ local Incoming_OnEnter = function(self) end end -local Incoming_OnLeave = function(self) +local Node_OnLeave = function(self) if InCombatLockdown() then return end self:SetBackdropBorderColor(0,0,0) if(GameTooltip:IsShown()) then GameTooltip:Hide() end end -local Incoming_OnClick = function(self) +local Safe_OnClick = function(self) + if(self.name and self.name ~= "") then + local msg = ("%s Safe"):format(self.name) + SendChatMessage(msg, "INSTANCE_CHAT") + end +end + +local Help_OnClick = function(self) if(self.name and self.name ~= "") then local msg = ("{rt8} Incoming %s {rt8}"):format(self.name) SendChatMessage(msg, "INSTANCE_CHAT") @@ -131,30 +174,59 @@ LOADER ########################################################## ]]-- local function LoadPVPComm() - local width = 119 + local width = 156 local height = 156 local holder = CreateFrame("Frame", "SVUI_PVPComm", UIParent) holder:SetSize(width, height) holder:SetPoint("RIGHT", UIParent, "CENTER", -200, 0) - holder:SetPanelTemplate("Transparent") - for i = 1, 6 do + + for i = 1, 5 do local yOffset = (24 * (i - 1)) + 2 - local buttonName = ("SVUI_PVPCommButton"):format(i) - if(not _G[buttonName]) then - local button = CreateFrame("Button", buttonName, holder) - button:SetSize(115, 22) - button:SetPoint("TOP", holder, "TOP", 0, -yOffset) - button:SetButtonTemplate() - button.Text = button:CreateFontString(nil,"OVERLAY") - button.Text:SetFont(SuperVillain.Media.font.roboto, 12, "NONE") - button.Text:SetAllPoints(button) - button.Text:SetJustifyH("CENTER") - button.Text:SetText("") - button:SetFontString(button.Text) - button:SetScript("OnEnter", Incoming_OnEnter) - button:SetScript("OnLeave", Incoming_OnLeave) - button:SetScript("OnClick", Incoming_OnClick) - end + + local poiName = ("SVUI_PVPNode"):format(i) + local poi = CreateFrame("Frame", poiName, holder) + poi:SetSize(152, 22) + poi:SetPoint("TOP", holder, "TOP", 0, -yOffset) + poi:SetPanelTemplate("Transparent") + poi.Text = poi:CreateFontString(nil,"OVERLAY") + poi.Text:SetFont(SuperVillain.Media.font.roboto, 12, "NONE") + poi.Text:SetPoint("LEFT", poi, "LEFT", 2, 0) + poi.Text:SetHeight(22) + poi.Text:SetWidth(104) + poi.Text:SetJustifyH("CENTER") + poi.Text:SetText("") + + local safe = CreateFrame("Button", nil, poi) + safe:SetSize(22, 22) + safe:SetPoint("RIGHT", poi, "RIGHT", -2, 0) + safe:SetButtonTemplate() + local stxt = safe:CreateFontString(nil,"OVERLAY") + stxt:SetFont(SuperVillain.Media.font.roboto, 12, "NONE") + stxt:SetAllPoints(safe) + stxt:SetJustifyH("CENTER") + stxt:SetText("SAFE") + safe:SetFontString(stxt) + safe:SetScript("OnEnter", Node_OnEnter) + safe:SetScript("OnLeave", Node_OnLeave) + safe:SetScript("OnClick", Safe_OnClick) + + poi.Safe = safe + + local help = CreateFrame("Button", nil, poi) + help:SetSize(22, 22) + help:SetPoint("RIGHT", safe, "LEFT", -2, 0) + help:SetButtonTemplate() + local dtxt = help:CreateFontString(nil,"OVERLAY") + dtxt:SetFont(SuperVillain.Media.font.roboto, 12, "NONE") + dtxt:SetAllPoints(help) + dtxt:SetJustifyH("CENTER") + dtxt:SetText("HELP") + help:SetFontString(dtxt) + help:SetScript("OnEnter", Node_OnEnter) + help:SetScript("OnLeave", Node_OnLeave) + help:SetScript("OnClick", Help_OnClick) + + poi.Help = help end SuperVillain:SetSVMovable(holder, "SVUI_PVPComm_MOVE", L["PvP Communicator"]) diff --git a/Interface/AddOns/SVUI/system/installer.lua b/Interface/AddOns/SVUI/system/installer.lua index 9f1ba81..4bf9568 100644 --- a/Interface/AddOns/SVUI/system/installer.lua +++ b/Interface/AddOns/SVUI/system/installer.lua @@ -490,7 +490,7 @@ function SuperVillain:SetupAuralayout(style, preserve) end; local function InstallComplete() - SVUI_Profile.SAFEDATA.install_complete = SuperVillain.version; + SVUI_Profile.SAFEDATA.install_version = SuperVillain.version; StopMusic() SetCVar("Sound_MusicVolume",user_music_vol) okToResetMOVE = false; @@ -508,7 +508,7 @@ local function InstallMungsChoice() SuperVillain.db.SAFEDATA.barstyle = nil; SuperVillain:SetupBarLayout(); SuperVillain:SetupAuralayout(); - SVUI_Profile.SAFEDATA.install_complete = SuperVillain.version; + SVUI_Profile.SAFEDATA.install_version = SuperVillain.version; StopMusic() SetCVar("Sound_MusicVolume",user_music_vol) ReloadUI() @@ -863,7 +863,7 @@ function SuperVillain:ResetInstallation() SuperVillain:SetupAuralayout() end - SVUI_Profile.SAFEDATA.install_complete = SuperVillain.version; + SVUI_Profile.SAFEDATA.install_version = SuperVillain.version; SuperVillain:ResetMovables('') ReloadUI() end; diff --git a/Interface/AddOns/SVUI/system/mentalo.lua b/Interface/AddOns/SVUI/system/mentalo.lua index 0e38032..c2b7b9b 100644 --- a/Interface/AddOns/SVUI/system/mentalo.lua +++ b/Interface/AddOns/SVUI/system/mentalo.lua @@ -198,7 +198,6 @@ local DraggableFrames = { "ItemUpgradeFrame", "KeyBindingFrame", "LFGDungeonReadyPopup", - "LossOfControlFrame", "MacOptionsFrame", "MacroFrame", "MailFrame", diff --git a/Interface/AddOns/SVUI/system/system.lua b/Interface/AddOns/SVUI/system/system.lua index a45da6e..679ab9b 100644 --- a/Interface/AddOns/SVUI/system/system.lua +++ b/Interface/AddOns/SVUI/system/system.lua @@ -57,6 +57,7 @@ local SVUINameSpace, SVUICore = ...; LOCALS ########################################################## ]]-- +local minimumVersion = 4.04 local bld = select(2,GetBuildInfo()); local toonClass = select(2,UnitClass("player")); local rez = GetCVar("gxResolution"); @@ -289,6 +290,17 @@ end SYSTEM UPDATES ########################################################## ]]-- +function SuperVillain:VersionCheck() + if(not SVUI_Profile.SAFEDATA.install_version or (SVUI_Profile.SAFEDATA.install_version and type(SVUI_Profile.SAFEDATA.install_version) == "number" and (tonumber(SVUI_Profile.SAFEDATA.install_version) < minimumVersion))) then + if(SVUI_Profile.SAFEDATA.install_complete and type(SVUI_Profile.SAFEDATA.install_complete) == "number" and (tonumber(SVUI_Profile.SAFEDATA.install_complete) >= minimumVersion)) then + SVUI_Profile.SAFEDATA.install_version = self.version + SVUI_Profile.SAFEDATA.install_complete = nil + else + self:Install() + end + end +end + function SuperVillain:RefreshEverything(bypass) self:RefreshAllSystemMedia(); @@ -303,9 +315,7 @@ function SuperVillain:RefreshEverything(bypass) collectgarbage("collect"); if not bypass then - if(SVUI_Profile.SAFEDATA.install_complete == nil or (SVUI_Profile.SAFEDATA.install_complete and type(SVUI_Profile.SAFEDATA.install_complete) == 'boolean') or (SVUI_Profile.SAFEDATA.install_complete and type(tonumber(SVUI_Profile.SAFEDATA.install_complete)) == 'number' and tonumber(SVUI_Profile.SAFEDATA.install_complete) < 4.04)) then - self:Install(); - end + self:VersionCheck() end end --[[ @@ -372,10 +382,7 @@ local function FullLoad(self) self:SetSVMovablesPositions(); self.CoreEnabled = true; - if (SVUI_Profile.SAFEDATA.install_complete == nil or not SVUI_Profile.SAFEDATA.install_version or tonumber(SVUI_Profile.SAFEDATA.install_version) < 4.04) then - self:Install() - SVUI_Profile.SAFEDATA.install_version = self.version - end + self:VersionCheck() self:RefreshAllSystemMedia(); NewHook("StaticPopup_Show", self.StaticPopup_Show) diff --git a/Interface/AddOns/SVUI/system/timers.lua b/Interface/AddOns/SVUI/system/timers.lua index 9b4f659..eb2b3cd 100644 --- a/Interface/AddOns/SVUI/system/timers.lua +++ b/Interface/AddOns/SVUI/system/timers.lua @@ -239,6 +239,6 @@ local Cooldown_OnLoad = function(self, start, duration, elapsed) end; function SuperVillain:AddCD(cooldown) - if not SuperVillain.db.system.cooldown then return end; - hooksecurefunc(cooldown,"SetCooldown",Cooldown_OnLoad) + if not SuperVillain.db.system.cooldown then return end + hooksecurefunc(cooldown, "SetCooldown", Cooldown_OnLoad) end; \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/filter.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/filter.lua index 71e6840..fcd64f2 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/filter.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/filter.lua @@ -390,10 +390,10 @@ local function generateFilterOptions() tinsert(SuperVillain.Filters["BuffWatch"], {["enable"] = true, ["id"] = tonumber(f), ["point"] = "TOPRIGHT", ["color"] = {["r"] = 1, ["g"] = 0, ["b"] = 0}, ["anyUnit"] = false}) generateFilterOptions() for t = 10, 40, 15 do - MOD:UpdateAuraWatchFromHeader("raid"..t) + MOD:UpdateGroupAuraWatch("raid"..t) end; - MOD:UpdateAuraWatchFromHeader("party") - MOD:UpdateAuraWatchFromHeader("raidpet", true) + MOD:UpdateGroupAuraWatch("party") + MOD:UpdateGroupAuraWatch("raidpet", true) selectedSpell = nil end end @@ -430,10 +430,10 @@ local function generateFilterOptions() selectedSpell = nil; generateFilterOptions() for t = 10, 40, 15 do - MOD:UpdateAuraWatchFromHeader("raid"..t) + MOD:UpdateGroupAuraWatch("raid"..t) end; - MOD:UpdateAuraWatchFromHeader("party") - MOD:UpdateAuraWatchFromHeader("raidpet", true) + MOD:UpdateGroupAuraWatch("party") + MOD:UpdateGroupAuraWatch("raidpet", true) end }, selectSpell = { @@ -470,10 +470,10 @@ local function generateFilterOptions() set = function(e, arg) SuperVillain.Filters["BuffWatch"][registeredSpell][e[#e]] = arg; for t = 10, 40, 15 do - MOD:UpdateAuraWatchFromHeader("raid"..t) + MOD:UpdateGroupAuraWatch("raid"..t) end; - MOD:UpdateAuraWatchFromHeader("party") - MOD:UpdateAuraWatchFromHeader("raidpet", true) + MOD:UpdateGroupAuraWatch("party") + MOD:UpdateGroupAuraWatch("raidpet", true) end, order = -10, args = { @@ -508,10 +508,10 @@ local function generateFilterOptions() local abColor = SuperVillain.Filters["BuffWatch"][registeredSpell][e[#e]] abColor.r, abColor.g, abColor.b = i, j, k; for t = 10, 40, 15 do - MOD:UpdateAuraWatchFromHeader("raid"..t) + MOD:UpdateGroupAuraWatch("raid"..t) end; - MOD:UpdateAuraWatchFromHeader("party") - MOD:UpdateAuraWatchFromHeader("raidpet", true) + MOD:UpdateGroupAuraWatch("party") + MOD:UpdateGroupAuraWatch("raidpet", true) end }, displayText = { @@ -536,10 +536,10 @@ local function generateFilterOptions() local abColor = SuperVillain.Filters["BuffWatch"][registeredSpell][e[#e]] abColor.r, abColor.g, abColor.b = i, j, k; for t = 10, 40, 15 do - MOD:UpdateAuraWatchFromHeader("raid"..t) + MOD:UpdateGroupAuraWatch("raid"..t) end; - MOD:UpdateAuraWatchFromHeader("party") - MOD:UpdateAuraWatchFromHeader("raidpet", true) + MOD:UpdateGroupAuraWatch("party") + MOD:UpdateGroupAuraWatch("raidpet", true) end }, textThreshold = { diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua index 5a81c80..b0fdb7b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua @@ -20,6 +20,26 @@ local MOD = SuperVillain.Registry:Expose("SVStyle"); LOSSOFCONTROL STYLER ########################################################## ]]-- +local _hook_LossOfControl = function(self, ...) + self.Icon:ClearAllPoints() + self.Icon:SetPoint("CENTER", self, "CENTER", 0, 0) + self.AbilityName:ClearAllPoints() + self.AbilityName:SetPoint("BOTTOM", self, 0, -28) + self.AbilityName.scrollTime = nil; + self.AbilityName:SetFont(SuperVillain.Media.font.names, 20, 'OUTLINE') + self.TimeLeft.NumberText:ClearAllPoints() + self.TimeLeft.NumberText:SetPoint("BOTTOM", self, 4, -58) + self.TimeLeft.NumberText.scrollTime = nil; + self.TimeLeft.NumberText:SetFont(SuperVillain.Media.font.numbers, 20, 'OUTLINE') + self.TimeLeft.SecondsText:ClearAllPoints() + self.TimeLeft.SecondsText:SetPoint("BOTTOM", self, 0, -80) + self.TimeLeft.SecondsText.scrollTime = nil; + self.TimeLeft.SecondsText:SetFont(SuperVillain.Media.font.roboto, 20, 'OUTLINE') + if self.Anim:IsPlaying() then + self.Anim:Stop() + end +end + local function LossOfControlStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.losscontrol ~= true then return end; local IconBackdrop = CreateFrame("Frame", nil, LossOfControlFrame) @@ -29,29 +49,9 @@ local function LossOfControlStyle() LossOfControlFrame.Icon:SetTexCoord(.1, .9, .1, .9) LossOfControlFrame:Formula409() LossOfControlFrame.AbilityName:ClearAllPoints() - LossOfControlFrame:Size(LossOfControlFrame.Icon:GetWidth()+50) + LossOfControlFrame:Size(LossOfControlFrame.Icon:GetWidth() + 50) --local bg = CreateFrame("Frame", nil, LossOfControlFrame) - - local font = SuperVillain.Media.font.default; - hooksecurefunc("LossOfControlFrame_SetUpDisplay", function(o, ...) - o.Icon:ClearAllPoints() - o.Icon:SetPoint("CENTER", o, "CENTER", 0, 0) - o.AbilityName:ClearAllPoints() - o.AbilityName:SetPoint("BOTTOM", o, 0, -28) - o.AbilityName.scrollTime = nil; - o.AbilityName:SetFontTemplate(font, 20, 'OUTLINE') - o.TimeLeft.NumberText:ClearAllPoints() - o.TimeLeft.NumberText:SetPoint("BOTTOM", o, 4, -58) - o.TimeLeft.NumberText.scrollTime = nil; - o.TimeLeft.NumberText:SetFontTemplate(font, 20, 'OUTLINE') - o.TimeLeft.SecondsText:ClearAllPoints() - o.TimeLeft.SecondsText:SetPoint("BOTTOM", o, 0, -80) - o.TimeLeft.SecondsText.scrollTime = nil; - o.TimeLeft.SecondsText:SetFontTemplate(font, 20, 'OUTLINE') - if o.Anim:IsPlaying() then - o.Anim:Stop() - end - end) + hooksecurefunc("LossOfControlFrame_SetUpDisplay", _hook_LossOfControl) end; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua index 3318c5a..a4a5d86 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua @@ -487,27 +487,43 @@ end; SYSTEM WIDGET STYLERS ########################################################## ]]-- +local ChatGeneric_OnShow = function(self) if(not self.Panel) then self:SetPanelTemplate("Halftone") end end +local ChatMenu_OnShow = function(self) if(not self.Panel) then self:SetPanelTemplate("Halftone") end self:ClearAllPoints() self:Point("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, 30) end + local function SystemPanelQue() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.misc ~= true then return end QueueStatusFrame:Formula409() for i = 1, #SystemPopList do - _G[SystemPopList[i]]:Formula409() - MOD:ApplyAlertStyle(_G[SystemPopList[i]]) - _G[SystemPopList[i]]:SetBackdropColor(0.8, 0.2, 0.2) + local this = _G[SystemPopList[i]] + if(this) then + this:Formula409() + MOD:ApplyAlertStyle(this) + this:SetBackdropColor(0.8, 0.2, 0.2) + end end for i = 1, #SystemFrameList1 do - _G[SystemFrameList1[i]]:Formula409() - _G[SystemFrameList1[i]]:SetPanelTemplate("Pattern") + local this = _G[SystemFrameList1[i]] + if(this) then + this:Formula409() + this:SetPanelTemplate("Pattern") + end end for i = 1, #SystemFrameList2 do - _G[SystemFrameList2[i]]:Formula409() - _G[SystemFrameList2[i]]:SetPanelTemplate("Halftone") + local this = _G[SystemFrameList2[i]] + if(this) then + this:Formula409() + this:SetPanelTemplate("Halftone") + end end for i = 1, #SystemFrameList3 do - if _G[SystemFrameList3[i]] == _G["ChatMenu"] then - _G[SystemFrameList3[i]]:HookScript("OnShow", function(self) self:SetPanelTemplate("Halftone") self:ClearAllPoints() self:Point("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, 30) end) - else - _G[SystemFrameList3[i]]:HookScript("OnShow", function(self) self:SetPanelTemplate("Halftone") end) + local name = SystemFrameList3[i] + local this = _G[name] + if(this) then + if(name == "ChatMenu") then + this:HookScript("OnShow", ChatMenu_OnShow) + else + this:HookScript("OnShow", ChatGeneric_OnShow) + end end end LFDRoleCheckPopup:Formula409() @@ -538,9 +554,9 @@ local function SystemPanelQue() end end for i = 1, #SystemFrameList4 do - local SVUIMenuButtons = _G["GameMenuButton"..SystemFrameList4[i]] - if SVUIMenuButtons then - SVUIMenuButtons:SetButtonTemplate() + local this = _G["GameMenuButton"..SystemFrameList4[i]] + if(this) then + this:SetButtonTemplate() end end if IsAddOnLoaded("OptionHouse") then @@ -566,21 +582,21 @@ local function SystemPanelQue() tex:FillInner() end for i = 1, #SystemFrameList5 do - local title = _G[SystemFrameList5[i].."Header"] - if title then - title:SetTexture("") - title:ClearAllPoints() - if title == _G["GameMenuFrameHeader"] then - title:SetPoint("TOP", GameMenuFrame, 0, 7) + local this = _G[SystemFrameList5[i].."Header"] + if(this) then + this:SetTexture("") + this:ClearAllPoints() + if this == _G["GameMenuFrameHeader"] then + this:SetPoint("TOP", GameMenuFrame, 0, 7) else - title:SetPoint("TOP", SystemFrameList5[i], 0, 0) + this:SetPoint("TOP", SystemFrameList5[i], 0, 0) end end end for i = 1, #SystemFrameList6 do - local SVUIButtons = _G[SystemFrameList6[i]] - if SVUIButtons then - SVUIButtons:SetButtonTemplate() + local this = _G[SystemFrameList6[i]] + if(this) then + this:SetButtonTemplate() end end VideoOptionsFrameCancel:ClearAllPoints() @@ -649,34 +665,46 @@ local function SystemPanelQue() end OpacityFrame:Formula409() OpacityFrame:SetFixedPanelTemplate("Transparent", true) - for _, object in pairs(SystemFrameList7) do - _G[object]:Formula409() + for i = 1, #SystemFrameList7 do + local this = _G[SystemFrameList7[i]] + if(this) then + this:Formula409() + end end for i = 1, #SystemFrameList8 do - _G[SystemFrameList8[i]]:SetButtonTemplate() + local this = _G[SystemFrameList8[i]] + if(this) then + this:SetButtonTemplate() + end end ChatConfigFrameOkayButton:Point("RIGHT", ChatConfigFrameCancelButton, "RIGHT", -11, -1) ChatConfigCombatSettingsFiltersDeleteButton:Point("TOPRIGHT", ChatConfigCombatSettingsFilters, "BOTTOMRIGHT", 0, -1) ChatConfigCombatSettingsFiltersAddFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersDeleteButton, "LEFT", -1, 0) ChatConfigCombatSettingsFiltersCopyFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersAddFilterButton, "LEFT", -1, 0) for i=1, 5 do - local tab = _G["CombatConfigTab"..i] - tab:Formula409() + local this = _G["CombatConfigTab"..i] + if(this) then + this:Formula409() + end end CombatConfigSettingsNameEditBox:SetEditboxTemplate() ChatConfigFrame:SetPanelTemplate("Pattern", true) for i = 1, #SystemFrameList9 do - local QueuedFrames = _G[SystemFrameList9[i]] - QueuedFrames:Formula409() - QueuedFrames:SetFixedPanelTemplate("Inset", true) + local this = _G[SystemFrameList9[i]] + if(this) then + this:Formula409() + this:SetFixedPanelTemplate("Inset", true) + end end for i = 1, #SystemFrameList10 do - local QueuedFrames = _G[SystemFrameList10[i]] - QueuedFrames:ClearAllPoints() - if QueuedFrames == CombatConfigColorsColorizeSpellNames then - QueuedFrames:Point("TOP",CombatConfigColorsColorizeUnitName,"BOTTOM",0,-2) - else - QueuedFrames:Point("TOP",_G[SystemFrameList10[i-1]],"BOTTOM",0,-2) + local this = _G[SystemFrameList10[i]] + if(this) then + this:ClearAllPoints() + if this == CombatConfigColorsColorizeSpellNames then + this:Point("TOP",CombatConfigColorsColorizeUnitName,"BOTTOM",0,-2) + else + this:Point("TOP",_G[SystemFrameList10[i-1]],"BOTTOM",0,-2) + end end end ChatConfigChannelSettingsLeft:RegisterEvent("PLAYER_ENTERING_WORLD") @@ -772,20 +800,20 @@ local function SystemPanelQue() end end) for i = 1,#COMBAT_CONFIG_TABS do - local cctab = _G["CombatConfigTab"..i] - if cctab then - MOD:ApplyTabStyle(cctab) - cctab:SetHeight(cctab:GetHeight()-2) - cctab:SetWidth(ceil(cctab:GetWidth()+1.6)) + local this = _G["CombatConfigTab"..i] + if(this) then + MOD:ApplyTabStyle(this) + this:SetHeight(this:GetHeight()-2) + this:SetWidth(ceil(this:GetWidth()+1.6)) _G["CombatConfigTab"..i.."Text"]:SetPoint("BOTTOM",0,10) end end CombatConfigTab1:ClearAllPoints() CombatConfigTab1:SetPoint("BOTTOMLEFT",ChatConfigBackgroundFrame,"TOPLEFT",6,-2) for i = 1, #SystemFrameList11 do - local ccbtn = _G[SystemFrameList11[i]] - if ccbtn then - ccbtn:SetButtonTemplate() + local this = _G[SystemFrameList11[i]] + if(this) then + this:SetButtonTemplate() end end ChatConfigFrameOkayButton:SetPoint("TOPRIGHT",ChatConfigBackgroundFrame,"BOTTOMRIGHT",-3,-5) @@ -795,8 +823,10 @@ local function SystemPanelQue() ChatConfigCombatSettingsFiltersCopyFilterButton:SetPoint("RIGHT",ChatConfigCombatSettingsFiltersDeleteButton,"LEFT",-2,0) ChatConfigCombatSettingsFiltersAddFilterButton:SetPoint("RIGHT",ChatConfigCombatSettingsFiltersCopyFilterButton,"LEFT",-2,0) for i = 1, #SystemFrameList12 do - local ccbtn = _G[SystemFrameList12[i]] - ccbtn:SetCheckboxTemplate(true) + local this = _G[SystemFrameList12[i]] + if(this) then + this:SetCheckboxTemplate(true) + end end MOD:ApplyPaginationStyle(ChatConfigMoveFilterUpButton,true) MOD:ApplyPaginationStyle(ChatConfigMoveFilterDownButton,true) @@ -836,24 +866,24 @@ local function SystemPanelQue() end end for i = 1, #SystemFrameList13 do - local QueuedFrames = _G[SystemFrameList13[i]] - if QueuedFrames then - QueuedFrames:Formula409() - QueuedFrames:SetFixedPanelTemplate("Inset") - if QueuedFrames ~= _G["VideoOptionsFramePanelContainer"] and QueuedFrames ~= _G["InterfaceOptionsFramePanelContainer"] then - QueuedFrames.Panel:Point("TOPLEFT",-1,0) - QueuedFrames.Panel:Point("BOTTOMRIGHT",0,1) + local this = _G[SystemFrameList13[i]] + if(this) then + this:Formula409() + this:SetFixedPanelTemplate("Inset") + if this ~= _G["VideoOptionsFramePanelContainer"] and this ~= _G["InterfaceOptionsFramePanelContainer"] then + this.Panel:Point("TOPLEFT",-1,0) + this.Panel:Point("BOTTOMRIGHT",0,1) else - QueuedFrames.Panel:Point("TOPLEFT", 0, 0) - QueuedFrames.Panel:Point("BOTTOMRIGHT", 0, 0) + this.Panel:Point("TOPLEFT", 0, 0) + this.Panel:Point("BOTTOMRIGHT", 0, 0) end end end for i = 1, #SystemFrameList14 do - local itab = _G[SystemFrameList14[i]] - if itab then - itab:Formula409() - MOD:ApplyTabStyle(itab) + local this = _G[SystemFrameList14[i]] + if(this) then + this:Formula409() + MOD:ApplyTabStyle(this) end end InterfaceOptionsFrameTab1:ClearAllPoints() @@ -865,49 +895,55 @@ local function SystemPanelQue() InterfaceOptionsFrameDefaults:SetPoint("TOPLEFT",InterfaceOptionsFrameCategories,"BOTTOMLEFT",-1,-5) InterfaceOptionsFrameCancel:SetPoint("TOPRIGHT",InterfaceOptionsFramePanelContainer,"BOTTOMRIGHT",0,-6) for i = 1, #SystemFrameList15 do - local icheckbox = _G["InterfaceOptions"..SystemFrameList15[i]] - if icheckbox then - icheckbox:SetCheckboxTemplate(true) + local this = _G["InterfaceOptions"..SystemFrameList15[i]] + if(this) then + this:SetCheckboxTemplate(true) end end for i = 1, #SystemFrameList16 do - local idropdown = _G["InterfaceOptions"..SystemFrameList16[i]] - if idropdown then - MOD:ApplyDropdownStyle(idropdown) + local this = _G["InterfaceOptions"..SystemFrameList16[i]] + if(this) then + MOD:ApplyDropdownStyle(this) DropDownList1:SetFixedPanelTemplate("Default", true) end end InterfaceOptionsHelpPanelResetTutorials:SetButtonTemplate() for i = 1, #SystemFrameList17 do - local ocheckbox = _G[SystemFrameList17[i]] - if ocheckbox then - ocheckbox:SetCheckboxTemplate(true) + local this = _G[SystemFrameList17[i]] + if(this) then + this:SetCheckboxTemplate(true) end end for i = 1, #SystemFrameList18 do - local odropdown = _G[SystemFrameList18[i]] - if odropdown then - MOD:ApplyDropdownStyle(odropdown,165) + local this = _G[SystemFrameList18[i]] + if(this) then + MOD:ApplyDropdownStyle(this,165) DropDownList1:SetFixedPanelTemplate("Default", true) end end - for _, button in pairs(SystemFrameList19) do - _G[button]:SetButtonTemplate() + for i = 1, #SystemFrameList19 do + local this = _G[SystemFrameList19[i]] + if(this) then + this:SetButtonTemplate() + end end AudioOptionsVoicePanelChatMode1KeyBindingButton:ClearAllPoints() AudioOptionsVoicePanelChatMode1KeyBindingButton:Point("CENTER", AudioOptionsVoicePanelBinding, "CENTER", 0, -10) CompactUnitFrameProfilesRaidStylePartyFrames:SetCheckboxTemplate(true) CompactUnitFrameProfilesGeneralOptionsFrameResetPositionButton:SetButtonTemplate() for i = 1, #SystemFrameList20 do - local icheckbox = _G["CompactUnitFrameProfilesGeneralOptionsFrame"..SystemFrameList20[i]] - if icheckbox then - icheckbox:SetCheckboxTemplate(true) - icheckbox:SetFrameLevel(40) + local this = _G["CompactUnitFrameProfilesGeneralOptionsFrame"..SystemFrameList20[i]] + if(this) then + this:SetCheckboxTemplate(true) + this:SetFrameLevel(40) end end Graphics_RightQuality:MUNG() - for _, slider in pairs(SystemFrameList21) do - MOD:ApplyScrollbarStyle(_G[slider]) + for i = 1, #SystemFrameList21 do + local this = _G[SystemFrameList21[i]] + if(this) then + MOD:ApplyScrollbarStyle(this) + end end MacOptionsFrame:Formula409() MacOptionsFrame:SetFixedPanelTemplate() @@ -924,8 +960,10 @@ local function SystemPanelQue() MOD:ApplyDropdownStyle(MacOptionsFrameCodecDropDown) MOD:ApplyScrollbarStyle(MacOptionsFrameQualitySlider) for i = 1, 11 do - local b = _G["MacOptionsFrameCheckButton"..i] - b:SetCheckboxTemplate(true) + local this = _G["MacOptionsFrameCheckButton"..i] + if(this) then + this:SetCheckboxTemplate(true) + end end MacOptionsButtonKeybindings:ClearAllPoints() MacOptionsButtonKeybindings:SetPoint("LEFT", MacOptionsFrameDefaults, "RIGHT", 2, 0)