mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
cleanup: remove arena & boss
This commit is contained in:
@@ -226,8 +226,6 @@ local function GetMaxPlayersByType(instanceType, zoneName)
|
|||||||
return 40
|
return 40
|
||||||
elseif instanceType == "party" then
|
elseif instanceType == "party" then
|
||||||
return 5
|
return 5
|
||||||
elseif instanceType == "arena" then
|
|
||||||
return 5
|
|
||||||
elseif zoneName ~= "" and zoneInfo[zoneName] then
|
elseif zoneName ~= "" and zoneInfo[zoneName] then
|
||||||
if instanceType == "pvp" then
|
if instanceType == "pvp" then
|
||||||
return zoneInfo[zoneName].maxPlayers
|
return zoneInfo[zoneName].maxPlayers
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ function CC:PLAYER_ENTERING_WORLD()
|
|||||||
local inInstance, instanceType = IsInInstance()
|
local inInstance, instanceType = IsInInstance()
|
||||||
self.inInstance = inInstance
|
self.inInstance = inInstance
|
||||||
|
|
||||||
if instanceType == "arena" or instanceType == "pvp" then
|
if instanceType == "pvp" then
|
||||||
self.inBattleground = true
|
self.inBattleground = true
|
||||||
else
|
else
|
||||||
self.inBattleground = false
|
self.inBattleground = false
|
||||||
|
|||||||
+1
-1
@@ -760,7 +760,7 @@ end
|
|||||||
function E:SendMessage()
|
function E:SendMessage()
|
||||||
local numParty, numRaid = GetNumPartyMembers(), GetNumRaidMembers()
|
local numParty, numRaid = GetNumPartyMembers(), GetNumRaidMembers()
|
||||||
local inInstance, instanceType = IsInInstance()
|
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")
|
SendAddonMessage("ELVUI_VERSIONCHK", E.version, "BATTLEGROUND")
|
||||||
else
|
else
|
||||||
if numRaid > 0 then
|
if numRaid > 0 then
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ function E:UpdateBlizzardFonts()
|
|||||||
SetFont(GameFontNormalSmall, NORMAL, self.db.general.fontSize);
|
SetFont(GameFontNormalSmall, NORMAL, self.db.general.fontSize);
|
||||||
SetFont(GameFontNormalLarge, NORMAL, self.db.general.fontSize);
|
SetFont(GameFontNormalLarge, NORMAL, self.db.general.fontSize);
|
||||||
SetFont(GameFontNormalHuge, NORMAL, 25, MONOCHROME .. "OUTLINE");
|
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(GameFontBlack, NORMAL, self.db.general.fontSize);
|
||||||
SetFont(NumberFontNormal, NUMBER, self.db.general.fontSize, MONOCHROME .. "OUTLINE");
|
SetFont(NumberFontNormal, NUMBER, self.db.general.fontSize, MONOCHROME .. "OUTLINE");
|
||||||
SetFont(NumberFontNormalSmall, NUMBER, self.db.general.fontSize);
|
SetFont(NumberFontNormalSmall, NUMBER, self.db.general.fontSize);
|
||||||
|
|||||||
@@ -322,9 +322,6 @@ function E:SetupResolution(noDataReset)
|
|||||||
E.db.unitframe.units.targettarget.power.enable = false
|
E.db.unitframe.units.targettarget.power.enable = false
|
||||||
E.db.unitframe.units.targettarget.width = 200
|
E.db.unitframe.units.targettarget.width = 200
|
||||||
E.db.unitframe.units.targettarget.height = 26
|
E.db.unitframe.units.targettarget.height = 26
|
||||||
|
|
||||||
E.db.unitframe.units.arena.width = 200
|
|
||||||
E.db.unitframe.units.arena.castbar.width = 200
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local isPixel = E.private.general.pixelPerfect
|
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.power.enable = false
|
||||||
E.db.unitframe.units.targettarget.width = 200
|
E.db.unitframe.units.targettarget.width = 200
|
||||||
E.db.unitframe.units.targettarget.height = 26
|
E.db.unitframe.units.targettarget.height = 26
|
||||||
|
|
||||||
E.db.unitframe.units.arena.width = 200
|
|
||||||
E.db.unitframe.units.arena.castbar.width = 200
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if layout == "dpsCaster" or layout == "healer" or (layout == "dpsMelee" and E.myclass == "HUNTER") then
|
if layout == "dpsCaster" or layout == "healer" or (layout == "dpsMelee" and E.myclass == "HUNTER") then
|
||||||
|
|||||||
@@ -45,9 +45,10 @@ local function SetAnchors(self)
|
|||||||
for index = 1, getn(bars) do
|
for index = 1, getn(bars) do
|
||||||
local frame = bars[index]
|
local frame = bars[index]
|
||||||
local anchor = frame.anchor
|
local anchor = frame.anchor
|
||||||
frame:Height(self.auraBarHeight or 20)
|
frame:SetHeight(self.auraBarHeight or 20)
|
||||||
frame.statusBar.iconHolder:Size(frame:GetHeight())
|
frame.statusBar.iconHolder:SetWidth(frame:GetHeight())
|
||||||
frame:Width((self.auraBarWidth or self:GetWidth()) - (frame:GetHeight() + (self.gap or 0)))
|
frame.statusBar.iconHolder:SetHeight(frame:GetHeight())
|
||||||
|
frame:SetWidth((self.auraBarWidth or self:GetWidth()) - (frame:GetHeight() + (self.gap or 0)))
|
||||||
frame:ClearAllPoints()
|
frame:ClearAllPoints()
|
||||||
if self.down == true then
|
if self.down == true then
|
||||||
if self == anchor then -- Root frame so indent for icon
|
if self == anchor then -- Root frame so indent for icon
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ local strsub = strsub
|
|||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
local ToggleCharacter = ToggleCharacter
|
local ToggleCharacter = ToggleCharacter
|
||||||
local ToggleFrame = ToggleFrame
|
local ToggleFrame = ToggleFrame
|
||||||
local ToggleAchievementFrame = ToggleAchievementFrame
|
|
||||||
local ToggleFriendsFrame = ToggleFriendsFrame
|
local ToggleFriendsFrame = ToggleFriendsFrame
|
||||||
local IsAddOnLoaded = IsAddOnLoaded
|
local IsAddOnLoaded = IsAddOnLoaded
|
||||||
local ToggleHelpFrame = ToggleHelpFrame
|
local ToggleHelpFrame = ToggleHelpFrame
|
||||||
@@ -48,11 +47,7 @@ end
|
|||||||
|
|
||||||
function M:GetLocTextColor()
|
function M:GetLocTextColor()
|
||||||
local pvpType = GetZonePVPInfo()
|
local pvpType = GetZonePVPInfo()
|
||||||
if pvpType == "sanctuary" then
|
if pvpType == "friendly" then
|
||||||
return 0.035, 0.58, 0.84
|
|
||||||
elseif pvpType == "arena" then
|
|
||||||
return 0.84, 0.03, 0.03
|
|
||||||
elseif pvpType == "friendly" then
|
|
||||||
return 0.05, 0.85, 0.03
|
return 0.05, 0.85, 0.03
|
||||||
elseif pvpType == "hostile" then
|
elseif pvpType == "hostile" then
|
||||||
return 0.84, 0.03, 0.03
|
return 0.84, 0.03, 0.03
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ end
|
|||||||
function M:PVPMessageEnhancement(_, msg)
|
function M:PVPMessageEnhancement(_, msg)
|
||||||
if not E.db.general.enhancedPvpMessages then return end
|
if not E.db.general.enhancedPvpMessages then return end
|
||||||
local _, instanceType = IsInInstance()
|
local _, instanceType = IsInInstance()
|
||||||
if instanceType == "pvp" or instanceType == "arena" then
|
if instanceType == "pvp" then
|
||||||
RaidNotice_AddMessage(RaidBossEmoteFrame, msg, ChatTypeInfo["RAID_BOSS_EMOTE"])
|
RaidNotice_AddMessage(RaidBossEmoteFrame, msg, ChatTypeInfo["RAID_BOSS_EMOTE"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -265,32 +265,6 @@ local function LoadSkin()
|
|||||||
E:Point(StackSplitFrame.bg1, "BOTTOMRIGHT", -10, 55)
|
E:Point(StackSplitFrame.bg1, "BOTTOMRIGHT", -10, 55)
|
||||||
StackSplitFrame.bg1:SetFrameLevel(StackSplitFrame.bg1:GetFrameLevel() - 1)
|
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:StripTextures(OpacityFrame)
|
||||||
E:SetTemplate(OpacityFrame, "Transparent")
|
E:SetTemplate(OpacityFrame, "Transparent")
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ function UF:Update_PartyHeader(header)
|
|||||||
header:ClearAllPoints()
|
header:ClearAllPoints()
|
||||||
header:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
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
|
header.positioned = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ local GetInstanceInfo = GetInstanceInfo
|
|||||||
local UnregisterStateDriver = UnregisterStateDriver
|
local UnregisterStateDriver = UnregisterStateDriver
|
||||||
local RegisterStateDriver = RegisterStateDriver
|
local RegisterStateDriver = RegisterStateDriver
|
||||||
local MAX_RAID_MEMBERS = MAX_RAID_MEMBERS
|
local MAX_RAID_MEMBERS = MAX_RAID_MEMBERS
|
||||||
local MAX_BOSS_FRAMES = MAX_BOSS_FRAMES
|
|
||||||
|
|
||||||
local ns = oUF
|
local ns = oUF
|
||||||
ElvUF = ns.oUF
|
ElvUF = ns.oUF
|
||||||
|
|||||||
@@ -103,9 +103,6 @@ V["unitframe"] = {
|
|||||||
["disabledBlizzardFrames"] = {
|
["disabledBlizzardFrames"] = {
|
||||||
["player"] = true,
|
["player"] = true,
|
||||||
["target"] = true,
|
["target"] = true,
|
||||||
["focus"] = true,
|
|
||||||
["boss"] = true,
|
|
||||||
["arena"] = true,
|
|
||||||
["party"] = true,
|
["party"] = true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-42
@@ -3,20 +3,14 @@ local UF = E:GetModule("UnitFrames");
|
|||||||
|
|
||||||
local ns = oUF
|
local ns = oUF
|
||||||
local ElvUF = ns.oUF
|
local ElvUF = ns.oUF
|
||||||
|
--Cache global variables
|
||||||
|
--Lua functions
|
||||||
local _G = _G
|
local _G = _G
|
||||||
local next = next
|
local ipairs, next, pairs, select = ipairs, next, pairs, select
|
||||||
local select = select
|
local find, format = string.find, string.format
|
||||||
local pairs = pairs
|
local tconcat, tinsert, tremove, twipe = table.concat, table.insert, table.remove, table.wipe
|
||||||
local ipairs = ipairs
|
local gsub, match, split = string.gsub, string.match, string.split
|
||||||
local format = string.format
|
--WoW API / Variables
|
||||||
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 IsAddOnLoaded = IsAddOnLoaded
|
local IsAddOnLoaded = IsAddOnLoaded
|
||||||
local GetScreenWidth = GetScreenWidth
|
local GetScreenWidth = GetScreenWidth
|
||||||
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
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
|
if not filter then return end
|
||||||
local found = filterMatch(filter, filterValue(value))
|
local found = filterMatch(filter, filterValue(value))
|
||||||
if found and movehere then
|
if found and movehere then
|
||||||
local tbl, sv, sm = {strsplit(",",filter)}
|
local tbl, sv, sm = {split(",", filter)}
|
||||||
for i in ipairs(tbl) do
|
for i in ipairs(tbl) do
|
||||||
if tbl[i] == value then sv = i elseif tbl[i] == movehere then sm = i end
|
if tbl[i] == value then sv = i elseif tbl[i] == movehere then sm = i end
|
||||||
if sv and sm then break end
|
if sv and sm then break end
|
||||||
@@ -136,7 +130,7 @@ local function filterPriority(auraType, groupName, value, remove, movehere, frie
|
|||||||
if state then
|
if state then
|
||||||
local stateFound = filterMatch(filter, filterValue(state))
|
local stateFound = filterMatch(filter, filterValue(state))
|
||||||
if not stateFound then
|
if not stateFound then
|
||||||
local tbl, sv, sm = {strsplit(",",filter)}
|
local tbl, sv, sm = {split(",", filter)}
|
||||||
for i in ipairs(tbl) do
|
for i in ipairs(tbl) do
|
||||||
if tbl[i] == value then sv = i;break end
|
if tbl[i] == value then sv = i;break end
|
||||||
end
|
end
|
||||||
@@ -369,12 +363,12 @@ local function GetOptionsTable_AuraBars(friendlyOnly, updateFunc, groupName)
|
|||||||
-- values = function()
|
-- values = function()
|
||||||
-- local str = E.db.unitframe.units[groupName].aurabar.priority
|
-- local str = E.db.unitframe.units[groupName].aurabar.priority
|
||||||
-- if str == "" then return nil end
|
-- if str == "" then return nil end
|
||||||
-- return {strsplit(",",str)}
|
-- return {split(",", str)}
|
||||||
-- end,
|
-- end,
|
||||||
-- get = function(info, value)
|
-- get = function(info, value)
|
||||||
-- local str = E.db.unitframe.units[groupName].aurabar.priority
|
-- local str = E.db.unitframe.units[groupName].aurabar.priority
|
||||||
-- if str == "" then return nil end
|
-- if str == "" then return nil end
|
||||||
-- local tbl = {strsplit(",",str)}
|
-- local tbl = {split(",", str)}
|
||||||
-- return tbl[value]
|
-- return tbl[value]
|
||||||
-- end,
|
-- end,
|
||||||
-- set = function(info, value)
|
-- set = function(info, value)
|
||||||
@@ -618,12 +612,12 @@ local function GetOptionsTable_Auras(friendlyUnitOnly, auraType, isGroupFrame, u
|
|||||||
-- values = function()
|
-- values = function()
|
||||||
-- local str = E.db.unitframe.units[groupName][auraType].priority
|
-- local str = E.db.unitframe.units[groupName][auraType].priority
|
||||||
-- if str == "" then return nil end
|
-- if str == "" then return nil end
|
||||||
-- return {strsplit(",",str)}
|
-- return {split(",", str)}
|
||||||
-- end,
|
-- end,
|
||||||
-- get = function(info, value)
|
-- get = function(info, value)
|
||||||
-- local str = E.db.unitframe.units[groupName][auraType].priority
|
-- local str = E.db.unitframe.units[groupName][auraType].priority
|
||||||
-- if str == "" then return nil end
|
-- if str == "" then return nil end
|
||||||
-- local tbl = {strsplit(",",str)}
|
-- local tbl = {split(",", str)}
|
||||||
-- return tbl[value]
|
-- return tbl[value]
|
||||||
-- end,
|
-- end,
|
||||||
-- set = function(info, value)
|
-- set = function(info, value)
|
||||||
@@ -946,12 +940,8 @@ local function CreateCustomTextGroup(unit, objectName)
|
|||||||
set = function(info, value)
|
set = function(info, value)
|
||||||
E.db.unitframe.units[unit].customTexts[objectName][ info[getn(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)
|
UF:CreateAndUpdateHeaderGroup(unit)
|
||||||
elseif unit == "boss" then
|
|
||||||
UF:CreateAndUpdateUFGroup("boss", MAX_BOSS_FRAMES)
|
|
||||||
elseif unit == "arena" then
|
|
||||||
UF:CreateAndUpdateUFGroup("arena", 5)
|
|
||||||
else
|
else
|
||||||
UF:CreateAndUpdateUF(unit)
|
UF:CreateAndUpdateUF(unit)
|
||||||
end
|
end
|
||||||
@@ -970,14 +960,7 @@ local function CreateCustomTextGroup(unit, objectName)
|
|||||||
E.Options.args.unitframe.args[unit].args.customText.args[objectName] = nil;
|
E.Options.args.unitframe.args[unit].args.customText.args[objectName] = nil;
|
||||||
E.db.unitframe.units[unit].customTexts[objectName] = nil;
|
E.db.unitframe.units[unit].customTexts[objectName] = nil;
|
||||||
|
|
||||||
if unit == "boss" or unit == "arena" then
|
if unit == "party" or find(unit, "raid") 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
|
|
||||||
for i=1, UF[unit]:GetNumChildren() do
|
for i=1, UF[unit]:GetNumChildren() do
|
||||||
local child = select(i, UF[unit]:GetChildren())
|
local child = select(i, UF[unit]:GetChildren())
|
||||||
if child.Tag then
|
if child.Tag then
|
||||||
@@ -2433,16 +2416,6 @@ E.Options.args.unitframe = {
|
|||||||
name = L["Focus Frame"],
|
name = L["Focus Frame"],
|
||||||
desc = L["Disables the focus and target of focus unitframes."],
|
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 = {
|
party = {
|
||||||
order = 6,
|
order = 6,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
|
|||||||
Reference in New Issue
Block a user