Commit 1296f7f3 authored by Simpy's avatar Simpy 🐹

11.43

parents 6370e8de ac20b949
......@@ -1646,7 +1646,7 @@ function E:Initialize()
E.data = E.Libs.AceDB:New('ElvDB', E.DF, true)
E.data.RegisterCallback(E, 'OnProfileChanged', 'StaggeredUpdateAll')
E.data.RegisterCallback(E, 'OnProfileCopied', 'StaggeredUpdateAll')
E.data.RegisterCallback(E, 'OnProfileReset', 'StaggeredUpdateAll')
E.data.RegisterCallback(E, 'OnProfileReset', 'OnProfileReset')
E.charSettings = E.Libs.AceDB:New('ElvPrivateDB', E.privateVars)
E.charSettings.RegisterCallback(E, 'OnProfileChanged', ReloadUI)
E.charSettings.RegisterCallback(E, 'OnProfileReset', 'OnPrivateProfileReset')
......
......@@ -263,31 +263,26 @@ local function UpdateMover(name, parent, textString, overlay, snapOffset, postdr
end
function E:CalculateMoverPoints(mover, nudgeX, nudgeY)
local screenWidth, screenHeight = E.UIParent:GetRight(), E.UIParent:GetTop()
local screenCenterX, screenCenterY = E.UIParent:GetCenter()
local centerX, centerY = E.UIParent:GetCenter()
local width = E.UIParent:GetRight()
local x, y = mover:GetCenter()
local point, nudgePoint, nudgeInversePoint = 'BOTTOM', 'BOTTOM', 'TOP'
if not x or not y then -- if GetCenter on the mover fails, default to UIParent center? (lazy fix, dont know why GetCenter can fail)
x, y = screenCenterX, screenCenterY
end
if y >= screenCenterY then -- TOP: 1080p = 540
if y >= centerY then -- TOP: 1080p = 540
point, nudgePoint, nudgeInversePoint = 'TOP', 'TOP', 'BOTTOM'
y = -(screenHeight - mover:GetTop())
y = -(E.UIParent:GetTop() - mover:GetTop())
else
y = mover:GetBottom()
end
if x >= (screenWidth * 2 / 3) then -- RIGHT: 1080p = 1280
if x >= (width * 2 / 3) then -- RIGHT: 1080p = 1280
point, nudgePoint, nudgeInversePoint = point..'RIGHT', 'RIGHT', 'LEFT'
x = mover:GetRight() - screenWidth
elseif x <= (screenWidth / 3) or mover.perferCorners then -- LEFT: 1080p = 640
x = mover:GetRight() - width
elseif x <= (width / 3) or mover.perferCorners then -- LEFT: 1080p = 640
point, nudgePoint, nudgeInversePoint = point..'LEFT', 'LEFT', 'RIGHT'
x = mover:GetLeft()
else
x = x - screenCenterX
x = x - centerX
end
--Update coordinates if nudged
......
......@@ -389,6 +389,14 @@ E.PopupDialogs.CONFIRM_LOOT_DISTRIBUTION = {
hideOnEscape = 1,
}
E.PopupDialogs.RESET_PROFILE_PROMPT = {
text = L["Are you sure you want to reset all the settings on this profile?"],
button1 = YES,
button2 = NO,
hideOnEscape = 1,
OnAccept = function() E:ResetProfile() end,
}
E.PopupDialogs.RESET_PRIVATE_PROFILE_PROMPT = {
text = L["Are you sure you want to reset all the settings on this profile?"],
button1 = YES,
......
## Interface: 80300
## Author: Elv, Simpy
## Version: 11.42
## Version: 11.43
## Title: |cff1784d1ElvUI|r
## Notes: User Interface replacement AddOn for World of Warcraft.
## SavedVariables: ElvDB, ElvPrivateDB
......
......@@ -2,30 +2,34 @@ local _, ns = ...
local oUF = ns.oUF
if not oUF then return end
local playerClass = select(2, UnitClass('player'))
local UnitAura = UnitAura
local UnitCanAssist = UnitCanAssist
local GetSpecialization = GetSpecialization
local GetActiveSpecGroup = GetActiveSpecGroup
local Classic = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local wipe = wipe
local tinsert = tinsert
local DispelList, BlackList = {}, {}
-- GLOBALS: DebuffTypeColor
--local DispellPriority = { Magic = 4, Curse = 3, Disease = 2, Poison = 1 }
--local FilterList = {}
if Classic then
DispelList.PRIEST = { Magic = true, Disease = true }
DispelList.SHAMAN = { Poison = true, Disease = true }
DispelList.PALADIN = { Magic = true, Poison = true, Disease = true }
DispelList.MAGE = { Curse = true }
DispelList.DRUID = { Curse = true, Poison = true }
DispelList.WARLOCK = { Magic = true }
DispelList.PRIEST = { Magic = true, Disease = true }
DispelList.SHAMAN = { Poison = true, Disease = true }
DispelList.PALADIN = { Magic = true, Poison = true, Disease = true }
DispelList.MAGE = { Curse = true }
DispelList.DRUID = { Curse = true, Poison = true }
DispelList.WARLOCK = { Magic = true }
else
DispelList.PRIEST = { Magic = true, Disease = true }
DispelList.SHAMAN = { Magic = false, Curse = true }
DispelList.PALADIN = { Magic = false, Poison = true, Disease = true }
DispelList.DRUID = { Magic = false, Curse = true, Poison = true, Disease = false }
DispelList.MONK = { Magic = false, Poison = true, Disease = true }
DispelList.MAGE = { Curse = true }
DispelList.PRIEST = { Magic = true, Disease = true }
DispelList.SHAMAN = { Magic = false, Curse = true }
DispelList.PALADIN = { Magic = false, Poison = true, Disease = true }
DispelList.DRUID = { Magic = false, Curse = true, Poison = true, Disease = false }
DispelList.MONK = { Magic = false, Poison = true, Disease = true }
DispelList.MAGE = { Curse = true }
end
local playerClass = select(2, UnitClass('player'))
local CanDispel = DispelList[playerClass] or {}
if not Classic then
......@@ -40,19 +44,8 @@ if not Classic then
BlackList[137637] = true -- Warbringer, Slow
end
local DispellPriority = { Magic = 4, Curse = 3, Disease = 2, Poison = 1, none = 0 }
local FilterList = {}
local function SortAuraByPriority(a, b)
local aPriority = a.debufftype and DispellPriority[a.debufftype] or 0
local bPriority = b.debufftype and DispellPriority[b.debufftype] or 0
return aPriority > bPriority
end
local function GetAuraType(unit, filter, filterTable)
if not unit or not UnitCanAssist('player', unit) then return nil end
wipe(FilterList)
if not unit or not UnitCanAssist('player', unit) then return end
local i = 1
while true do
......@@ -60,14 +53,14 @@ local function GetAuraType(unit, filter, filterTable)
if not texture then break end
local filterSpell = filterTable[spellID] or filterTable[name]
if (filterTable and filterSpell) then
if filterTable and filterSpell then
if filterSpell.enable then
tinsert(FilterList, {spellID = spellID, debufftype = debufftype, texture = texture, style = filterSpell.style, color = filterSpell.color})
return debufftype, texture, true, filterSpell.style, filterSpell.color
end
elseif debufftype and (not filter or (filter and CanDispel[debufftype])) and not (BlackList[name] or BlackList[spellID]) then
tinsert(FilterList, {spellID = spellID, debufftype = debufftype, texture = texture })
return debufftype, texture
end
i = i + 1
end
......@@ -77,32 +70,31 @@ local function GetAuraType(unit, filter, filterTable)
if not texture then break end
local filterSpell = filterTable[spellID]
if (filterTable and filterSpell) then
if filterSpell.enable then
tinsert(FilterList, {spellID = spellID, debufftype = debufftype, texture = texture, style = filterSpell.style, color = filterSpell.color})
end
if filterTable and filterSpell and filterSpell.enable then
return debufftype, texture, true, filterSpell.style, filterSpell.color
end
i = i + 1
end
end
--[[
local function FilterTable()
sort(FilterList, SortAuraByPriority)
return FilterList[1] and unpack(FilterList[1])
local debufftype, texture, filterSpell
return debufftype, texture, true, filterSpell.style, filterSpell.color
end
]]
local function CheckTalentTree(tree)
local activeGroup = GetActiveSpecGroup()
local spec = activeGroup and GetSpecialization(false, false, activeGroup)
if activeGroup and GetSpecialization(false, false, activeGroup) then
return tree == GetSpecialization(false, false, activeGroup)
if spec then
return tree == spec
end
end
local function CheckSpec(self, event, levels)
local function CheckSpec()
if Classic then return end
-- Check for certain talents to see if we can dispel magic or not
......@@ -117,14 +109,12 @@ local function CheckSpec(self, event, levels)
end
end
local function Update(self, event, unit)
if unit ~= self.unit then return; end
GetAuraType(unit, self.AuraHighlightFilter, self.AuraHighlightFilterTable)
local function Update(self, _, unit)
if unit ~= self.unit then return end
local debuffType, texture, wasFiltered, style, color = FilterTable()
local debuffType, texture, wasFiltered, style, color = GetAuraType(unit, self.AuraHighlightFilter, self.AuraHighlightFilterTable)
if(wasFiltered) then
if wasFiltered then
if style == 'GLOW' and self.AuraHightlightGlow then
self.AuraHightlightGlow:Show()
self.AuraHightlightGlow:SetBackdropBorderColor(color.r, color.g, color.b)
......@@ -134,6 +124,7 @@ local function Update(self, event, unit)
end
elseif debuffType then
color = DebuffTypeColor[debuffType or 'none']
if self.AuraHighlightBackdrop and self.AuraHightlightGlow then
self.AuraHightlightGlow:Show()
self.AuraHightlightGlow:SetBackdropBorderColor(color.r, color.g, color.b)
......@@ -160,11 +151,8 @@ local function Update(self, event, unit)
end
local function Enable(self)
local element = self.AuraHighlight
if element then
if self.AuraHighlight then
self:RegisterEvent('UNIT_AURA', Update)
return true
end
end
......@@ -178,8 +166,8 @@ local function Disable(self)
self.AuraHightlightGlow:Hide()
end
if self.AuraHighlight then
self.AuraHighlight:SetVertexColor(0, 0, 0, 0)
if element then
element:SetVertexColor(0, 0, 0, 0)
end
end
end
......
......@@ -55,10 +55,6 @@ function B:SetAltPowerBarText(text, name, value, max, percent)
end
end
function B:PositionAltPower()
self:Point('CENTER', _G.AltPowerBarHolder, 'CENTER')
end
function B:PositionAltPowerBar()
local holder = CreateFrame('Frame', 'AltPowerBarHolder', E.UIParent)
holder:Point('TOP', E.UIParent, 'TOP', -1, -36)
......@@ -69,11 +65,6 @@ function B:PositionAltPowerBar()
_G.PlayerPowerBarAlt:SetParent(holder)
_G.UIPARENT_MANAGED_FRAME_POSITIONS.PlayerPowerBarAlt = nil
--The Blizzard function FramePositionDelegate:UIParentManageFramePositions()
--calls :ClearAllPoints on PlayerPowerBarAlt under certain conditions.
--Doing ".ClearAllPoints = E.noop" causes error when you enter combat.
hooksecurefunc(_G.PlayerPowerBarAlt, "ClearAllPoints", B.PositionAltPower)
E:CreateMover(holder, 'AltPowerBarMover', L["Alternative Power"], nil, nil, nil, nil, nil, 'general,alternativePowerGroup')
end
......
......@@ -95,7 +95,6 @@ local C_SocialQueue_GetGroupMembers = C_SocialQueue.GetGroupMembers
local C_SocialQueue_GetGroupQueues = C_SocialQueue.GetGroupQueues
local C_VoiceChat_GetMemberName = C_VoiceChat.GetMemberName
local C_VoiceChat_SetPortraitTexture = C_VoiceChat.SetPortraitTexture
local SOUNDKIT_TELL_MESSAGE = SOUNDKIT.TELL_MESSAGE
local SOCIAL_QUEUE_QUEUED_FOR = gsub(SOCIAL_QUEUE_QUEUED_FOR, ':%s?$', '') --some language have `:` on end
local BNET_CLIENT_WOW = BNET_CLIENT_WOW
......@@ -467,13 +466,13 @@ function CH:GetSmileyReplacementText(msg)
while(startpos <= origlen) do
local pos = strfind(msg,"|H",startpos,true)
endpos = pos or origlen
outstr = outstr .. CH:InsertEmotions(strsub(msg,startpos,endpos)); --run replacement on this bit
outstr = outstr .. CH:InsertEmotions(strsub(msg,startpos,endpos)) --run replacement on this bit
startpos = endpos + 1
if pos ~= nil then
_, endpos = strfind(msg,"|h.-|h",startpos)
endpos = endpos or origlen
if startpos < endpos then
outstr = outstr .. strsub(msg,startpos,endpos); --don't run replacement on this bit
outstr = outstr .. strsub(msg,startpos,endpos) --don't run replacement on this bit
startpos = endpos + 1
end
end
......@@ -1264,7 +1263,7 @@ end
local hyperLinkEntered
function CH:OnHyperlinkEnter(frame, refString)
if InCombatLockdown() then return; end
if InCombatLockdown() then return end
local linkToken = strmatch(refString, "^([^:]+)")
if hyperlinkTypes[linkToken] then
_G.GameTooltip:SetOwner(frame, "ANCHOR_CURSOR")
......@@ -1727,7 +1726,7 @@ function CH:ChatFrame_MessageEventHandler(frame, event, arg1, arg2, arg3, arg4,
end
-- Search for icon links and replace them with texture links.
arg1 = CH:ChatFrame_ReplaceIconAndGroupExpressions(arg1, arg17, not ChatFrame_CanChatGroupPerformExpressionExpansion(chatGroup)); -- If arg17 is true, don't convert to raid icons
arg1 = CH:ChatFrame_ReplaceIconAndGroupExpressions(arg1, arg17, not ChatFrame_CanChatGroupPerformExpressionExpansion(chatGroup)) -- If arg17 is true, don't convert to raid icons
--Remove groups of many spaces
arg1 = RemoveExtraSpaces(arg1)
......@@ -1861,8 +1860,8 @@ function CH:ChatFrame_MessageEventHandler(frame, event, arg1, arg2, arg3, arg4,
local accessID = ChatHistory_GetAccessID(chatGroup, chatTarget)
local typeID = ChatHistory_GetAccessID(infoType, chatTarget, arg12 or arg13)
local alertType = CH.db.channelAlerts[historyTypes[chatType]]
if notChatHistory and not CH.SoundTimer and (arg2 ~= PLAYER_NAME and alertType and alertType ~= 'None') and (not CH.db.noAlertInCombat or not InCombatLockdown()) then
local alertType = notChatHistory and not CH.SoundTimer and not strfind(event, "_INFORM") and CH.db.channelAlerts[historyTypes[event]]
if alertType and alertType ~= "None" and arg2 ~= PLAYER_NAME and (not CH.db.noAlertInCombat or not InCombatLockdown()) then
CH.SoundTimer = E:Delay(5, CH.ThrottleSound)
PlaySoundFile(LSM:Fetch("sound", alertType), "Master")
end
......@@ -1871,13 +1870,7 @@ function CH:ChatFrame_MessageEventHandler(frame, event, arg1, arg2, arg3, arg4,
end
if notChatHistory and (chatType == "WHISPER" or chatType == "BN_WHISPER") then
--BN_WHISPER FIXME
ChatEdit_SetLastTellTarget(arg2, chatType)
if frame.tellTimer and (GetTime() > frame.tellTimer) then
PlaySound(SOUNDKIT_TELL_MESSAGE)
end
frame.tellTimer = GetTime() + _G.CHAT_TELL_ALERT_TIME
--FCF_FlashTab(frame)
FlashClientIcon()
end
......@@ -1885,7 +1878,7 @@ function CH:ChatFrame_MessageEventHandler(frame, event, arg1, arg2, arg3, arg4,
if (frame == _G.DEFAULT_CHAT_FRAME and info.flashTabOnGeneral) or (frame ~= _G.DEFAULT_CHAT_FRAME and info.flashTab) then
if not _G.CHAT_OPTIONS.HIDE_FRAME_ALERTS or chatType == "WHISPER" or chatType == "BN_WHISPER" then --BN_WHISPER FIXME
if not FCFManager_ShouldSuppressMessageFlash(frame, chatGroup, chatTarget) then
FCF_StartAlertFlash(frame); --This would taint if we were not using LibChatAnims
FCF_StartAlertFlash(frame) --This would taint if we were not using LibChatAnims
end
end
end
......@@ -2242,8 +2235,6 @@ function CH:DisplayChatHistory()
return
end
CH.SoundTimer = true
for _, chat in ipairs(_G.CHAT_FRAMES) do
for _, d in ipairs(data) do
if type(d) == 'table' then
......@@ -2261,8 +2252,6 @@ function CH:DisplayChatHistory()
end
end
end
CH.SoundTimer = nil
end
tremove(_G.ChatTypeGroup.GUILD, 2)
......
This diff is collapsed.
......@@ -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.42,
version = 11.43,
locale = E:GetLocale(),
eyefinity = false,
smallerWorldMap = true,
......
......@@ -135,6 +135,7 @@ do
DisableAddOn("ElvUI_EverySecondCounts")
DisableAddOn("ElvUI_AuraBarsMovers")
DisableAddOn("ElvUI_CustomTweaks")
DisableAddOn("ElvUI_DTBars2")
end
function E:OnEnable()
......@@ -225,12 +226,15 @@ function E:PositionGameMenuButton()
end
end
function E:ResetPrivateProfile()
local key = ElvPrivateDB.profileKeys and ElvPrivateDB.profileKeys[E.mynameRealm]
if key and ElvPrivateDB.profiles and ElvPrivateDB.profiles[key] then
ElvPrivateDB.profiles[key] = nil
end
function E:ResetProfile()
E:StaggeredUpdateAll()
end
function E:OnProfileReset()
E:StaticPopup_Show('RESET_PROFILE_PROMPT')
end
function E:ResetPrivateProfile()
ReloadUI()
end
......
This diff is collapsed.
......@@ -280,7 +280,7 @@ function DT:PanelLayoutOptions()
}
end
for option, value in pairs(tab) do
for option in pairs(tab) do
if type(option) == 'number' then
if E.global.datatexts.customPanels[name] and option > E.global.datatexts.customPanels[name].numPoints then
tab[option] = nil
......@@ -297,13 +297,6 @@ function DT:PanelLayoutOptions()
end,
}
end
elseif type(value) ~= 'boolean' and P.datatexts.panels[name] and P.datatexts.panels[name][option] then
-- TODO: need to convert the old [name][option] to the number style..
options[name].args[option] = options[name].args[option] or {
type = 'select',
name = L[option],
values = dts,
}
end
end
end
......
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