Commit f95f9370 authored by Simpy's avatar Simpy 🐹

11.44

parent 1296f7f3
## Interface: 80300
## Author: Elv, Simpy
## Version: 11.43
## Version: 11.44
## Title: |cff1784d1ElvUI|r
## Notes: User Interface replacement AddOn for World of Warcraft.
## SavedVariables: ElvDB, ElvPrivateDB
......
......@@ -39,6 +39,10 @@ local LSM = E.Libs.LSM
local Masque = E.Masque
local MasqueGroup = Masque and Masque:Group("ElvUI", "ActionBars")
local hiddenParent = CreateFrame("Frame", nil, _G.UIParent)
hiddenParent:SetAllPoints()
hiddenParent:Hide()
AB.RegisterCooldown = E.RegisterCooldown
AB.handledBars = {} --List of all bars
AB.handledbuttons = {} --List of all buttons that have been modified.
......@@ -462,42 +466,6 @@ function AB:UpdateBar1Paging()
else
AB.barDefaults.bar1.conditions = format("[possessbar] %d; [overridebar] %d; [shapeshift] 13; [form,noform] 0; [bar:2] 2; [bar:3] 3; [bar:4] 4; [bar:5] 5; [bar:6] 6;", GetVehicleBarIndex(), GetOverrideBarIndex())
end
if (not E.private.actionbar.enable or InCombatLockdown()) or not AB.isInitialized then return; end
local bar2Option = _G.InterfaceOptionsActionBarsPanelBottomRight
local bar3Option = _G.InterfaceOptionsActionBarsPanelBottomLeft
local bar4Option = _G.InterfaceOptionsActionBarsPanelRightTwo
local bar5Option = _G.InterfaceOptionsActionBarsPanelRight
if (AB.db.bar2.enabled and not bar2Option:GetChecked()) or (not AB.db.bar2.enabled and bar2Option:GetChecked()) then
bar2Option:Click()
end
if (AB.db.bar3.enabled and not bar3Option:GetChecked()) or (not AB.db.bar3.enabled and bar3Option:GetChecked()) then
bar3Option:Click()
end
if not AB.db.bar5.enabled and not AB.db.bar4.enabled then
if bar4Option:GetChecked() then
bar4Option:Click()
end
if bar5Option:GetChecked() then
bar5Option:Click()
end
elseif not AB.db.bar5.enabled then
if not bar5Option:GetChecked() then
bar5Option:Click()
end
if not bar4Option:GetChecked() then
bar4Option:Click()
end
elseif (AB.db.bar4.enabled and not bar4Option:GetChecked()) or (not AB.db.bar4.enabled and bar4Option:GetChecked()) then
bar4Option:Click()
elseif (AB.db.bar5.enabled and not bar5Option:GetChecked()) or (not AB.db.bar5.enabled and bar5Option:GetChecked()) then
bar5Option:Click()
end
end
function AB:UpdateButtonSettingsForBar(barName)
......@@ -779,11 +747,11 @@ end
function AB:DisableBlizzard()
-- dont blindly add to this table, the first 5 get their events registered
for i, name in ipairs({"OverrideActionBar", "StanceBarFrame", "PossessBarFrame", "PetActionBarFrame", "MultiCastActionBarFrame", "MainMenuBar", "MicroButtonAndBagsBar", "MultiBarBottomLeft", "MultiBarBottomRight", "MultiBarLeft", "MultiBarRight"}) do
_G.UIPARENT_MANAGED_FRAME_POSITIONS[name] = nil
local frame = _G[name]
if i < 6 then frame:UnregisterAllEvents() end
RegisterStateDriver(frame, 'visibility', 'hide')
_G.UIPARENT_MANAGED_FRAME_POSITIONS[name] = nil
frame:SetParent(hiddenParent)
end
for _, name in ipairs({"ActionButton", "MultiBarBottomLeftButton", "MultiBarBottomRightButton", "MultiBarRightButton", "MultiBarLeftButton", "OverrideActionBarButton", "MultiCastActionButton"}) do
......@@ -793,18 +761,15 @@ function AB:DisableBlizzard()
end
end
-- MainMenuBar:ClearAllPoints taint during combat
_G.MainMenuBar.SetPositionForStatusBars = E.noop
-- shut down some events for things we dont use
_G.StatusTrackingBarManager:UnregisterAllEvents()
_G.MainMenuBarArtFrame:UnregisterAllEvents()
_G.ActionBarController:UnregisterAllEvents()
_G.ActionBarController:RegisterEvent('UPDATE_EXTRA_ACTIONBAR')
-- * these seem to work but keep an eye on them for possible new taints spawned
-- MultiBarRight:SetShown taint during combat from: SpellBookFrame, ZoneAbility, and ActionBarController
_G.ActionBarController_UpdateAll = E.noop -- this seems to work
-- MainMenuBar:ClearAllPoints taint during combat from: MainMenuBar
_G.MainMenuBar.SetPositionForStatusBars = E.noop -- this seems to work
-- hide some interface options we dont use
_G.InterfaceOptionsActionBarsPanelStackRightBars:SetScale(0.5)
_G.InterfaceOptionsActionBarsPanelStackRightBars:SetAlpha(0)
......
......@@ -57,7 +57,7 @@ local GetPlayerCommunityLink = GetPlayerCommunityLink
local GetPlayerInfoByGUID = GetPlayerInfoByGUID
local GetPlayerLink = GetPlayerLink
local GetRaidRosterInfo = GetRaidRosterInfo
local GetTime, GMError = GetTime, GMError
local GMError = GMError
local GMChatFrame_IsGM = GMChatFrame_IsGM
local hooksecurefunc = hooksecurefunc
local InCombatLockdown = InCombatLockdown
......@@ -1393,21 +1393,23 @@ function CH:AddPluginMessageFilter(func, position)
end
--Modified copy from FrameXML ChatFrame.lua to add CUSTOM_CLASS_COLORS (args were changed)
function CH:GetColoredName(event, classColor, _, arg2, _, _, _, _, _, arg8, _, _, _, arg12)
function CH:GetColoredName(event, _, arg2, _, _, _, _, _, arg8, _, _, _, arg12)
local chatType = strsub(event, 10)
if strsub(chatType, 1, 7) == "WHISPER" then chatType = "WHISPER" end
if strsub(chatType, 1, 7) == "CHANNEL" then chatType = "CHANNEL"..arg8 end
local subType = strsub(chatType, 1, 7)
if subType == "WHISPER" then
chatType = "WHISPER"
elseif subType == "CHANNEL" then
chatType = "CHANNEL"..arg8
end
--ambiguate guild chat names
arg2 = Ambiguate(arg2, (chatType == "GUILD" and "guild") or "none")
local info = (classColor or arg12) and _G.ChatTypeInfo[chatType]
local info = arg12 and _G.ChatTypeInfo[chatType]
if info and Chat_ShouldColorChatByClass(info) then
if not classColor then
local data = CH:GetPlayerInfoByGUID(arg12)
classColor = data and data.classColor
end
local data = CH:GetPlayerInfoByGUID(arg12)
local classColor = data and data.classColor
if classColor then
return format("\124cff%.2x%.2x%.2x%s\124r", classColor.r*255, classColor.g*255, classColor.b*255, arg2)
end
......@@ -1485,16 +1487,15 @@ function CH:ChatFrame_MessageEventHandler(frame, event, arg1, arg2, arg3, arg4,
arg2 = E.NameReplacements[arg2] or arg2
-- data from populated guid info
local classColor, nameWithRealm, realm
local nameWithRealm, realm
local data = CH:GetPlayerInfoByGUID(arg12)
if data then
realm = data.realm
classColor = data.classColor
nameWithRealm = data.nameWithRealm
end
-- fetch the name color to use
local coloredName = historySavedName or CH:GetColoredName(event, classColor, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14)
local coloredName = historySavedName or CH:GetColoredName(event, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14)
local channelLength = strlen(arg4)
local infoType = chatType
......@@ -2313,7 +2314,7 @@ function CH:SaveChatHistory(event, ...)
local coloredName, battleTag
if tempHistory[13] > 0 then coloredName, battleTag = CH:GetBNFriendColor(tempHistory[2], tempHistory[13], true) end
if battleTag then tempHistory[53] = battleTag end -- store the battletag, only when the person is known by battletag, so we can replace arg2 later in the function
tempHistory[52] = coloredName or CH:GetColoredName(event, nil, ...)
tempHistory[52] = coloredName or CH:GetColoredName(event, ...)
tinsert(data, tempHistory)
while #data >= CH.db.historySize do
......@@ -2341,22 +2342,19 @@ function CH:FCF_SetWindowAlpha(frame, alpha)
end
function CH:CheckLFGRoles()
local isInGroup, isInRaid = IsInGroup(), IsInRaid()
local unit, name, realm = (isInRaid and "raid" or "party")
if not CH.db.lfgIcons or not IsInGroup() then return end
wipe(lfgRoles)
if not isInGroup or not CH.db.lfgIcons then return end
local role = UnitGroupRolesAssigned("player")
if role then
lfgRoles[PLAYER_NAME] = rolePaths[role]
local playerRole = UnitGroupRolesAssigned("player")
if playerRole then
lfgRoles[PLAYER_NAME] = rolePaths[playerRole]
end
local unit = (IsInRaid() and "raid" or "party")
for i = 1, GetNumGroupMembers() do
if UnitExists(unit..i) and not UnitIsUnit(unit..i, "player") then
role = UnitGroupRolesAssigned(unit..i)
name, realm = UnitName(unit..i)
local role = UnitGroupRolesAssigned(unit..i)
local name, realm = UnitName(unit..i)
if role and name then
name = (realm and realm ~= '' and name..'-'..realm) or name..'-'..PLAYER_REALM
......
local E, L, V, P, G = unpack(select(2, ...)); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local DT = E:GetModule('DataTexts')
local _G = _G
local strjoin = strjoin
local UnitStat = UnitStat
local GetSpecialization = GetSpecialization
......@@ -9,17 +10,12 @@ local SPEC_FRAME_PRIMARY_STAT = SPEC_FRAME_PRIMARY_STAT
local displayString, lastPanel = ''
local SPEC_STAT_STRINGS = {
[_G.LE_UNIT_STAT_STRENGTH] = _G.SPEC_FRAME_PRIMARY_STAT_STRENGTH,
[_G.LE_UNIT_STAT_AGILITY] = _G.SPEC_FRAME_PRIMARY_STAT_AGILITY,
[_G.LE_UNIT_STAT_INTELLECT] = _G.SPEC_FRAME_PRIMARY_STAT_INTELLECT,
}
local function OnEvent(self)
local StatID = DT.SPECIALIZATION_CACHE[GetSpecialization()] and DT.SPECIALIZATION_CACHE[GetSpecialization()].statID
if StatID then
self.text:SetFormattedText(displayString, SPEC_STAT_STRINGS[StatID]..': ', UnitStat("player", StatID))
local name = StatID and _G['SPELL_STAT'..StatID..'_NAME']
if name then
self.text:SetFormattedText(displayString, name..': ', UnitStat('player', StatID))
end
lastPanel = self
......@@ -35,4 +31,4 @@ end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('Primary Stat', STAT_CATEGORY_ATTRIBUTES, { "UNIT_STATS", "UNIT_AURA", "ACTIVE_TALENT_GROUP_CHANGED", "PLAYER_TALENT_UPDATE" }, OnEvent, nil, nil, nil, nil, SPEC_FRAME_PRIMARY_STAT:gsub('[::%s]-%%s$',''))
DT:RegisterDatatext('Primary Stat', STAT_CATEGORY_ATTRIBUTES, { 'UNIT_STATS', 'UNIT_AURA', 'ACTIVE_TALENT_GROUP_CHANGED', 'PLAYER_TALENT_UPDATE' }, OnEvent, nil, nil, nil, nil, SPEC_FRAME_PRIMARY_STAT:gsub('[::%s]-%%s$',''))
......@@ -176,12 +176,14 @@ local function Chat_OnMouseWheel(self, delta)
end
local function Chat_OnEvent(self, event, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14)
local coloredName = GetColoredName(event, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14)
local type = strsub(event, 10)
local info = _G.ChatTypeInfo[type]
local coloredName
if event == 'CHAT_MSG_BN_WHISPER' then
coloredName = CH:GetBNFriendColor(arg2, arg13)
else
coloredName = CH:GetColoredName(event, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14)
end
arg1 = RemoveExtraSpaces(arg1)
......
......@@ -86,7 +86,7 @@ function NP:Castbar_PostCastStart(unit)
end
function NP:Castbar_PostCastFail()
self:SetStatusBarColor(.3, .3, .3)
self:SetStatusBarColor(NP.db.colors.castInterruptedColor.r, NP.db.colors.castInterruptedColor.g, NP.db.colors.castInterruptedColor.b)
NP:StyleFilterUpdate(self.__owner, 'FAKE_Casting')
end
......
......@@ -307,7 +307,7 @@ function TT:SetUnitText(tt, unit)
end
if (creatureClassification == 'rare' or creatureClassification == 'elite' or creatureClassification == 'rareelite' or creatureClassification == 'worldboss') then
classificationString = format('%s %s|r', ElvUF.Tags.Methods['classificationcolor'](unit), ElvUF.Tags.Methods["classification"](unit))
classificationString = format('%s %s|r', ElvUF.Tags.Methods['classificationcolor'](unit), ElvUF.Tags.Methods['classification'](unit))
end
levelLine:SetFormattedText('|cff%02x%02x%02x%s|r%s %s%s', diffColor.r * 255, diffColor.g * 255, diffColor.b * 255, level > 0 and level or '??', classificationString, creatureType, pvpFlag)
......
......@@ -3,7 +3,7 @@ local E, L, V, P, G = unpack(select(2, ...)) --Import: Engine, Locales, PrivateD
--Global Settings
G.general = {
UIScale = 0.64,
version = 11.43,
version = 11.44,
locale = E:GetLocale(),
eyefinity = false,
smallerWorldMap = true,
......
......@@ -501,6 +501,7 @@ P.nameplates = {
castColor = {r = 1, g = 0.81, b = 0},
tapped = {r = 0.6, g = 0.6, b = 0.6},
castNoInterruptColor = {r = 0.78, g = 0.25, b = 0.25},
castInterruptedColor = {r = 0.30, g = 0.30, b = 0.30},
castbarDesaturate = true,
reactions = {
good = {r = .29, g = .68, b = .30},
......
......@@ -18,13 +18,13 @@ local type = type
local currencyList = {}
local DTPanelOptions = {
numPoints = {
order = 1,
order = 2,
type = 'range',
name = L["Number of DataTexts"],
min = 1, max = 20, step = 1,
},
growth = {
order = 2,
order = 3,
type = 'select',
name = L["Growth"],
values = {
......@@ -33,19 +33,19 @@ local DTPanelOptions = {
},
},
width = {
order = 3,
order = 4,
type = 'range',
name = L["Width"],
min = 24, max = E.screenwidth, step = 1,
},
height = {
order = 4,
order = 5,
type = 'range',
name = L["Height"],
min = 12, max = E.screenheight, step = 1,
},
templateGroup = {
order = 5,
order = 10,
type = "multiselect",
name = L['Template'],
sortByValue = true,
......@@ -57,7 +57,7 @@ local DTPanelOptions = {
},
},
strataAndLevel = {
order = 9,
order = 15,
type = "group",
name = L["Strata and Level"],
guiInline = true,
......@@ -84,7 +84,7 @@ local DTPanelOptions = {
},
},
tooltip = {
order = 15,
order = 20,
type = "group",
name = L["Tooltip"],
guiInline = true,
......@@ -124,7 +124,7 @@ local DTPanelOptions = {
},
visibility = {
type = 'input',
order = 16,
order = 25,
name = L["Visibility State"],
desc = L["This works like a macro, you can run different situations to get the actionbar to show/hide differently.\n Example: '[combat] show;hide'"],
width = 'full',
......@@ -562,7 +562,7 @@ E.Options.args.datatexts = {
end,
},
add = {
order = -1,
order = 1,
type = 'execute',
name = L['Add'],
width = 'full',
......@@ -691,23 +691,23 @@ E.Options.args.datatexts = {
end,
},
numPoints = {
order = 1,
order = 5,
type = 'range',
name = L["Number of DataTexts"],
min = 1, max = 2, step = 1,
},
backdrop = {
order = 5,
order = 6,
name = L["Backdrop"],
type = "toggle",
},
border = {
order = 6,
order = 7,
name = L["Border"],
type = "toggle",
},
panelTransparency = {
order = 7,
order = 8,
type = 'toggle',
name = L["Panel Transparency"],
},
......
......@@ -6155,6 +6155,12 @@ E.Options.args.nameplate = {
type = "color",
hasAlpha = false
},
castInterruptedColor = {
name = L["Interrupted"],
order = 2,
type = "color",
hasAlpha = false
},
castbarDesaturate = {
type = "toggle",
name = L["Desaturated Icon"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment