From bec12d0f0db2ee5ad434f86431b4bae56baa35b6 Mon Sep 17 00:00:00 2001 From: Crum Date: Mon, 11 Jun 2018 22:50:02 -0500 Subject: [PATCH] cleanup: remove arena & boss --- !Compatibility/api/wowAPI.lua | 2 - ElvUI/Core/ClassCache.lua | 2 +- ElvUI/Core/core.lua | 2 +- ElvUI/Core/fonts.lua | 2 +- ElvUI/Core/install.lua | 6 -- .../oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua | 7 ++- ElvUI/Modules/Maps/Minimap.lua | 7 +-- ElvUI/Modules/Misc/Misc.lua | 2 +- ElvUI/Modules/Skins/Blizzard/Misc.lua | 26 --------- ElvUI/Modules/UnitFrames/Groups/Party.lua | 2 +- ElvUI/Modules/UnitFrames/UnitFrames.lua | 1 - ElvUI/Settings/Private.lua | 3 - ElvUI_Config/UnitFrames.lua | 57 +++++-------------- 13 files changed, 25 insertions(+), 94 deletions(-) diff --git a/!Compatibility/api/wowAPI.lua b/!Compatibility/api/wowAPI.lua index 27d8e84..31da465 100644 --- a/!Compatibility/api/wowAPI.lua +++ b/!Compatibility/api/wowAPI.lua @@ -226,8 +226,6 @@ local function GetMaxPlayersByType(instanceType, zoneName) return 40 elseif instanceType == "party" then return 5 - elseif instanceType == "arena" then - return 5 elseif zoneName ~= "" and zoneInfo[zoneName] then if instanceType == "pvp" then return zoneInfo[zoneName].maxPlayers diff --git a/ElvUI/Core/ClassCache.lua b/ElvUI/Core/ClassCache.lua index c28d86e..2532936 100644 --- a/ElvUI/Core/ClassCache.lua +++ b/ElvUI/Core/ClassCache.lua @@ -245,7 +245,7 @@ function CC:PLAYER_ENTERING_WORLD() local inInstance, instanceType = IsInInstance() self.inInstance = inInstance - if instanceType == "arena" or instanceType == "pvp" then + if instanceType == "pvp" then self.inBattleground = true else self.inBattleground = false diff --git a/ElvUI/Core/core.lua b/ElvUI/Core/core.lua index c1f41a1..caa0ea9 100644 --- a/ElvUI/Core/core.lua +++ b/ElvUI/Core/core.lua @@ -760,7 +760,7 @@ end function E:SendMessage() local numParty, numRaid = GetNumPartyMembers(), GetNumRaidMembers() local inInstance, instanceType = IsInInstance() - if inInstance and (instanceType == "pvp" or instanceType == "arena") then + if inInstance and (instanceType == "pvp") then SendAddonMessage("ELVUI_VERSIONCHK", E.version, "BATTLEGROUND") else if numRaid > 0 then diff --git a/ElvUI/Core/fonts.lua b/ElvUI/Core/fonts.lua index a9c9fae..64e12e4 100644 --- a/ElvUI/Core/fonts.lua +++ b/ElvUI/Core/fonts.lua @@ -58,7 +58,7 @@ function E:UpdateBlizzardFonts() SetFont(GameFontNormalSmall, NORMAL, self.db.general.fontSize); SetFont(GameFontNormalLarge, NORMAL, self.db.general.fontSize); SetFont(GameFontNormalHuge, NORMAL, 25, MONOCHROME .. "OUTLINE"); - SetFont(BossEmoteNormalHuge, NORMAL, 25, MONOCHROME .. "OUTLINE"); + -- SetFont(BossEmoteNormalHuge, NORMAL, 25, MONOCHROME .. "OUTLINE"); SetFont(GameFontBlack, NORMAL, self.db.general.fontSize); SetFont(NumberFontNormal, NUMBER, self.db.general.fontSize, MONOCHROME .. "OUTLINE"); SetFont(NumberFontNormalSmall, NUMBER, self.db.general.fontSize); diff --git a/ElvUI/Core/install.lua b/ElvUI/Core/install.lua index 93cf099..64f0ecd 100644 --- a/ElvUI/Core/install.lua +++ b/ElvUI/Core/install.lua @@ -322,9 +322,6 @@ function E:SetupResolution(noDataReset) E.db.unitframe.units.targettarget.power.enable = false E.db.unitframe.units.targettarget.width = 200 E.db.unitframe.units.targettarget.height = 26 - - E.db.unitframe.units.arena.width = 200 - E.db.unitframe.units.arena.castbar.width = 200 end local isPixel = E.private.general.pixelPerfect @@ -553,9 +550,6 @@ function E:SetupLayout(layout, noDataReset) E.db.unitframe.units.targettarget.power.enable = false E.db.unitframe.units.targettarget.width = 200 E.db.unitframe.units.targettarget.height = 26 - - E.db.unitframe.units.arena.width = 200 - E.db.unitframe.units.arena.castbar.width = 200 end if layout == "dpsCaster" or layout == "healer" or (layout == "dpsMelee" and E.myclass == "HUNTER") then diff --git a/ElvUI/Libraries/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua b/ElvUI/Libraries/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua index 6a97b8a..bf860a6 100644 --- a/ElvUI/Libraries/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua +++ b/ElvUI/Libraries/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua @@ -45,9 +45,10 @@ local function SetAnchors(self) for index = 1, getn(bars) do local frame = bars[index] local anchor = frame.anchor - frame:Height(self.auraBarHeight or 20) - frame.statusBar.iconHolder:Size(frame:GetHeight()) - frame:Width((self.auraBarWidth or self:GetWidth()) - (frame:GetHeight() + (self.gap or 0))) + frame:SetHeight(self.auraBarHeight or 20) + frame.statusBar.iconHolder:SetWidth(frame:GetHeight()) + frame.statusBar.iconHolder:SetHeight(frame:GetHeight()) + frame:SetWidth((self.auraBarWidth or self:GetWidth()) - (frame:GetHeight() + (self.gap or 0))) frame:ClearAllPoints() if self.down == true then if self == anchor then -- Root frame so indent for icon diff --git a/ElvUI/Modules/Maps/Minimap.lua b/ElvUI/Modules/Maps/Minimap.lua index 4d9951e..a3ac2f5 100644 --- a/ElvUI/Modules/Maps/Minimap.lua +++ b/ElvUI/Modules/Maps/Minimap.lua @@ -10,7 +10,6 @@ local strsub = strsub local CreateFrame = CreateFrame local ToggleCharacter = ToggleCharacter local ToggleFrame = ToggleFrame -local ToggleAchievementFrame = ToggleAchievementFrame local ToggleFriendsFrame = ToggleFriendsFrame local IsAddOnLoaded = IsAddOnLoaded local ToggleHelpFrame = ToggleHelpFrame @@ -48,11 +47,7 @@ end function M:GetLocTextColor() local pvpType = GetZonePVPInfo() - if pvpType == "sanctuary" then - return 0.035, 0.58, 0.84 - elseif pvpType == "arena" then - return 0.84, 0.03, 0.03 - elseif pvpType == "friendly" then + if pvpType == "friendly" then return 0.05, 0.85, 0.03 elseif pvpType == "hostile" then return 0.84, 0.03, 0.03 diff --git a/ElvUI/Modules/Misc/Misc.lua b/ElvUI/Modules/Misc/Misc.lua index a2cfce4..ec34fb8 100644 --- a/ElvUI/Modules/Misc/Misc.lua +++ b/ElvUI/Modules/Misc/Misc.lua @@ -116,7 +116,7 @@ end function M:PVPMessageEnhancement(_, msg) if not E.db.general.enhancedPvpMessages then return end local _, instanceType = IsInInstance() - if instanceType == "pvp" or instanceType == "arena" then + if instanceType == "pvp" then RaidNotice_AddMessage(RaidBossEmoteFrame, msg, ChatTypeInfo["RAID_BOSS_EMOTE"]) end end diff --git a/ElvUI/Modules/Skins/Blizzard/Misc.lua b/ElvUI/Modules/Skins/Blizzard/Misc.lua index ec5bde0..893a3f6 100644 --- a/ElvUI/Modules/Skins/Blizzard/Misc.lua +++ b/ElvUI/Modules/Skins/Blizzard/Misc.lua @@ -265,32 +265,6 @@ local function LoadSkin() E:Point(StackSplitFrame.bg1, "BOTTOMRIGHT", -10, 55) StackSplitFrame.bg1:SetFrameLevel(StackSplitFrame.bg1:GetFrameLevel() - 1) - -- Declension frame - if GetLocale() == "ruRU" then - DeclensionFrame:SetTemplate("Transparent") - - S:HandleNextPrevButton(DeclensionFrameSetPrev) - S:HandleNextPrevButton(DeclensionFrameSetNext) - S:HandleButton(DeclensionFrameOkayButton) - S:HandleButton(DeclensionFrameCancelButton) - - for i = 1, RUSSIAN_DECLENSION_PATTERNS do - local editBox = _G["DeclensionFrameDeclension"..i.."Edit"] - if editBox then - E:StripTextures(editBox) - S:HandleEditBox(editBox) - end - end - end - - if GetLocale() == "koKR" then - S:HandleButton(GameMenuButtonRatings) - - RatingMenuFrame:SetTemplate("Transparent") - RatingMenuFrameHeader:Kill() - S:HandleButton(RatingMenuButtonOkay) - end - E:StripTextures(OpacityFrame) E:SetTemplate(OpacityFrame, "Transparent") diff --git a/ElvUI/Modules/UnitFrames/Groups/Party.lua b/ElvUI/Modules/UnitFrames/Groups/Party.lua index e434799..666b573 100644 --- a/ElvUI/Modules/UnitFrames/Groups/Party.lua +++ b/ElvUI/Modules/UnitFrames/Groups/Party.lua @@ -46,7 +46,7 @@ function UF:Update_PartyHeader(header) header:ClearAllPoints() header:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195) - E:CreateMover(header, header:GetName().."Mover", L["Party Frames"], nil, nil, nil, "ALL,PARTY,ARENA") + E:CreateMover(header, header:GetName().."Mover", L["Party Frames"], nil, nil, nil, "ALL,PARTY") header.positioned = true end end diff --git a/ElvUI/Modules/UnitFrames/UnitFrames.lua b/ElvUI/Modules/UnitFrames/UnitFrames.lua index 3e368dc..c7341e5 100644 --- a/ElvUI/Modules/UnitFrames/UnitFrames.lua +++ b/ElvUI/Modules/UnitFrames/UnitFrames.lua @@ -21,7 +21,6 @@ local GetInstanceInfo = GetInstanceInfo local UnregisterStateDriver = UnregisterStateDriver local RegisterStateDriver = RegisterStateDriver local MAX_RAID_MEMBERS = MAX_RAID_MEMBERS -local MAX_BOSS_FRAMES = MAX_BOSS_FRAMES local ns = oUF ElvUF = ns.oUF diff --git a/ElvUI/Settings/Private.lua b/ElvUI/Settings/Private.lua index 03bb53a..0e4cb41 100644 --- a/ElvUI/Settings/Private.lua +++ b/ElvUI/Settings/Private.lua @@ -103,9 +103,6 @@ V["unitframe"] = { ["disabledBlizzardFrames"] = { ["player"] = true, ["target"] = true, - ["focus"] = true, - ["boss"] = true, - ["arena"] = true, ["party"] = true, }, } diff --git a/ElvUI_Config/UnitFrames.lua b/ElvUI_Config/UnitFrames.lua index b4925fc..dc3c523 100644 --- a/ElvUI_Config/UnitFrames.lua +++ b/ElvUI_Config/UnitFrames.lua @@ -3,20 +3,14 @@ local UF = E:GetModule("UnitFrames"); local ns = oUF local ElvUF = ns.oUF - +--Cache global variables +--Lua functions local _G = _G -local next = next -local select = select -local pairs = pairs -local ipairs = ipairs -local format = string.format -local tremove = table.remove -local tconcat = table.concat -local tinsert = table.insert -local twipe = table.wipe -local strsplit = strsplit -local match = string.match -local gsub = string.gsub +local ipairs, next, pairs, select = ipairs, next, pairs, select +local find, format = string.find, string.format +local tconcat, tinsert, tremove, twipe = table.concat, table.insert, table.remove, table.wipe +local gsub, match, split = string.gsub, string.match, string.split +--WoW API / Variables local IsAddOnLoaded = IsAddOnLoaded local GetScreenWidth = GetScreenWidth local RAID_CLASS_COLORS = RAID_CLASS_COLORS @@ -113,7 +107,7 @@ local function filterPriority(auraType, groupName, value, remove, movehere, frie if not filter then return end local found = filterMatch(filter, filterValue(value)) if found and movehere then - local tbl, sv, sm = {strsplit(",",filter)} + local tbl, sv, sm = {split(",", filter)} for i in ipairs(tbl) do if tbl[i] == value then sv = i elseif tbl[i] == movehere then sm = i end if sv and sm then break end @@ -136,7 +130,7 @@ local function filterPriority(auraType, groupName, value, remove, movehere, frie if state then local stateFound = filterMatch(filter, filterValue(state)) if not stateFound then - local tbl, sv, sm = {strsplit(",",filter)} + local tbl, sv, sm = {split(",", filter)} for i in ipairs(tbl) do if tbl[i] == value then sv = i;break end end @@ -369,12 +363,12 @@ local function GetOptionsTable_AuraBars(friendlyOnly, updateFunc, groupName) -- values = function() -- local str = E.db.unitframe.units[groupName].aurabar.priority -- if str == "" then return nil end - -- return {strsplit(",",str)} + -- return {split(",", str)} -- end, -- get = function(info, value) -- local str = E.db.unitframe.units[groupName].aurabar.priority -- if str == "" then return nil end - -- local tbl = {strsplit(",",str)} + -- local tbl = {split(",", str)} -- return tbl[value] -- end, -- set = function(info, value) @@ -618,12 +612,12 @@ local function GetOptionsTable_Auras(friendlyUnitOnly, auraType, isGroupFrame, u -- values = function() -- local str = E.db.unitframe.units[groupName][auraType].priority -- if str == "" then return nil end - -- return {strsplit(",",str)} + -- return {split(",", str)} -- end, -- get = function(info, value) -- local str = E.db.unitframe.units[groupName][auraType].priority -- if str == "" then return nil end - -- local tbl = {strsplit(",",str)} + -- local tbl = {split(",", str)} -- return tbl[value] -- end, -- set = function(info, value) @@ -946,12 +940,8 @@ local function CreateCustomTextGroup(unit, objectName) set = function(info, value) E.db.unitframe.units[unit].customTexts[objectName][ info[getn(info)] ] = value; - if unit == "party" or unit:find("raid") then + if unit == "party" or find(unit, "raid") then UF:CreateAndUpdateHeaderGroup(unit) - elseif unit == "boss" then - UF:CreateAndUpdateUFGroup("boss", MAX_BOSS_FRAMES) - elseif unit == "arena" then - UF:CreateAndUpdateUFGroup("arena", 5) else UF:CreateAndUpdateUF(unit) end @@ -970,14 +960,7 @@ local function CreateCustomTextGroup(unit, objectName) E.Options.args.unitframe.args[unit].args.customText.args[objectName] = nil; E.db.unitframe.units[unit].customTexts[objectName] = nil; - if unit == "boss" or unit == "arena" then - for i=1, 5 do - if UF[unit..i] then - UF[unit..i]:Tag(UF[unit..i]["customTexts"][objectName], ""); - UF[unit..i]["customTexts"][objectName]:Hide(); - end - end - elseif unit == "party" or unit:find("raid") then + if unit == "party" or find(unit, "raid") then for i=1, UF[unit]:GetNumChildren() do local child = select(i, UF[unit]:GetChildren()) if child.Tag then @@ -2433,16 +2416,6 @@ E.Options.args.unitframe = { name = L["Focus Frame"], desc = L["Disables the focus and target of focus unitframes."], }, - boss = { - order = 4, - type = "toggle", - name = L["Boss Frames"], - }, - arena = { - order = 5, - type = "toggle", - name = L["Arena Frames"], - }, party = { order = 6, type = "toggle",