Commit 7b03590b authored by Simpy's avatar Simpy 🐹

11.36

parents 29dfc764 b36ad76e
......@@ -207,34 +207,32 @@ do
end
do
function E:GetWidgetInfoBase(widgetID, overrideProc)
local widget = widgetID and C_UIWidgetManager_GetStatusBarWidgetVisualizationInfo(widgetID)
if not widget then return end
function E:GetWidgetInfoID(guid)
return E.global.nameplate.widgetMap[guid]
end
local extra
if ( overrideProc ) then
extra = overrideProc(widget.overrideBarText)
function E:SetWidgetInfoID(guid, widgetID)
if widgetID then
E.global.nameplate.widgetMap[guid] = widgetID
end
end
E.MaxWidgetInfoRank = 30
function E:GetWidgetInfoBase(widgetID)
local widget = widgetID and C_UIWidgetManager_GetStatusBarWidgetVisualizationInfo(widgetID)
if not widget then return end
local cur = widget.barValue - widget.barMin
local toNext = widget.barMax - widget.barMin
local total = widget.barValue
return cur, toNext, total, extra
end
E.MaxNazjatarBodyguardRank = 30
local function parseRank(text)
return tonumber(strmatch(text, "%d+"))
end
function E:GetNazjatarBodyguardXP(widgetID)
local cur, toNext, total, rank =E:GetWidgetInfoBase(widgetID, parseRank)
if not rank then return end
local isMax = rank == E.MaxNazjatarBodyguardRank
local rank, maxRank
if widget.overrideBarText then
rank = tonumber(strmatch(widget.overrideBarText, "%d+"))
maxRank = rank == E.MaxWidgetInfoRank
end
return rank, cur, toNext, total, isMax
return cur, toNext, total, rank, maxRank
end
end
......
......@@ -134,9 +134,11 @@ function E:SetUpAnimGroup(obj, Type, ...)
end
end
function E:Elasticize(obj)
function E:Elasticize(obj, width, height)
if not obj.elastic then
E:SetUpAnimGroup(obj, 'Elastic', 128, 64, 2, false)
if not width then width = obj:GetWidth() end
if not height then height = obj:GetHeight() end
E:SetUpAnimGroup(obj, 'Elastic', width, height, 2, false)
end
obj.elastic[1]:Play()
......
......@@ -893,7 +893,7 @@ function E:Config_WindowOpened(frame)
frame.closeButton:Show()
frame.originalClose:Hide()
E:Elasticize(frame.leftHolder.logo)
E:Elasticize(frame.leftHolder.logo, 128, 64)
local unskinned = not E.private.skins.ace3.enable
local offset = unskinned and 14 or 8
......@@ -1139,7 +1139,6 @@ function E:ToggleOptionsUI(msg)
logo:SetTexture(E.Media.Textures.LogoSmall)
logo:Point("CENTER", left, "TOP", unskinned and 10 or 0, unskinned and -40 or -36)
logo:Size(128, 64)
logo:SetAlpha(0.9)
left.logo = logo
local buttonsHolder = CreateFrame('Frame', nil, left)
......
......@@ -70,10 +70,8 @@ function E:Cooldown_OnUpdate(elapsed)
end
end
local color = self.timeColors[id]
if color then
self.text:SetTextColor(color.r, color.g, color.b)
end
local color = not self.skipTextColor and self.timeColors[id]
if color then self.text:SetTextColor(color.r, color.g, color.b) end
end
end
end
......
......@@ -12,6 +12,7 @@ local assert, type, pcall, xpcall, next, print = assert, type, pcall, xpcall, ne
local CreateFrame = CreateFrame
local GetCVar = GetCVar
local GetCVarBool = GetCVarBool
local GetSpellInfo = GetSpellInfo
local GetNumGroupMembers = GetNumGroupMembers
local GetSpecialization = GetSpecialization
local hooksecurefunc = hooksecurefunc
......@@ -1504,15 +1505,26 @@ function E:DBConversions()
end
-- fix aurabars colors
for spell, info in pairs(E.global.unitframe.AuraBarColors) do
local auraBarColors = E.global.unitframe.AuraBarColors
for spell, info in pairs(auraBarColors) do
if type(spell) == 'string' then
local spellID = select(7, GetSpellInfo(spell))
if spellID and not auraBarColors[spellID] then
auraBarColors[spellID] = info
auraBarColors[spell] = nil
spell = spellID
end
end
if type(info) == 'boolean' then
E.global.unitframe.AuraBarColors[spell] = { color = { r = 1, g = 1, b = 1, a = 1}, enable = info }
auraBarColors[spell] = { color = { r = 1, g = 1, b = 1 }, enable = info }
elseif type(info) == 'table' then
if info.r or info.g or info.b then
E.global.unitframe.AuraBarColors[spell] = { color = { r = info.r or 1, g = info.g or 1, b = info.b or 1}, enable = true }
auraBarColors[spell] = { color = { r = info.r or 1, g = info.g or 1, b = info.b or 1 }, enable = true }
elseif info.color then -- azil created a void hole, delete it -x-
if info.color.color then info.color.color = nil end
if info.color.enable then info.color.enable = nil end
if info.color.a then info.color.a = nil end -- alpha isnt supported by this
end
end
end
......
......@@ -51,6 +51,24 @@ local function UpdateCoords(self)
E:UpdateNudgeFrame(mover, x, y)
end
local function SetPoints(name, holder, parent)
local point1, relativeTo1, relativePoint1, xOffset1, yOffset1 = unpack(holder.parentPoint)
local point2, relativeTo2, relativePoint2, xOffset2, yOffset2 = GetSettingPoints(name)
if not point2 then -- fallback to the parents original point (on create) if the setting doesn't exist
point2, relativeTo2, relativePoint2, xOffset2, yOffset2 = point1, relativeTo1, relativePoint1, xOffset1, yOffset1
end
if point2 then
_G[name]:ClearAllPoints()
_G[name]:Point(point2, relativeTo2, relativePoint2, xOffset2, yOffset2)
end
if parent then
parent:ClearAllPoints()
parent:Point(point1, parent.mover, 0, 0)
end
end
local isDragging = false
local coordFrame = CreateFrame('Frame')
coordFrame:SetScript('OnUpdate', UpdateCoords)
......@@ -58,7 +76,10 @@ coordFrame:Hide()
local function UpdateMover(parent, name, text, overlay, snapOffset, postdrag, shouldDisable, configString)
if not parent then return end --If for some reason the parent isnt loaded yet
if E.CreatedMovers[name].Created then return end
local holder = E.CreatedMovers[name]
if holder.Created then return end
holder.Created = true
if overlay == nil then overlay = true end
......@@ -79,10 +100,10 @@ local function UpdateMover(parent, name, text, overlay, snapOffset, postdrag, sh
local fs = f:CreateFontString(nil, 'OVERLAY')
fs:FontTemplate()
fs:SetJustifyH('CENTER')
fs:Point('CENTER')
fs:SetText(text or name)
fs:SetTextColor(unpack(E.media.rgbvaluecolor))
fs:SetJustifyH('CENTER')
f:SetFontString(fs)
f.text = fs
......@@ -95,22 +116,12 @@ local function UpdateMover(parent, name, text, overlay, snapOffset, postdrag, sh
f.shouldDisable = shouldDisable
f.configString = configString
E.CreatedMovers[name].mover = f
holder.mover = f
parent.mover = f
E.snapBars[#E.snapBars+1] = f
local point1, relativeTo1, relativePoint1, xOffset1, yOffset1 = parent:GetPoint()
local point2, relativeTo2, relativePoint2, xOffset2, yOffset2 = GetSettingPoints(name)
if not point2 then -- fallback to the parents point if the setting doesn't exist
point2, relativeTo2, relativePoint2, xOffset2, yOffset2 = point1, relativeTo1, relativePoint1, xOffset1, yOffset1
end
f:ClearAllPoints()
f:Point(point2, relativeTo2, relativePoint2, xOffset2, yOffset2)
parent:SetScript('OnSizeChanged', SizeChanged)
parent:ClearAllPoints()
parent:Point(point1, f, 0, 0)
parent.mover = f
SetPoints(name, holder, parent)
local function OnDragStart(self)
if InCombatLockdown() then E:Print(ERR_NOT_IN_COMBAT) return end
......@@ -146,17 +157,10 @@ local function UpdateMover(parent, name, text, overlay, snapOffset, postdrag, sh
end
local x2, y2, p2 = E:CalculateMoverPoints(self)
local p1 = self.positionOverride and ((self.positionOverride == 'BOTTOM' or self.positionOverride == 'TOP') and 'BOTTOM' or 'BOTTOMLEFT')
self:ClearAllPoints()
local overridePoint
if self.positionOverride then
if self.positionOverride == 'BOTTOM' or self.positionOverride == 'TOP' then
overridePoint = 'BOTTOM'
else
overridePoint = 'BOTTOMLEFT'
end
end
self:Point(self.positionOverride or p2, E.UIParent, p1 or p2, x2, y2)
self:Point(self.positionOverride or p2, E.UIParent, overridePoint and overridePoint or p2, x2, y2)
if self.positionOverride then
self.parent:ClearAllPoints()
self.parent:Point(self.positionOverride, self, self.positionOverride)
......@@ -167,7 +171,7 @@ local function UpdateMover(parent, name, text, overlay, snapOffset, postdrag, sh
coordFrame.child = nil
coordFrame:Hide()
if postdrag ~= nil and (type(postdrag) == 'function') then
if postdrag and type(postdrag) == 'function' then
postdrag(self, E:GetScreenQuadrant(self))
end
......@@ -244,15 +248,13 @@ local function UpdateMover(parent, name, text, overlay, snapOffset, postdrag, sh
f:SetScript('OnShow', OnShow)
f:SetScript('OnMouseWheel', OnMouseWheel)
if postdrag ~= nil and type(postdrag) == 'function' then
if postdrag and type(postdrag) == 'function' then
f:RegisterEvent('PLAYER_ENTERING_WORLD')
f:SetScript('OnEvent', function(self)
postdrag(f, E:GetScreenQuadrant(f))
self:UnregisterAllEvents()
end)
end
E.CreatedMovers[name].Created = true
end
function E:CalculateMoverPoints(mover, nudgeX, nudgeY)
......@@ -330,45 +332,47 @@ function E:SaveMoverPosition(name)
end
function E:SetMoverSnapOffset(name, offset)
local mover = _G[name] and E.CreatedMovers[name]
if not mover then return end
mover.mover.snapOffset = offset or -2
mover.snapoffset = offset or -2
local holder = _G[name] and E.CreatedMovers[name]
if not holder then return end
holder.mover.snapOffset = offset or -2
holder.snapoffset = offset or -2
end
function E:SetMoverLayoutPositionPoint(mover, name, frame)
function E:SetMoverLayoutPositionPoint(holder, name, parent)
local layout = E.LayoutMoverPositions[E.db.layoutSetting]
mover.point = (layout and layout[name]) or E.LayoutMoverPositions.ALL[name] or GetPoint(frame)
holder.point = (layout and layout[name]) or E.LayoutMoverPositions.ALL[name] or GetPoint(parent or _G[name])
if parent then -- CreateMover call
holder.parentPoint = {parent:GetPoint()}
end
end
function E:SaveMoverDefaultPosition(name)
local mover = _G[name] and E.CreatedMovers[name]
if not mover then return end
local frame = _G[name]
local holder = frame and E.CreatedMovers[name]
if not holder then return end
E:SetMoverLayoutPositionPoint(mover, name, _G[name])
E:SetMoverLayoutPositionPoint(holder, name)
if mover.postdrag then
mover.postdrag(_G[name], E:GetScreenQuadrant(_G[name]))
if holder.postdrag and type(holder.postdrag) == 'function' then
holder.postdrag(frame, E:GetScreenQuadrant(frame))
end
end
function E:CreateMover(parent, name, text, overlay, snapoffset, postdrag, moverTypes, shouldDisable, configString)
if not moverTypes then moverTypes = 'ALL,GENERAL' end
local mover = E.CreatedMovers[name]
if mover == nil then
mover = {}
mover.type = {}
E:SetMoverLayoutPositionPoint(mover, name, parent)
local holder = E.CreatedMovers[name]
if holder == nil then
holder = {}
holder.type = {}
local types = {split(',', moverTypes)}
for i = 1, #types do
local moverType = types[i]
mover.type[moverType] = true
for _, moverType in ipairs({split(',', moverTypes)}) do
holder.type[moverType] = true
end
E.CreatedMovers[name] = mover
E:SetMoverLayoutPositionPoint(holder, name, parent)
E.CreatedMovers[name] = holder
end
UpdateMover(parent, name, text, overlay, snapoffset, postdrag, shouldDisable, configString)
......@@ -436,7 +440,7 @@ function E:ResetMovers(arg)
frame:Point(point, anchor, secondaryPoint, x, y)
end
if holder.postdrag ~= nil and type(holder.postdrag) == 'function' then
if holder.postdrag and type(holder.postdrag) == 'function' then
holder.postdrag(frame, E:GetScreenQuadrant(frame))
end
......@@ -464,14 +468,7 @@ function E:SetMoversPositions()
end
for name, holder in pairs(E.CreatedMovers) do
local point, anchor, secondaryPoint, x, y = GetSettingPoints(name)
if not point then point, anchor, secondaryPoint, x, y = split(',', holder.point) end
if point then
local frame = _G[name]
frame:ClearAllPoints()
frame:Point(point, anchor, secondaryPoint, x, y)
end
SetPoints(name, holder)
end
end
......
## Interface: 80300
## Author: Elv, Simpy
## Version: 11.352
## Version: 11.36
## Title: |cfffe7b2cElvUI|r
## Notes: User Interface replacement AddOn for World of Warcraft.
## SavedVariables: ElvDB, ElvPrivateDB
......
......@@ -100,9 +100,6 @@ local function updateIcon(element, unit, index, offset, filter, isDebuff, visibl
if(show) then
local setting = element.watched[spellID]
if(button.cd) then
button.cd.hideText = not setting.displayText
button.cd.textThreshold = setting.textThreshold ~= -1 and setting.textThreshold
if(duration and duration > 0) then
button.cd:SetCooldown(expiration - duration, duration)
button.cd:Show()
......
......@@ -2268,10 +2268,10 @@ function CH:SocialQueueEvent(_, guid, numAddedItems) -- event, guid, numAddedIte
local isLFGList = firstQueue and firstQueue.queueData and firstQueue.queueData.queueType == 'lfglist'
if isLFGList and firstQueue and firstQueue.eligible then
local searchResultInfo, activityID, name, leaderName, fullName, isLeader
local activityID, name, leaderName, fullName, isLeader
if firstQueue.queueData.lfgListID then
searchResultInfo = C_LFGList_GetSearchResultInfo(firstQueue.queueData.lfgListID)
local searchResultInfo = C_LFGList_GetSearchResultInfo(firstQueue.queueData.lfgListID)
if searchResultInfo then
activityID, name, leaderName = searchResultInfo.activityID, searchResultInfo.name, searchResultInfo.leaderName
isLeader = self:SocialQueueIsLeader(playerName, leaderName)
......@@ -2288,10 +2288,10 @@ function CH:SocialQueueEvent(_, guid, numAddedItems) -- event, guid, numAddedIte
self:SocialQueueMessage(guid, format('%s %s: |cff00CCFF%s|r', coloredName, (isLeader and L["is looking for members"]) or L["joined a group"], fullName or UNKNOWN))
end
elseif firstQueue then
local output, outputCount, queueCount, queueName = '', '', 0
local output, outputCount, queueCount = '', '', 0
for _, queue in pairs(queues) do
if type(queue) == 'table' and queue.eligible then
queueName = (queue.queueData and SocialQueueUtil_GetQueueName(queue.queueData)) or ''
local queueName = (queue.queueData and SocialQueueUtil_GetQueueName(queue.queueData)) or ''
if queueName ~= '' then
if output == '' then
output = gsub(queueName, '\n.+','') -- grab only the first queue name
......@@ -2303,9 +2303,7 @@ function CH:SocialQueueEvent(_, guid, numAddedItems) -- event, guid, numAddedIte
end
end
if output ~= '' then
if queueCount > 0 then
outputCount = format(LFG_LIST_AND_MORE, queueCount)
end
if queueCount > 0 then outputCount = format(LFG_LIST_AND_MORE, queueCount) end
self:SocialQueueMessage(guid, format('%s %s: |cff00CCFF%s|r %s', coloredName, SOCIAL_QUEUE_QUEUED_FOR, output, outputCount))
end
end
......
......@@ -4,19 +4,19 @@ local CH = E:GetModule('Chat')
--Lua functions
local next, pairs, select, type = next, pairs, select, type
local format, strjoin, wipe = format, strjoin, wipe
local format, strjoin, wipe, gsub = format, strjoin, wipe, gsub
--WoW API / Variables
local SocialQueueUtil_GetRelationshipInfo = SocialQueueUtil_GetRelationshipInfo
local SocialQueueUtil_GetQueueName = SocialQueueUtil_GetQueueName
local ToggleQuickJoinPanel = ToggleQuickJoinPanel
local SocialQueueUtil_GetQueueName = SocialQueueUtil_GetQueueName
local SocialQueueUtil_GetRelationshipInfo = SocialQueueUtil_GetRelationshipInfo
local C_SocialQueue_GetAllGroups = C_SocialQueue.GetAllGroups
local C_SocialQueue_GetGroupMembers = C_SocialQueue.GetGroupMembers
local C_SocialQueue_GetGroupQueues = C_SocialQueue.GetGroupQueues
local C_LFGList_GetSearchResultInfo = C_LFGList.GetSearchResultInfo
local UNKNOWN, QUICK_JOIN = UNKNOWN, QUICK_JOIN
local displayString, lastPanel = ''
local quickJoinGroups, quickJoin = nil, {}
local displayString = ''
local quickJoin = {}
local function OnEnter(self)
DT:SetupTooltip(self)
......@@ -32,32 +32,28 @@ local function OnEnter(self)
DT.tooltip:Show()
end
local function OnEvent(self)
local function Update(panel)
wipe(quickJoin)
quickJoinGroups = C_SocialQueue_GetAllGroups()
local coloredName, players, playerName, nameColor, firstMember, numMembers, extraCount, isLFGList, firstQueue, queues, numQueues, activityName, leaderName, isLeader, activity, output, queueCount, queueName, searchResultInfo
if not panel then return end
local quickJoinGroups = C_SocialQueue_GetAllGroups()
for _, guid in pairs(quickJoinGroups) do
players = C_SocialQueue_GetGroupMembers(guid)
local players = C_SocialQueue_GetGroupMembers(guid)
if players then
firstMember, numMembers, extraCount = players[1], #players, ''
playerName, nameColor = SocialQueueUtil_GetRelationshipInfo(firstMember.guid, nil, firstMember.clubId)
if numMembers > 1 then
extraCount = format(' +%s', numMembers - 1)
end
if playerName then
coloredName = format('%s%s|r%s', nameColor, playerName, extraCount)
else
coloredName = format('{%s%s}', UNKNOWN, extraCount)
end
local firstMember, numMembers, extraCount = players[1], #players, ''
local playerName, nameColor = SocialQueueUtil_GetRelationshipInfo(firstMember.guid, nil, firstMember.clubId)
if numMembers > 1 then extraCount = format(' +%s', numMembers - 1) end
queues = C_SocialQueue_GetGroupQueues(guid)
firstQueue, numQueues = queues and queues[1], queues and #queues or 0
isLFGList = firstQueue and firstQueue.queueData and firstQueue.queueData.queueType == 'lfglist'
local queues = C_SocialQueue_GetGroupQueues(guid)
local firstQueue, numQueues = queues and queues[1], queues and #queues or 0
local isLFGList = firstQueue and firstQueue.queueData and firstQueue.queueData.queueType == 'lfglist'
local coloredName = (playerName and format('%s%s|r%s', nameColor, playerName, extraCount)) or format('{%s%s}', UNKNOWN, extraCount)
local activity
if isLFGList and firstQueue and firstQueue.eligible then
local activityName, isLeader, leaderName
if firstQueue.queueData.lfgListID then
searchResultInfo = C_LFGList_GetSearchResultInfo(firstQueue.queueData.lfgListID)
local searchResultInfo = C_LFGList_GetSearchResultInfo(firstQueue.queueData.lfgListID)
if searchResultInfo then
activityName, leaderName = searchResultInfo.name, searchResultInfo.leaderName
isLeader = CH:SocialQueueIsLeader(playerName, leaderName)
......@@ -73,16 +69,16 @@ local function OnEvent(self)
activity = format("[+%s]%s", numQueues - 1, activity)
end
elseif firstQueue then
output, queueCount = '', 0
local output, queueCount = '', 0
for _, queue in pairs(queues) do
if type(queue) == 'table' and queue.eligible then
queueName = (queue.queueData and SocialQueueUtil_GetQueueName(queue.queueData)) or ''
local queueName = (queue.queueData and SocialQueueUtil_GetQueueName(queue.queueData)) or ''
if queueName ~= '' then
if output == '' then
output = queueName:gsub('\n.+','') -- grab only the first queue name
queueCount = queueCount + select(2, queueName:gsub('\n','')) -- collect additional on single queue
output = gsub(queueName,'\n.+','') -- grab only the first queue name
queueCount = queueCount + select(2, gsub(queueName,'\n','')) -- collect additional on single queue
else
queueCount = queueCount + 1 + select(2, queueName:gsub('\n','')) -- collect additional on additional queues
queueCount = queueCount + 1 + select(2, gsub(queueName,'\n','')) -- collect additional on additional queues
end
end
end
......@@ -100,18 +96,27 @@ local function OnEvent(self)
end
end
self.text:SetFormattedText(displayString, QUICK_JOIN, #quickJoinGroups)
panel.text:SetFormattedText(displayString, QUICK_JOIN, #quickJoinGroups)
end
local delayed, panel
local function throttle()
if panel then Update(panel) end
delayed = nil
end
local function OnEvent(self)
if panel ~= self then panel = self end
if delayed then return end
lastPanel = self
-- use a nonarg passing function, so that it goes through c_timer instead of the waitframe
delayed = E:Delay(1, throttle)
end
local function ValueColorUpdate(hex)
displayString = strjoin("", "%s: ", hex, "%s|r")
if lastPanel ~= nil then
OnEvent(lastPanel)
end
if panel then OnEvent(panel) end
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('Quick Join', {"SOCIAL_QUEUE_UPDATE", "PLAYER_ENTERING_WORLD"}, OnEvent, nil, ToggleQuickJoinPanel, OnEnter, nil, QUICK_JOIN)
......@@ -64,11 +64,13 @@ function M:ErrorFrameToggle(event)
end
function M:COMBAT_LOG_EVENT_UNFILTERED()
local inGroup, inRaid, inPartyLFG = IsInGroup(), IsInRaid(), IsPartyLFG()
if not inGroup then return end -- not in group, exit.
local inGroup = IsInGroup()
if not inGroup then return end
local _, event, _, sourceGUID, _, _, _, _, destName, _, _, _, _, _, spellID, spellName = CombatLogGetCurrentEventInfo()
if not (event == "SPELL_INTERRUPT" and (sourceGUID == E.myguid or sourceGUID == UnitGUID('pet'))) then return end -- No announce-able interrupt from player or pet, exit.
local _, event, _, sourceGUID, _, _, _, destGUID, destName, _, _, _, _, _, spellID, spellName = CombatLogGetCurrentEventInfo()
local announce = event == "SPELL_INTERRUPT" and (sourceGUID == E.myguid or sourceGUID == UnitGUID('pet')) and destGUID ~= E.myguid
if not announce then return end -- No announce-able interrupt from player or pet, exit.
local inRaid, inPartyLFG = IsInRaid(), IsPartyLFG()
--Skirmish/non-rated arenas need to use INSTANCE_CHAT but IsPartyLFG() returns "false"
local _, instanceType = GetInstanceInfo()
......@@ -81,18 +83,18 @@ function M:COMBAT_LOG_EVENT_UNFILTERED()
inRaid = false --IsInRaid() returns true for arenas and they should not be considered a raid
end
local interruptAnnounce, msg = E.db.general.interruptAnnounce, format(INTERRUPT_MSG, destName, spellID, spellName)
if interruptAnnounce == "PARTY" then
local channel, msg = E.db.general.interruptAnnounce, format(INTERRUPT_MSG, destName, spellID, spellName)
if channel == "PARTY" then
SendChatMessage(msg, inPartyLFG and "INSTANCE_CHAT" or "PARTY")
elseif interruptAnnounce == "RAID" then
elseif channel == "RAID" then
SendChatMessage(msg, inPartyLFG and "INSTANCE_CHAT" or (inRaid and "RAID" or "PARTY"))
elseif interruptAnnounce == "RAID_ONLY" and inRaid then
elseif channel == "RAID_ONLY" and inRaid then
SendChatMessage(msg, inPartyLFG and "INSTANCE_CHAT" or "RAID")
elseif interruptAnnounce == "SAY" and instanceType ~= 'none' then
elseif channel == "SAY" and instanceType ~= 'none' then
SendChatMessage(msg, "SAY")
elseif interruptAnnounce == "YELL" and instanceType ~= 'none' then
elseif channel == "YELL" and instanceType ~= 'none' then
SendChatMessage(msg, "YELL")
elseif interruptAnnounce == "EMOTE" then
elseif channel == "EMOTE" then
SendChatMessage(msg, "EMOTE")
end
end
......
......@@ -283,11 +283,13 @@ end
function NP:Construct_WidgetXPBar(nameplate)
local WidgetXPBar = CreateFrame("StatusBar", nameplate:GetDebugName() .. "WidgetXPBar", nameplate)
WidgetXPBar:SetFrameStrata(nameplate:GetFrameStrata())
WidgetXPBar:SetFrameLevel(5)
WidgetXPBar:CreateBackdrop("Transparent")
WidgetXPBar:SetStatusBarTexture(E.Libs.LSM:Fetch("statusbar", NP.db.statusbar))
WidgetXPBar:CreateBackdrop("Transparent")
WidgetXPBar.Rank = NP:Construct_TagText(nameplate.RaisedElement)
WidgetXPBar.ProgressText = NP:Construct_TagText(nameplate.RaisedElement)
NP.StatusBars[WidgetXPBar] = true
......@@ -305,14 +307,20 @@ function NP:Update_WidgetXPBar(nameplate)
nameplate:EnableElement("WidgetXPBar")
end
nameplate.WidgetXPBar:Height(10)
nameplate.WidgetXPBar:Point("TOPLEFT", nameplate.Castbar, "BOTTOMLEFT", 0, db.widgetXPBar.yOffset)
nameplate.WidgetXPBar:Point("TOPRIGHT", nameplate.Castbar, "BOTTOMRIGHT", 0, db.widgetXPBar.yOffset)
local bar = nameplate.WidgetXPBar
bar:ClearAllPoints()
bar:Point("TOPLEFT", nameplate, "BOTTOMLEFT", 0, db.widgetXPBar.yOffset)
bar:Point("TOPRIGHT", nameplate, "BOTTOMRIGHT", 0, db.widgetXPBar.yOffset)
bar:Height(10)
bar.Rank:ClearAllPoints()
bar.Rank:Point("RIGHT", bar, "LEFT", -4, 0)
bar.ProgressText:ClearAllPoints