mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update some more (still needs more work)
This commit is contained in:
@@ -0,0 +1,244 @@
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule("UnitFrames");
|
||||
local LSM = LibStub("LibSharedMedia-3.0");
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local assert, select, pairs, unpack = assert, select, pairs, unpack
|
||||
local tinsert, wipe = tinsert, wipe
|
||||
local getn = table.getn
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
local UnitBuff = UnitBuff
|
||||
|
||||
function UF:Construct_AuraWatch(frame)
|
||||
local auras = CreateFrame("Frame", nil, frame)
|
||||
auras:SetFrameLevel(frame.RaisedElementParent:GetFrameLevel() + 10)
|
||||
E:SetInside(auras, frame.Health)
|
||||
auras.presentAlpha = 1
|
||||
auras.missingAlpha = 0
|
||||
auras.icons = {}
|
||||
|
||||
return auras
|
||||
end
|
||||
|
||||
local counterOffsets = {
|
||||
["TOPLEFT"] = {6, 1},
|
||||
["TOPRIGHT"] = {-6, 1},
|
||||
["BOTTOMLEFT"] = {6, 1},
|
||||
["BOTTOMRIGHT"] = {-6, 1},
|
||||
["LEFT"] = {6, 1},
|
||||
["RIGHT"] = {-6, 1},
|
||||
["TOP"] = {0, 0},
|
||||
["BOTTOM"] = {0, 0}
|
||||
}
|
||||
|
||||
local textCounterOffsets = {
|
||||
["TOPLEFT"] = {"LEFT", "RIGHT", -2, 0},
|
||||
["TOPRIGHT"] = {"RIGHT", "LEFT", 2, 0},
|
||||
["BOTTOMLEFT"] = {"LEFT", "RIGHT", -2, 0},
|
||||
["BOTTOMRIGHT"] = {"RIGHT", "LEFT", 2, 0},
|
||||
["LEFT"] = {"LEFT", "RIGHT", -2, 0},
|
||||
["RIGHT"] = {"RIGHT", "LEFT", 2, 0},
|
||||
["TOP"] = {"RIGHT", "LEFT", 2, 0},
|
||||
["BOTTOM"] = {"RIGHT", "LEFT", 2, 0}
|
||||
}
|
||||
|
||||
function UF:UpdateAuraWatchFromHeader(group, petOverride)
|
||||
assert(self[group], "Invalid group specified.")
|
||||
group = self[group]
|
||||
for i = 1, group:GetNumChildren() do
|
||||
local frame = select(i, group:GetChildren())
|
||||
if frame and frame.Health then
|
||||
UF:UpdateAuraWatch(frame, petOverride, group.db)
|
||||
elseif frame then
|
||||
for n = 1, frame:GetNumChildren() do
|
||||
local child = select(n, frame:GetChildren())
|
||||
if child and child.Health then
|
||||
UF:UpdateAuraWatch(child, petOverride, group.db)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local buffs = {}
|
||||
function UF:UpdateAuraWatch(frame, petOverride, db)
|
||||
wipe(buffs)
|
||||
local auras = frame.AuraWatch
|
||||
db = db and db.buffIndicator or frame.db.buffIndicator
|
||||
|
||||
if not db.enable then
|
||||
auras:Hide()
|
||||
return
|
||||
else
|
||||
auras:Show()
|
||||
end
|
||||
|
||||
if frame.unit == "pet" and not petOverride then
|
||||
local petWatch = E.global.unitframe.buffwatch.PET or {}
|
||||
for _, value in pairs(petWatch) do
|
||||
if value.style == "text" then value.style = "NONE" end --depreciated
|
||||
tinsert(buffs, value)
|
||||
end
|
||||
else
|
||||
local buffWatch = not db.profileSpecific and (E.global.unitframe.buffwatch[E.myclass] or {}) or (E.db.unitframe.filters.buffwatch or {})
|
||||
for _, value in pairs(buffWatch) do
|
||||
if value.style == "text" then value.style = "NONE" end --depreciated
|
||||
tinsert(buffs, value)
|
||||
end
|
||||
end
|
||||
|
||||
--CLEAR CACHE
|
||||
if auras.icons then
|
||||
for i = 1, getn(auras.icons) do
|
||||
local matchFound = false
|
||||
for j = 1, getn(buffs) do
|
||||
if buffs[j].id and buffs[j].id == auras.icons[i] then
|
||||
matchFound = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if not matchFound then
|
||||
auras.icons[i]:Hide()
|
||||
auras.icons[i] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local unitframeFont = LSM:Fetch("font", E.db.unitframe.font)
|
||||
|
||||
for i = 1, getn(buffs) do
|
||||
if buffs[i].id then
|
||||
local name, _, image = UnitBuff(frame.unit, buffs[i].id)
|
||||
if name then
|
||||
local icon
|
||||
if not auras.icons[buffs[i].id] then
|
||||
icon = CreateFrame("Frame", nil, auras)
|
||||
else
|
||||
icon = auras.icons[buffs[i].id]
|
||||
end
|
||||
icon.name = name
|
||||
icon.image = image
|
||||
icon.spellID = buffs[i].id
|
||||
icon.style = buffs[i].style
|
||||
icon.onlyShowMissing = buffs[i].onlyShowMissing
|
||||
icon.presentAlpha = icon.onlyShowMissing and 0 or 1
|
||||
icon.missingAlpha = icon.onlyShowMissing and 1 or 0
|
||||
icon.textThreshold = buffs[i].textThreshold or -1
|
||||
icon.displayText = buffs[i].displayText
|
||||
icon.decimalThreshold = buffs[i].decimalThreshold
|
||||
icon.size = (buffs[i].sizeOverride ~= nil and buffs[i].sizeOverride > 0 and buffs[i].sizeOverride or db.size)
|
||||
|
||||
icon:SetWidth(icon.size)
|
||||
icon:SetHeight(icon.size)
|
||||
--Protect against missing .point value
|
||||
if not buffs[i].point then buffs[i].point = "TOPLEFT" end
|
||||
|
||||
icon:ClearAllPoints()
|
||||
E:Point(icon, buffs[i].point or "TOPLEFT", frame.Health, buffs[i].point or "TOPLEFT", buffs[i].xOffset, buffs[i].yOffset)
|
||||
|
||||
if not icon.icon then
|
||||
icon.icon = icon:CreateTexture(nil, "BORDER")
|
||||
icon.icon:SetAllPoints(icon)
|
||||
end
|
||||
|
||||
if not icon.text then
|
||||
local f = CreateFrame("Frame", nil, icon)
|
||||
f:SetFrameLevel(icon:GetFrameLevel() + 50)
|
||||
icon.text = f:CreateFontString(nil, "BORDER")
|
||||
end
|
||||
|
||||
if not icon.border then
|
||||
icon.border = icon:CreateTexture(nil, "BACKGROUND")
|
||||
E:Point(icon.border, "TOPLEFT", -E.mult, E.mult)
|
||||
E:Point(icon.border, "BOTTOMRIGHT", E.mult, -E.mult)
|
||||
icon.border:SetTexture(E.media.blankTex)
|
||||
icon.border:SetVertexColor(0, 0, 0)
|
||||
end
|
||||
|
||||
if not icon.cd then
|
||||
icon.cd = CreateFrame("Cooldown", nil, icon, "CooldownFrameTemplate")
|
||||
icon.cd:SetAllPoints(icon)
|
||||
icon.cd.noOCC = true
|
||||
icon.cd.noCooldownCount = true
|
||||
icon.cd:SetReverse(true)
|
||||
icon.cd:SetFrameLevel(icon:GetFrameLevel())
|
||||
end
|
||||
|
||||
if icon.style == "coloredIcon" then
|
||||
icon.icon:SetTexture(E.media.blankTex)
|
||||
|
||||
if buffs[i].color then
|
||||
icon.icon:SetVertexColor(buffs[i].color.r, buffs[i].color.g, buffs[i].color.b)
|
||||
else
|
||||
icon.icon:SetVertexColor(0.8, 0.8, 0.8)
|
||||
end
|
||||
icon.icon:Show()
|
||||
icon.border:Show()
|
||||
icon.cd:SetAlpha(1)
|
||||
elseif icon.style == "texturedIcon" then
|
||||
icon.icon:SetVertexColor(1, 1, 1)
|
||||
icon.icon:SetTexCoord(unpack(E.TexCoords))
|
||||
icon.icon:SetTexture(icon.image)
|
||||
icon.icon:Show()
|
||||
icon.border:Show()
|
||||
icon.cd:SetAlpha(1)
|
||||
else
|
||||
icon.border:Hide()
|
||||
icon.icon:Hide()
|
||||
icon.cd:SetAlpha(0)
|
||||
end
|
||||
|
||||
if icon.displayText then
|
||||
icon.text:Show()
|
||||
local r, g, b = 1, 1, 1
|
||||
if buffs[i].textColor then
|
||||
r, g, b = buffs[i].textColor.r, buffs[i].textColor.g, buffs[i].textColor.b
|
||||
end
|
||||
|
||||
icon.text:SetTextColor(r, g, b)
|
||||
else
|
||||
icon.text:Hide()
|
||||
end
|
||||
|
||||
if not icon.count then
|
||||
icon.count = icon:CreateFontString(nil, "OVERLAY")
|
||||
end
|
||||
|
||||
icon.count:ClearAllPoints()
|
||||
if icon.displayText then
|
||||
local point, anchorPoint, x, y = unpack(textCounterOffsets[buffs[i].point])
|
||||
E:Point(icon.count, point, icon.text, anchorPoint, x, y)
|
||||
else
|
||||
E:Point(icon.count, "CENTER", unpack(counterOffsets[buffs[i].point]))
|
||||
end
|
||||
|
||||
E:FontTemplate(icon.count, unitframeFont, db.fontSize, E.db.unitframe.fontOutline)
|
||||
E:FontTemplate(icon.text, unitframeFont, db.fontSize, E.db.unitframe.fontOutline)
|
||||
icon.text:ClearAllPoints()
|
||||
E:Point(icon.text, buffs[i].point, icon, buffs[i].point)
|
||||
|
||||
if buffs[i].enabled then
|
||||
auras.icons[buffs[i].id] = icon
|
||||
if auras.watched then
|
||||
auras.watched[buffs[i].id] = icon
|
||||
end
|
||||
else
|
||||
auras.icons[buffs[i].id] = nil
|
||||
if auras.watched then
|
||||
auras.watched[buffs[i].id] = nil
|
||||
end
|
||||
icon:Hide()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if frame.AuraWatch.Update then
|
||||
frame.AuraWatch.Update(frame)
|
||||
end
|
||||
|
||||
frame:UpdateElement("AuraWatch")
|
||||
end
|
||||
@@ -80,14 +80,14 @@ function UF:Configure_ClassBar(frame)
|
||||
end
|
||||
else --Detached
|
||||
CLASSBAR_WIDTH = db.classbar.detachedWidth - ((frame.BORDER + frame.SPACING)*2)
|
||||
bars.Holder:Size(db.classbar.detachedWidth, db.classbar.height)
|
||||
E:Size(bars.Holder, db.classbar.detachedWidth, db.classbar.height)
|
||||
|
||||
if not bars.Holder.mover then
|
||||
bars:Width(CLASSBAR_WIDTH)
|
||||
bars:Height(frame.CLASSBAR_HEIGHT - ((frame.BORDER+frame.SPACING)*2))
|
||||
bars:SerWidth(CLASSBAR_WIDTH)
|
||||
bars:SetHeight(frame.CLASSBAR_HEIGHT - ((frame.BORDER+frame.SPACING)*2))
|
||||
bars:ClearAllPoints()
|
||||
E:Point(bars, "BOTTOMLEFT", bars.Holder, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
|
||||
E:CreateMover(bars.Holder, "ClassBarMover", L["Classbar"], nil, nil, nil, "ALL,SOLO")
|
||||
E:CreateMover(bars.Holder, "ClassBarMover", L["Classbar"], nil, nil, nil, "ALL,SOLO", nil, "unitframe,player,classbar")
|
||||
else
|
||||
bars:ClearAllPoints()
|
||||
E:Point(bars, "BOTTOMLEFT", bars.Holder, "BOTTOMLEFT", frame.BORDER + frame.SPACING, frame.BORDER + frame.SPACING)
|
||||
@@ -114,8 +114,8 @@ function UF:Configure_ClassBar(frame)
|
||||
end
|
||||
end
|
||||
|
||||
bars:Width(CLASSBAR_WIDTH)
|
||||
bars:Height(frame.CLASSBAR_HEIGHT - ((frame.BORDER + frame.SPACING)*2))
|
||||
bars:SetWidth(CLASSBAR_WIDTH)
|
||||
bars:SetHeight(frame.CLASSBAR_HEIGHT - ((frame.BORDER + frame.SPACING)*2))
|
||||
|
||||
if frame.ClassBar == "DruidAltMana" then
|
||||
if frame.CLASSBAR_DETACHED and db.classbar.verticalOrientation then
|
||||
@@ -137,6 +137,7 @@ function UF:Configure_ClassBar(frame)
|
||||
end
|
||||
|
||||
local function ToggleResourceBar(bars, overrideVisibility)
|
||||
local bars = bars or this
|
||||
local frame = bars.origParent or bars:GetParent()
|
||||
local db = frame.db
|
||||
if not db then return end
|
||||
@@ -177,13 +178,13 @@ function UF:Construct_DruidAltMana(frame)
|
||||
druidAltMana.colorPower = true
|
||||
druidAltMana.PostUpdate = UF.PostUpdateDruidAltMana
|
||||
druidAltMana.PostUpdateVisibility = UF.PostVisibilityDruidAltMana
|
||||
druidAltMana:CreateBackdrop("Default")
|
||||
UF["statusbars"][druidAltMana] = true
|
||||
druidAltMana:SetStatusBarTexture(E["media"].blankTex)
|
||||
E:CreateBackdrop(druidAltMana, "Default")
|
||||
UF.statusbars[druidAltMana] = true
|
||||
druidAltMana:SetStatusBarTexture(E.media.blankTex)
|
||||
|
||||
druidAltMana.bg = druidAltMana:CreateTexture(nil, "BORDER")
|
||||
druidAltMana.bg:SetAllPoints(druidAltMana)
|
||||
druidAltMana.bg:SetTexture(E["media"].blankTex)
|
||||
druidAltMana.bg:SetTexture(E.media.blankTex)
|
||||
druidAltMana.bg.multiplier = 0.3
|
||||
|
||||
druidAltMana.text = druidAltMana:CreateFontString(nil, "OVERLAY")
|
||||
@@ -195,17 +196,18 @@ function UF:Construct_DruidAltMana(frame)
|
||||
return druidAltMana
|
||||
end
|
||||
|
||||
function UF:PostUpdateDruidAltMana(_, min, max, event)
|
||||
function UF:PostUpdateDruidAltMana(_, cur, max, event)
|
||||
local frame = self.origParent or self:GetParent()
|
||||
local db = frame.db
|
||||
|
||||
if frame.USE_CLASSBAR and ((min ~= max or (not db.classbar.autoHide)) and (event ~= "ElementDisable")) then
|
||||
--if frame.USE_CLASSBAR and ((cur ~= max or (not db.classbar.autoHide)) and (event ~= "ElementDisable")) then
|
||||
if frame.USE_CLASSBAR and ((cur ~= max or (not db.classbar.autoHide)) and (event ~= "ElementDisable")) then
|
||||
if db.classbar.additionalPowerText then
|
||||
local powerValue = frame.Power.value
|
||||
local powerValueText = powerValue:GetText()
|
||||
local powerValueParent = powerValue:GetParent()
|
||||
local powerTextPosition = db.power.position
|
||||
local color = ElvUF["colors"].power[0]
|
||||
local color = ElvUF.colors.power[0]
|
||||
color = E:RGBToHex(color[1], color[2], color[3])
|
||||
|
||||
--Attempt to remove |cFFXXXXXX color codes in order to determine if power text is really empty
|
||||
@@ -224,27 +226,27 @@ function UF:PostUpdateDruidAltMana(_, min, max, event)
|
||||
if (powerValueText and (powerValueText ~= "" and powerValueText ~= " ")) then
|
||||
if find(powerTextPosition, "RIGHT") then
|
||||
E:Point(self.text, "RIGHT", powerValue, "LEFT", 3, 0)
|
||||
self.text:SetText(format(color.."%d%%|r |cffD7BEA5- |r", floor(min / max * 100)))
|
||||
self.text:SetText(format(color.."%d%%|r |cffD7BEA5- |r", floor(cur / max * 100)))
|
||||
elseif find(powerTextPosition, "LEFT") then
|
||||
E:Point(self.text, "LEFT", powerValue, "RIGHT", -3, 0)
|
||||
self.text:SetText(format("|cffD7BEA5 -|r"..color.." %d%%|r", floor(min / max * 100)))
|
||||
self.text:SetText(format("|cffD7BEA5 -|r"..color.." %d%%|r", floor(cur / max * 100)))
|
||||
else
|
||||
if select(4, powerValue:GetPoint()) <= 0 then
|
||||
E:Point(self.text, "LEFT", powerValue, "RIGHT", -3, 0)
|
||||
self.text:SetText(format(" |cffD7BEA5-|r"..color.." %d%%|r", floor(min / max * 100)))
|
||||
self.text:SetText(format(" |cffD7BEA5-|r"..color.." %d%%|r", floor(cur / max * 100)))
|
||||
else
|
||||
E:Point(self.text, "RIGHT", powerValue, "LEFT", 3, 0)
|
||||
self.text:SetText(format(color.."%d%%|r |cffD7BEA5- |r", floor(min / max * 100)))
|
||||
self.text:SetText(format(color.."%d%%|r |cffD7BEA5- |r", floor(cur / max * 100)))
|
||||
end
|
||||
end
|
||||
else
|
||||
E:Point(self.text, powerValue:GetPoint())
|
||||
self.text:SetText(format(color.."%d%%|r", floor(min / max * 100)))
|
||||
self.text:SetText(format(color.."%d%%|r", floor(cur / max * 100)))
|
||||
end
|
||||
else
|
||||
self.text:SetParent(self)
|
||||
self.text:SetParent(frame.RaisedElementParent)
|
||||
E:Point(self.text, "CENTER", self)
|
||||
self.text:SetText(format(color.."%d%%|r", floor(min / max * 100)))
|
||||
self.text:SetText(format(color.."%d%%|r", floor(cur / max * 100)))
|
||||
end
|
||||
else --Text disabled
|
||||
self.text:SetText()
|
||||
@@ -264,6 +266,6 @@ function UF:PostVisibilityDruidAltMana(enabled, stateChanged)
|
||||
UF:Configure_ClassBar(frame)
|
||||
UF:Configure_HealthBar(frame)
|
||||
UF:Configure_Power(frame)
|
||||
UF:Configure_InfoPanel(frame, true) --2nd argument is to prevent it from setting template, which removes threat border
|
||||
UF:Configure_InfoPanel(frame)
|
||||
end
|
||||
end
|
||||
@@ -12,9 +12,9 @@ function UF:Construct_CombatIndicator(frame)
|
||||
end
|
||||
|
||||
function UF:Configure_CombatIndicator(frame)
|
||||
if frame.db.combatIcon and not frame:IsElementEnabled('CombatIndicator') then
|
||||
if frame.db.combatIcon and not frame:IsElementEnabled("CombatIndicator") then
|
||||
frame:EnableElement("CombatIndicator")
|
||||
elseif not frame.db.combatIcon and frame:IsElementEnabled('CombatIndicator') then
|
||||
elseif not frame.db.combatIcon and frame:IsElementEnabled("CombatIndicator") then
|
||||
frame:DisableElement("CombatIndicator")
|
||||
frame.CombatIndicator:Hide()
|
||||
end
|
||||
|
||||
@@ -19,7 +19,7 @@ assert(ElvUF, "ElvUI was unable to locate oUF.")
|
||||
|
||||
function UF:Construct_HealthBar(frame, bg, text, textPos)
|
||||
local health = CreateFrame("StatusBar", nil, frame)
|
||||
UF["statusbars"][health] = true
|
||||
UF.statusbars[health] = true
|
||||
|
||||
health:SetFrameLevel(10) --Make room for Portrait and Power which should be lower by default
|
||||
health.PostUpdate = self.PostUpdateHealth
|
||||
@@ -202,7 +202,7 @@ function UF:PostUpdateHealth(unit, min, max)
|
||||
end
|
||||
|
||||
local r, g, b = self:GetStatusBarColor()
|
||||
local colors = E.db["unitframe"]["colors"]
|
||||
local colors = E.db.unitframe.colors
|
||||
if ((colors.healthclass == true and colors.colorhealthbyvalue == true) or (colors.colorhealthbyvalue and parent.isForced)) and not (UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) then
|
||||
local newr, newg, newb = ElvUF.ColorGradient(min, max, 1, 0, 0, 1, 1, 0, r, g, b)
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||
<Script file="Auras.lua"/>
|
||||
<Script file="BuffIndicator.lua"/>
|
||||
<Script file="Castbar.lua"/>
|
||||
<Script file="Classbars.lua"/>
|
||||
<Script file="CombatIndicator.lua"/>
|
||||
@@ -15,11 +16,9 @@
|
||||
<Script file="InfoPanel.lua"/>
|
||||
<Script file="PvPIcon.lua"/>
|
||||
<Script file="PvPIndicator.lua"/>
|
||||
<Script file="RaidDebuffs.lua"/>
|
||||
<Script file="RaidIcon.lua"/>
|
||||
<Script file="RaidRoleIcons.lua"/>
|
||||
<Script file="Range.lua"/>
|
||||
<Script file="ReadyCheckIcon.lua"/>
|
||||
<Script file="RestingIndicator.lua"/>
|
||||
<Script file="ResurrectionIcon.lua"/>
|
||||
<Script file="FrameGlow.lua"/>
|
||||
</Ui>
|
||||
@@ -241,4 +241,9 @@ function UF:PostUpdatePower(unit, cur, max)
|
||||
if db and db.power and db.power.hideonnpc then
|
||||
UF:PostNamePosition(parent, unit)
|
||||
end
|
||||
|
||||
--Force update to DruidAltMana in order to reposition text if necessary
|
||||
if parent:IsElementEnabled("DruidAltMana") then
|
||||
E:Delay(0.01, parent.DruidAltMana.ForceUpdate, parent.DruidAltMana) --Delay it slightly so Power text has a chance to clear itself first
|
||||
end
|
||||
end
|
||||
@@ -1,11 +1,6 @@
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule("UnitFrames");
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
|
||||
--WoW API / Variables
|
||||
|
||||
function UF:Construct_PvPIndicator(frame)
|
||||
local pvp = frame.RaisedElementParent:CreateFontString(nil, "OVERLAY")
|
||||
UF:Configure_FontString(pvp)
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule("UnitFrames");
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local unpack = unpack
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
function UF:Construct_RaidDebuffs(frame)
|
||||
local rdebuff = CreateFrame("Frame", nil, frame.RaisedElementParent)
|
||||
E:SetTemplate(rdebuff, "Default", nil, nil, UF.thinBorders, true)
|
||||
rdebuff:SetFrameLevel(frame.RaisedElementParent:GetFrameLevel() + 20) --Make them appear above regular buffs or debuffs
|
||||
|
||||
local offset = UF.thinBorders and E.mult or E.Border
|
||||
rdebuff.icon = rdebuff:CreateTexture(nil, "OVERLAY")
|
||||
rdebuff.icon:SetTexCoord(unpack(E.TexCoords))
|
||||
E:SetInside(rdebuff.icon, rdebuff, offset, offset)
|
||||
|
||||
rdebuff.count = rdebuff:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(rdebuff.count, nil, 10, "OUTLINE")
|
||||
E:Point(rdebuff.count, "BOTTOMRIGHT", 0, 2)
|
||||
rdebuff.count:SetTextColor(1, .9, 0)
|
||||
|
||||
rdebuff.time = rdebuff:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(rdebuff.time, nil, 10, "OUTLINE")
|
||||
E:Point(rdebuff.time, "CENTER")
|
||||
rdebuff.time:SetTextColor(1, .9, 0)
|
||||
|
||||
return rdebuff
|
||||
end
|
||||
|
||||
function UF:Configure_RaidDebuffs(frame)
|
||||
if not frame.VARIABLES_SET then return end
|
||||
local db = frame.db
|
||||
local rdebuffs = frame.RaidDebuffs
|
||||
|
||||
if db.rdebuffs.enable then
|
||||
local stackColor = db.rdebuffs.stack.color
|
||||
local durationColor = db.rdebuffs.duration.color
|
||||
local rdebuffsFont = UF.LSM:Fetch("font", db.rdebuffs.font)
|
||||
if not frame:IsElementEnabled("RaidDebuffs") then
|
||||
frame:EnableElement("RaidDebuffs")
|
||||
end
|
||||
|
||||
rdebuffs.showDispellableDebuff = db.rdebuffs.showDispellableDebuff
|
||||
rdebuffs.forceShow = frame.forceShowAuras
|
||||
E:Size(rdebuffs, db.rdebuffs.size)
|
||||
E:Point(rdebuffs, "BOTTOM", frame, "BOTTOM", db.rdebuffs.xOffset, db.rdebuffs.yOffset + frame.SPACING)
|
||||
|
||||
E:FontTemplate(rdebuffs.count, rdebuffsFont, db.rdebuffs.fontSize, db.rdebuffs.fontOutline)
|
||||
rdebuffs.count:ClearAllPoints()
|
||||
E:Point(rdebuffs.count, db.rdebuffs.stack.position, db.rdebuffs.stack.xOffset, db.rdebuffs.stack.yOffset)
|
||||
rdebuffs.count:SetTextColor(stackColor.r, stackColor.g, stackColor.b, stackColor.a)
|
||||
|
||||
E:FontTemplate(rdebuffs.time, rdebuffsFont, db.rdebuffs.fontSize, db.rdebuffs.fontOutline)
|
||||
rdebuffs.time:ClearAllPoints()
|
||||
E:Point(rdebuffs.time, db.rdebuffs.duration.position, db.rdebuffs.duration.xOffset, db.rdebuffs.duration.yOffset)
|
||||
rdebuffs.time:SetTextColor(durationColor.r, durationColor.g, durationColor.b, durationColor.a)
|
||||
elseif frame:IsElementEnabled("RaidDebuffs") then
|
||||
frame:DisableElement("RaidDebuffs")
|
||||
rdebuffs:Hide()
|
||||
end
|
||||
end
|
||||
@@ -1,95 +0,0 @@
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule("UnitFrames");
|
||||
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
local ns = oUF
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, "ElvUI was unable to locate oUF.")
|
||||
|
||||
function UF:Construct_RaidRoleFrames(frame)
|
||||
local anchor = CreateFrame("Frame", nil, frame.RaisedElementParent)
|
||||
frame.LeaderIndicator = anchor:CreateTexture(nil, "OVERLAY")
|
||||
frame.AssistantIndicator = anchor:CreateTexture(nil, "OVERLAY")
|
||||
frame.MasterLooterIndicator = anchor:CreateTexture(nil, "OVERLAY")
|
||||
|
||||
anchor:SetWidth(24)
|
||||
anchor:SetHeight(12)
|
||||
frame.LeaderIndicator:SetWidth(12)
|
||||
frame.LeaderIndicator:SetHeight(12)
|
||||
frame.AssistantIndicator:SetWidth(12)
|
||||
frame.AssistantIndicator:SetHeight(12)
|
||||
frame.MasterLooterIndicator:SetWidth(11)
|
||||
frame.MasterLooterIndicator:SetHeight(11)
|
||||
|
||||
frame.LeaderIndicator.PostUpdate = UF.RaidRoleUpdate
|
||||
frame.AssistantIndicator.PostUpdate = UF.RaidRoleUpdate
|
||||
frame.MasterLooterIndicator.PostUpdate = UF.RaidRoleUpdate
|
||||
|
||||
return anchor
|
||||
end
|
||||
|
||||
function UF:Configure_RaidRoleIcons(frame)
|
||||
local raidRoleFrameAnchor = frame.RaidRoleFramesAnchor
|
||||
|
||||
if frame.db.raidRoleIcons.enable then
|
||||
raidRoleFrameAnchor:Show()
|
||||
if not frame:IsElementEnabled("LeaderIndicator") then
|
||||
frame:EnableElement("LeaderIndicator")
|
||||
frame:EnableElement("MasterLooterIndicator")
|
||||
frame:EnableElement("AssistantIndicator")
|
||||
end
|
||||
|
||||
raidRoleFrameAnchor:ClearAllPoints()
|
||||
if frame.db.raidRoleIcons.position == "TOPLEFT" then
|
||||
raidRoleFrameAnchor:SetPoint("LEFT", frame.Health, "TOPLEFT", 2, 0)
|
||||
else
|
||||
raidRoleFrameAnchor:SetPoint("RIGHT", frame, "TOPRIGHT", -2, 0)
|
||||
end
|
||||
elseif frame:IsElementEnabled("LeaderIndicator") then
|
||||
raidRoleFrameAnchor:Hide()
|
||||
frame:DisableElement("LeaderIndicator")
|
||||
frame:DisableElement("MasterLooterIndicator")
|
||||
frame:DisableElement("AssistantIndicator")
|
||||
end
|
||||
end
|
||||
|
||||
function UF:RaidRoleUpdate()
|
||||
local anchor = self:GetParent()
|
||||
local frame = anchor:GetParent():GetParent()
|
||||
local leader = frame.LeaderIndicator
|
||||
local assistant = frame.AssistantIndicator
|
||||
local masterLooter = frame.MasterLooterIndicator
|
||||
|
||||
if not leader or not masterLooter or not assistant then return; end
|
||||
|
||||
local db = frame.db
|
||||
local isLeader = leader:IsShown()
|
||||
local isMasterLooter = masterLooter:IsShown()
|
||||
local isAssist = assistant:IsShown()
|
||||
|
||||
leader:ClearAllPoints()
|
||||
assistant:ClearAllPoints()
|
||||
masterLooter:ClearAllPoints()
|
||||
|
||||
if db and db.raidRoleIcons then
|
||||
if isLeader and db.raidRoleIcons.position == "TOPLEFT" then
|
||||
leader:SetPoint("LEFT", anchor, "LEFT")
|
||||
masterLooter:SetPoint("RIGHT", anchor, "RIGHT")
|
||||
elseif isLeader and db.raidRoleIcons.position == "TOPRIGHT" then
|
||||
leader:SetPoint("RIGHT", anchor, "RIGHT")
|
||||
masterLooter:SetPoint("LEFT", anchor, "LEFT")
|
||||
elseif isAssist and db.raidRoleIcons.position == "TOPLEFT" then
|
||||
assistant:SetPoint("LEFT", anchor, "LEFT")
|
||||
masterLooter:SetPoint("RIGHT", anchor, "RIGHT")
|
||||
elseif isAssist and db.raidRoleIcons.position == "TOPRIGHT" then
|
||||
assistant:SetPoint("RIGHT", anchor, "RIGHT")
|
||||
masterLooter:SetPoint("LEFT", anchor, "LEFT")
|
||||
elseif isMasterLooter and db.raidRoleIcons.position == "TOPLEFT" then
|
||||
masterLooter:SetPoint("LEFT", anchor, "LEFT")
|
||||
else
|
||||
masterLooter:SetPoint("RIGHT", anchor, "RIGHT")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,28 +0,0 @@
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule("UnitFrames");
|
||||
|
||||
function UF:Construct_ReadyCheckIcon(frame)
|
||||
local tex = frame.RaisedElementParent.TextureParent:CreateTexture(nil, "OVERLAY")
|
||||
E:Size(tex, 12)
|
||||
E:Point(tex, "BOTTOM", frame.Health, "BOTTOM", 0, 2)
|
||||
|
||||
return tex
|
||||
end
|
||||
|
||||
function UF:Configure_ReadyCheckIcon(frame)
|
||||
local ReadyCheckIndicator = frame.ReadyCheckIndicator
|
||||
local db = frame.db
|
||||
|
||||
if db.readycheckIcon.enable then
|
||||
if not frame:IsElementEnabled("ReadyCheckIndicator") then
|
||||
frame:EnableElement("ReadyCheckIndicator")
|
||||
end
|
||||
|
||||
local attachPoint = self:GetObjectAnchorPoint(frame, db.readycheckIcon.attachTo)
|
||||
ReadyCheckIndicator:ClearAllPoints()
|
||||
E:Point(ReadyCheckIndicator, db.readycheckIcon.position, attachPoint, db.readycheckIcon.position, db.readycheckIcon.xOffset, db.readycheckIcon.yOffset)
|
||||
E:Size(ReadyCheckIndicator, db.readycheckIcon.size)
|
||||
else
|
||||
frame:DisableElement("ReadyCheckIndicator")
|
||||
end
|
||||
end
|
||||
@@ -1,34 +0,0 @@
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule("UnitFrames");
|
||||
|
||||
function UF:Construct_ResurrectionIcon(frame)
|
||||
local tex = frame.RaisedElementParent.TextureParent:CreateTexture(nil, "OVERLAY")
|
||||
tex:SetTexture([[Interface\AddOns\ElvUI\media\textures\Raid-Icon-Rez]])
|
||||
E:Point(tex, "CENTER", frame.Health, "CENTER")
|
||||
E:Size(tex, 30)
|
||||
tex:SetDrawLayer("OVERLAY", 7)
|
||||
|
||||
return tex
|
||||
end
|
||||
|
||||
function UF:Configure_ResurrectionIcon(frame)
|
||||
local RI = frame.ResurrectIndicator
|
||||
local db = frame.db
|
||||
|
||||
if db.resurrectIcon.enable then
|
||||
if not frame:IsElementEnabled("ResurrectIndicator") then
|
||||
frame:EnableElement("ResurrectIndicator")
|
||||
end
|
||||
RI:Show()
|
||||
E:Size(RI, db.resurrectIcon.size)
|
||||
|
||||
local attachPoint = self:GetObjectAnchorPoint(frame, db.resurrectIcon.attachToObject)
|
||||
RI:ClearAllPoints()
|
||||
E:Point(RI, db.resurrectIcon.attachTo, attachPoint, db.resurrectIcon.attachTo, db.resurrectIcon.xOffset, db.resurrectIcon.yOffset)
|
||||
else
|
||||
if frame:IsElementEnabled("ResurrectIndicator") then
|
||||
frame:DisableElement("ResurrectIndicator")
|
||||
end
|
||||
RI:Hide()
|
||||
end
|
||||
end
|
||||
@@ -1,4 +1,6 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||
<Script file="Party.lua"/>
|
||||
<Script file="Raid.lua"/>
|
||||
<Script file="Raid40.lua"/>
|
||||
<Script file="RaidPets.lua"/>
|
||||
</Ui>
|
||||
@@ -1,68 +1,113 @@
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule("UnitFrames");
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local _G = _G
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
local ns = oUF
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, "ElvUI was unable to locate oUF.")
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local _G = _G
|
||||
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
local GetNumRaidMembers = GetNumRaidMembers
|
||||
local UnitInRaid = UnitInRaid
|
||||
|
||||
function UF:Construct_PartyFrames()
|
||||
self:SetScript("OnEnter", UnitFrame_OnEnter)
|
||||
self:SetScript("OnLeave", UnitFrame_OnLeave)
|
||||
|
||||
self.RaisedElementParent = CreateFrame("Frame", nil, self)
|
||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||
self.RaisedElementParent.TextureParent = CreateFrame("Frame", nil, self.RaisedElementParent)
|
||||
self.RaisedElementParent.TextureParent:SetFrameLevel(self.RaisedElementParent:GetFrameLevel() + 1)
|
||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||
self.BORDER = E.Border
|
||||
self.SPACING = E.Spacing
|
||||
self.SHADOW_SPACING = 3
|
||||
if self.isChild then
|
||||
self.Health = UF:Construct_HealthBar(self, true)
|
||||
|
||||
self.Health = UF:Construct_HealthBar(self, true, true, "RIGHT")
|
||||
self.Power = UF:Construct_PowerBar(self, true, true, "LEFT")
|
||||
self.Power.frequentUpdates = false
|
||||
self.Portrait3D = UF:Construct_Portrait(self, "model")
|
||||
self.Portrait2D = UF:Construct_Portrait(self, "texture")
|
||||
self.InfoPanel = UF:Construct_InfoPanel(self)
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.RaidRoleFramesAnchor = UF:Construct_RaidRoleFrames(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
|
||||
self.originalParent = self:GetParent()
|
||||
|
||||
local childDB = UF.db.units.party.petsGroup
|
||||
self.childType = "pet"
|
||||
if self == _G[self.originalParent:GetName().."Target"] then
|
||||
childDB = UF.db.units.party.targetsGroup
|
||||
self.childType = "target"
|
||||
end
|
||||
|
||||
self.unitframeType = "party"..self.childType
|
||||
|
||||
self:SetWidth(childDB.width)
|
||||
self:SetHeight(childDB.height)
|
||||
else
|
||||
self:SetWidth(UF.db.units.party.width)
|
||||
self:SetHeight(UF.db.units.party.height)
|
||||
|
||||
self.Health = UF:Construct_HealthBar(self, true, true, "RIGHT")
|
||||
|
||||
self.Power = UF:Construct_PowerBar(self, true, true, "LEFT")
|
||||
self.Power.frequentUpdates = false
|
||||
|
||||
self.Portrait3D = UF:Construct_Portrait(self, "model")
|
||||
self.Portrait2D = UF:Construct_Portrait(self, "texture")
|
||||
self.InfoPanel = UF:Construct_InfoPanel(self)
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.Buffs = UF:Construct_Buffs(self)
|
||||
self.Debuffs = UF:Construct_Debuffs(self)
|
||||
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||
self.DebuffHighlight = UF:Construct_DebuffHighlight(self)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.GPS = UF:Construct_GPS(self)
|
||||
self.Castbar = UF:Construct_Castbar(self)
|
||||
self.customTexts = {}
|
||||
self.unitframeType = "party"
|
||||
end
|
||||
|
||||
self.GPS = UF:Construct_GPS(self)
|
||||
self.Range = UF:Construct_Range(self)
|
||||
self.unitframeType = "party"
|
||||
|
||||
UF:Update_StatusBars()
|
||||
UF:Update_FontStrings()
|
||||
|
||||
UF:Update_PartyFrames(self, UF.db.units.party)
|
||||
|
||||
return self;
|
||||
return self
|
||||
end
|
||||
|
||||
function UF:PartySmartVisibility()
|
||||
if not self then self = this end
|
||||
if not self.db or (self.db and not self.db.enable) then return end
|
||||
|
||||
if GetNumRaidMembers() < 1 then
|
||||
local numMembers = GetNumRaidMembers()
|
||||
if numMembers < 1 then
|
||||
self:Show()
|
||||
else
|
||||
self:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
function UF:Update_PartyHeader(header)
|
||||
function UF:Update_PartyHeader(header, db)
|
||||
header.db = db
|
||||
|
||||
if not header.positioned then
|
||||
header:ClearAllPoints()
|
||||
header:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
||||
E:Point(header, "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
||||
|
||||
E:CreateMover(header, header:GetName().."Mover", L["Party Frames"], nil, nil, nil, "ALL,PARTY")
|
||||
|
||||
header:RegisterEvent("PLAYER_LOGIN")
|
||||
header:RegisterEvent("ZONE_CHANGED_NEW_AREA")
|
||||
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
||||
header:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||
header:SetScript("OnEvent", UF.PartySmartVisibility)
|
||||
|
||||
header.positioned = true
|
||||
end
|
||||
|
||||
@@ -72,7 +117,7 @@ end
|
||||
function UF:Update_PartyFrames(frame, db)
|
||||
frame.db = db
|
||||
|
||||
frame.Portrait = db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D
|
||||
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
|
||||
frame.colors = ElvUF.colors
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
|
||||
|
||||
@@ -85,7 +130,7 @@ function UF:Update_PartyFrames(frame, db)
|
||||
frame.SPACING = E.Spacing
|
||||
end
|
||||
|
||||
frame.ORIENTATION = db.orientation
|
||||
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||
frame.UNIT_WIDTH = db.width
|
||||
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
||||
|
||||
@@ -102,8 +147,6 @@ function UF:Update_PartyFrames(frame, db)
|
||||
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
||||
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == "MIDDLE")
|
||||
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||
|
||||
frame.CLASSBAR_WIDTH = 0
|
||||
frame.CLASSBAR_YOFFSET = 0
|
||||
|
||||
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
||||
@@ -114,28 +157,80 @@ function UF:Update_PartyFrames(frame, db)
|
||||
frame.VARIABLES_SET = true
|
||||
end
|
||||
|
||||
frame:SetWidth(frame.UNIT_WIDTH)
|
||||
frame:SetHeight(frame.UNIT_HEIGHT)
|
||||
if frame.isChild then
|
||||
frame.USE_PORTAIT = false
|
||||
frame.USE_PORTRAIT_OVERLAY = false
|
||||
frame.PORTRAIT_WIDTH = 0
|
||||
frame.USE_POWERBAR = false
|
||||
frame.USE_INSET_POWERBAR = false
|
||||
frame.USE_MINI_POWERBAR = false
|
||||
frame.USE_POWERBAR_OFFSET = false
|
||||
frame.POWERBAR_OFFSET = 0
|
||||
|
||||
UF:Configure_InfoPanel(frame)
|
||||
frame.POWERBAR_HEIGHT = 0
|
||||
frame.POWERBAR_WIDTH = 0
|
||||
|
||||
UF:Configure_HealthBar(frame)
|
||||
frame.BOTTOM_OFFSET = 0
|
||||
|
||||
UF:UpdateNameSettings(frame)
|
||||
local childDB = db.petsGroup
|
||||
if frame.childType == "target" then
|
||||
childDB = db.targetsGroup
|
||||
end
|
||||
|
||||
UF:Configure_Power(frame)
|
||||
if not frame.originalParent.childList then
|
||||
frame.originalParent.childList = {}
|
||||
end
|
||||
frame.originalParent.childList[frame] = true
|
||||
|
||||
UF:Configure_Portrait(frame)
|
||||
if childDB.enable then
|
||||
frame:SetParent(frame.originalParent)
|
||||
RegisterUnitWatch(frame)
|
||||
E:Size(frame, childDB.width, childDB.height)
|
||||
frame:ClearAllPoints()
|
||||
E:Point(frame, E.InversePoints[childDB.anchorPoint], frame.originalParent, childDB.anchorPoint, childDB.xOffset, childDB.yOffset)
|
||||
else
|
||||
UnregisterUnitWatch(frame)
|
||||
frame:SetParent(E.HiddenFrame)
|
||||
end
|
||||
|
||||
UF:Configure_RaidIcon(frame)
|
||||
UF:Configure_HealthBar(frame)
|
||||
|
||||
UF:Configure_GPS(frame)
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
UF:Configure_RaidRoleIcons(frame)
|
||||
UF:UpdateNameSettings(frame, frame.childType)
|
||||
else
|
||||
|
||||
UF:Configure_InfoPanel(frame)
|
||||
UF:Configure_HealthBar(frame)
|
||||
|
||||
UF:UpdateNameSettings(frame)
|
||||
|
||||
UF:Configure_Power(frame)
|
||||
|
||||
UF:Configure_Portrait(frame)
|
||||
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_Auras(frame, "Buffs")
|
||||
UF:Configure_Auras(frame, "Debuffs")
|
||||
|
||||
UF:Configure_RaidDebuffs(frame)
|
||||
|
||||
UF:Configure_Castbar(frame)
|
||||
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
UF:Configure_DebuffHighlight(frame)
|
||||
|
||||
UF:Configure_GPS(frame)
|
||||
|
||||
UF:UpdateAuraWatch(frame)
|
||||
|
||||
UF:Configure_CustomTexts(frame)
|
||||
end
|
||||
|
||||
UF:Configure_Range(frame)
|
||||
|
||||
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||
end
|
||||
|
||||
UF.headerstoload.party = true
|
||||
UF.headerstoload.party = {nil, "ELVUI_UNITPET, ELVUI_UNITTARGET"}
|
||||
@@ -1,38 +1,54 @@
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule("UnitFrames");
|
||||
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
local ns = oUF
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, "ElvUI was unable to locate oUF.")
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
local GetNumRaidMembers = GetNumRaidMembers
|
||||
local UnitInRaid = UnitInRaid
|
||||
|
||||
function UF:Construct_RaidFrames()
|
||||
self:SetScript("OnEnter", UnitFrame_OnEnter)
|
||||
self:SetScript("OnLeave", UnitFrame_OnLeave)
|
||||
|
||||
self:SetWidth(UF.db.units.raid.width)
|
||||
self:SetHeight(UF.db.units.raid.height)
|
||||
|
||||
self.RaisedElementParent = CreateFrame("Frame", nil, self)
|
||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||
self.RaisedElementParent.TextureParent = CreateFrame("Frame", nil, self.RaisedElementParent)
|
||||
self.RaisedElementParent.TextureParent:SetFrameLevel(self.RaisedElementParent:GetFrameLevel() + 1)
|
||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||
|
||||
self.Health = UF:Construct_HealthBar(self, true, true, "RIGHT")
|
||||
|
||||
self.Power = UF:Construct_PowerBar(self, true, true, "LEFT")
|
||||
self.Power.frequentUpdates = false
|
||||
|
||||
self.Portrait3D = UF:Construct_Portrait(self, "model")
|
||||
self.Portrait2D = UF:Construct_Portrait(self, "texture")
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.RaidRoleFramesAnchor = UF:Construct_RaidRoleFrames(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
|
||||
self.GPS = UF:Construct_GPS(self)
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.Buffs = UF:Construct_Buffs(self)
|
||||
self.Debuffs = UF:Construct_Debuffs(self)
|
||||
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||
self.DebuffHighlight = UF:Construct_DebuffHighlight(self)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
self.InfoPanel = UF:Construct_InfoPanel(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.GPS = UF:Construct_GPS(self)
|
||||
self.Range = UF:Construct_Range(self)
|
||||
self.customTexts = {}
|
||||
|
||||
UF:Update_StatusBars()
|
||||
UF:Update_FontStrings()
|
||||
|
||||
self.unitframeType = "raid"
|
||||
|
||||
UF:Update_RaidFrames(self, UF.db.units.raid)
|
||||
@@ -42,25 +58,30 @@ end
|
||||
|
||||
function UF:RaidSmartVisibility()
|
||||
if not self then self = this end
|
||||
if not self.db or (self.db and not self.db.enable) then return end
|
||||
|
||||
if GetNumRaidMembers() > 1 then
|
||||
local numMembers = GetNumRaidMembers()
|
||||
if numMembers > 1 then
|
||||
self:Show()
|
||||
else
|
||||
self:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
function UF:Update_RaidHeader(header)
|
||||
function UF:Update_RaidHeader(header, db)
|
||||
header.db = db
|
||||
|
||||
if not header.positioned then
|
||||
header:ClearAllPoints()
|
||||
header:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
||||
E:Point(header, "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
||||
|
||||
E:CreateMover(header, header:GetName().."Mover", L["Raid Frames"], nil, nil, nil, "ALL,RAID")
|
||||
|
||||
header:RegisterEvent("PLAYER_LOGIN")
|
||||
header:RegisterEvent("ZONE_CHANGED_NEW_AREA")
|
||||
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
||||
header:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||
header:SetScript("OnEvent", UF.RaidSmartVisibility)
|
||||
|
||||
header.positioned = true
|
||||
end
|
||||
|
||||
@@ -82,9 +103,9 @@ function UF:Update_RaidFrames(frame, db)
|
||||
frame.BORDER = E.Border
|
||||
frame.SPACING = E.Spacing
|
||||
end
|
||||
|
||||
frame.SHADOW_SPACING = 3
|
||||
frame.ORIENTATION = db.orientation
|
||||
|
||||
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||
|
||||
frame.UNIT_WIDTH = db.width
|
||||
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
||||
@@ -103,9 +124,7 @@ function UF:Update_RaidFrames(frame, db)
|
||||
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == "MIDDLE")
|
||||
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||
|
||||
frame.CLASSBAR_WIDTH = 0
|
||||
frame.CLASSBAR_YOFFSET = 0
|
||||
|
||||
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
||||
frame.INFO_PANEL_HEIGHT = frame.USE_INFO_PANEL and db.infoPanel.height or 0
|
||||
|
||||
@@ -114,9 +133,6 @@ function UF:Update_RaidFrames(frame, db)
|
||||
frame.VARIABLES_SET = true
|
||||
end
|
||||
|
||||
frame:SetWidth(frame.UNIT_WIDTH)
|
||||
frame:SetHeight(frame.UNIT_HEIGHT)
|
||||
|
||||
UF:Configure_InfoPanel(frame)
|
||||
|
||||
UF:Configure_HealthBar(frame)
|
||||
@@ -127,14 +143,24 @@ function UF:Update_RaidFrames(frame, db)
|
||||
|
||||
UF:Configure_Portrait(frame)
|
||||
|
||||
UF:Configure_GPS(frame)
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_Auras(frame, "Buffs")
|
||||
UF:Configure_Auras(frame, "Debuffs")
|
||||
|
||||
UF:Configure_RaidDebuffs(frame)
|
||||
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
UF:Configure_RaidRoleIcons(frame)
|
||||
UF:Configure_DebuffHighlight(frame)
|
||||
|
||||
UF:Configure_GPS(frame)
|
||||
|
||||
UF:Configure_Range(frame)
|
||||
|
||||
UF:UpdateAuraWatch(frame)
|
||||
|
||||
UF:Configure_CustomTexts(frame)
|
||||
|
||||
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||
end
|
||||
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule("UnitFrames");
|
||||
|
||||
local ns = oUF
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, "ElvUI was unable to locate oUF.")
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
local GetNumRaidMembers = GetNumRaidMembers
|
||||
local UnitInRaid = UnitInRaid
|
||||
|
||||
function UF:Construct_Raid40Frames()
|
||||
self:SetScript("OnEnter", UnitFrame_OnEnter)
|
||||
self:SetScript("OnLeave", UnitFrame_OnLeave)
|
||||
|
||||
self:SetWidth(UF.db.units.raid40.width)
|
||||
self:SetHeight(UF.db.units.raid40.height)
|
||||
|
||||
self.RaisedElementParent = CreateFrame("Frame", nil, self)
|
||||
self.RaisedElementParent.TextureParent = CreateFrame("Frame", nil, self.RaisedElementParent)
|
||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||
|
||||
self.Health = UF:Construct_HealthBar(self, true, true, "RIGHT")
|
||||
|
||||
self.Power = UF:Construct_PowerBar(self, true, true, "LEFT")
|
||||
self.Power.frequentUpdates = false
|
||||
|
||||
self.Portrait3D = UF:Construct_Portrait(self, "model")
|
||||
self.Portrait2D = UF:Construct_Portrait(self, "texture")
|
||||
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.Buffs = UF:Construct_Buffs(self)
|
||||
self.Debuffs = UF:Construct_Debuffs(self)
|
||||
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||
self.DebuffHighlight = UF:Construct_DebuffHighlight(self)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
self.InfoPanel = UF:Construct_InfoPanel(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.GPS = UF:Construct_GPS(self)
|
||||
self.Range = UF:Construct_Range(self)
|
||||
self.customTexts = {}
|
||||
|
||||
UF:Update_StatusBars()
|
||||
UF:Update_FontStrings()
|
||||
|
||||
self.unitframeType = "raid40"
|
||||
|
||||
UF:Update_Raid40Frames(self, UF.db.units.raid40)
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function UF:Raid40SmartVisibility()
|
||||
if not self then self = this end
|
||||
if not self.db or (self.db and not self.db.enable) then return end
|
||||
|
||||
local numMembers = GetNumRaidMembers()
|
||||
if numMembers > 20 then
|
||||
self:Show()
|
||||
else
|
||||
self:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
function UF:Update_Raid40Header(header, db)
|
||||
header.db = db
|
||||
|
||||
if not header.positioned then
|
||||
header:ClearAllPoints()
|
||||
E:Point(header, "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 195)
|
||||
|
||||
E:CreateMover(header, header:GetName().."Mover", L["Raid-40 Frames"], nil, nil, nil, "ALL,RAID")
|
||||
|
||||
header:RegisterEvent("PLAYER_LOGIN")
|
||||
header:RegisterEvent("ZONE_CHANGED_NEW_AREA")
|
||||
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
||||
header:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||
header:SetScript("OnEvent", UF.Raid40SmartVisibility)
|
||||
header.positioned = true
|
||||
end
|
||||
|
||||
UF.Raid40SmartVisibility(header)
|
||||
end
|
||||
|
||||
function UF:Update_Raid40Frames(frame, db)
|
||||
frame.db = db
|
||||
|
||||
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
|
||||
frame.colors = ElvUF.colors
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
|
||||
|
||||
do
|
||||
if self.thinBorders then
|
||||
frame.SPACING = 0
|
||||
frame.BORDER = E.mult
|
||||
else
|
||||
frame.BORDER = E.Border
|
||||
frame.SPACING = E.Spacing
|
||||
end
|
||||
frame.SHADOW_SPACING = 3
|
||||
|
||||
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||
|
||||
frame.UNIT_WIDTH = db.width
|
||||
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
||||
|
||||
frame.USE_POWERBAR = db.power.enable
|
||||
frame.POWERBAR_DETACHED = db.power.detachFromFrame
|
||||
frame.USE_INSET_POWERBAR = not frame.POWERBAR_DETACHED and db.power.width == "inset" and frame.USE_POWERBAR
|
||||
frame.USE_MINI_POWERBAR = (not frame.POWERBAR_DETACHED and db.power.width == "spaced" and frame.USE_POWERBAR)
|
||||
frame.USE_POWERBAR_OFFSET = db.power.offset ~= 0 and frame.USE_POWERBAR and not frame.POWERBAR_DETACHED
|
||||
frame.POWERBAR_OFFSET = frame.USE_POWERBAR_OFFSET and db.power.offset or 0
|
||||
|
||||
frame.POWERBAR_HEIGHT = not frame.USE_POWERBAR and 0 or db.power.height
|
||||
frame.POWERBAR_WIDTH = frame.USE_MINI_POWERBAR and (frame.UNIT_WIDTH - (frame.BORDER*2))/2 or (frame.POWERBAR_DETACHED and db.power.detachedWidth or (frame.UNIT_WIDTH - ((frame.BORDER+frame.SPACING)*2)))
|
||||
|
||||
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
||||
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == "MIDDLE")
|
||||
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||
|
||||
frame.CLASSBAR_YOFFSET = 0
|
||||
|
||||
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
||||
frame.INFO_PANEL_HEIGHT = frame.USE_INFO_PANEL and db.infoPanel.height or 0
|
||||
|
||||
frame.BOTTOM_OFFSET = UF:GetHealthBottomOffset(frame)
|
||||
|
||||
frame.VARIABLES_SET = true
|
||||
end
|
||||
|
||||
UF:Configure_InfoPanel(frame)
|
||||
|
||||
UF:Configure_HealthBar(frame)
|
||||
|
||||
UF:UpdateNameSettings(frame)
|
||||
|
||||
UF:Configure_Power(frame)
|
||||
|
||||
UF:Configure_Portrait(frame)
|
||||
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_Auras(frame, "Buffs")
|
||||
UF:Configure_Auras(frame, "Debuffs")
|
||||
|
||||
UF:Configure_RaidDebuffs(frame)
|
||||
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
UF:Configure_DebuffHighlight(frame)
|
||||
|
||||
UF:Configure_GPS(frame)
|
||||
|
||||
UF:Configure_Range(frame)
|
||||
|
||||
UF:UpdateAuraWatch(frame)
|
||||
|
||||
UF:Configure_CustomTexts(frame)
|
||||
|
||||
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||
end
|
||||
|
||||
UF.headerstoload.raid40 = true
|
||||
@@ -0,0 +1,145 @@
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule("UnitFrames");
|
||||
|
||||
local ns = oUF
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, "ElvUI was unable to locate oUF.")
|
||||
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
function UF:Construct_RaidpetFrames()
|
||||
self:SetScript("OnEnter", UnitFrame_OnEnter)
|
||||
self:SetScript("OnLeave", UnitFrame_OnLeave)
|
||||
|
||||
self:SetWidth(UF.db.units.raidpet.width)
|
||||
self:SetHeight(UF.db.units.raidpet.height)
|
||||
|
||||
self.RaisedElementParent = CreateFrame("Frame", nil, self)
|
||||
self.RaisedElementParent.TextureParent = CreateFrame("Frame", nil, self.RaisedElementParent)
|
||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||
|
||||
self.Health = UF:Construct_HealthBar(self, true, true, "RIGHT")
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.Portrait3D = UF:Construct_Portrait(self, "model")
|
||||
self.Portrait2D = UF:Construct_Portrait(self, "texture")
|
||||
self.Buffs = UF:Construct_Buffs(self)
|
||||
self.Debuffs = UF:Construct_Debuffs(self)
|
||||
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||
self.DebuffHighlight = UF:Construct_DebuffHighlight(self)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.Range = UF:Construct_Range(self)
|
||||
self.customTexts = {}
|
||||
|
||||
UF:Update_StatusBars()
|
||||
UF:Update_FontStrings()
|
||||
|
||||
self.unitframeType = "raidpet"
|
||||
|
||||
UF:Update_RaidpetFrames(self, UF.db.units.raidpet)
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function UF:RaidPetsSmartVisibility()
|
||||
if not self then self = this end
|
||||
if not self.db or (self.db and not self.db.enable) then return end
|
||||
|
||||
local numMembers = GetNumRaidMembers()
|
||||
if numMembers > 1 then
|
||||
self:Show()
|
||||
else
|
||||
self:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
function UF:Update_RaidpetHeader(header, db)
|
||||
header.db = db
|
||||
|
||||
if not header.positioned then
|
||||
header:ClearAllPoints()
|
||||
E:Point(header, "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 4, 574)
|
||||
|
||||
E:CreateMover(header, header:GetName().."Mover", L["Raid Pet Frames"], nil, nil, nil, "ALL,RAID10,RAID25,RAID40")
|
||||
|
||||
header:RegisterEvent("PLAYER_LOGIN")
|
||||
header:RegisterEvent("ZONE_CHANGED_NEW_AREA")
|
||||
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
|
||||
header:RegisterEvent("RAID_ROSTER_UPDATE")
|
||||
header:SetScript("OnEvent", UF.RaidPetsSmartVisibility)
|
||||
header.positioned = true
|
||||
end
|
||||
|
||||
UF.RaidPetsSmartVisibility(header)
|
||||
end
|
||||
|
||||
function UF:Update_RaidpetFrames(frame, db)
|
||||
frame.db = db
|
||||
|
||||
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
|
||||
frame.colors = ElvUF.colors
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
|
||||
|
||||
do
|
||||
if self.thinBorders then
|
||||
frame.SPACING = 0
|
||||
frame.BORDER = E.mult
|
||||
else
|
||||
frame.BORDER = E.Border
|
||||
frame.SPACING = E.Spacing
|
||||
end
|
||||
frame.SHADOW_SPACING = 3
|
||||
|
||||
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||
|
||||
frame.UNIT_WIDTH = db.width
|
||||
frame.UNIT_HEIGHT = db.height
|
||||
|
||||
frame.USE_POWERBAR = false
|
||||
frame.POWERBAR_DETACHED = false
|
||||
frame.USE_INSET_POWERBAR = false
|
||||
frame.USE_MINI_POWERBAR = false
|
||||
frame.USE_POWERBAR_OFFSET = false
|
||||
frame.POWERBAR_OFFSET = 0
|
||||
frame.POWERBAR_HEIGHT = 0
|
||||
frame.POWERBAR_WIDTH = 0
|
||||
|
||||
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
||||
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == "MIDDLE")
|
||||
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||
|
||||
frame.CLASSBAR_YOFFSET = 0
|
||||
frame.BOTTOM_OFFSET = 0
|
||||
|
||||
frame.VARIABLES_SET = true
|
||||
end
|
||||
|
||||
UF:Configure_HealthBar(frame)
|
||||
|
||||
UF:UpdateNameSettings(frame)
|
||||
|
||||
UF:Configure_Portrait(frame)
|
||||
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_Auras(frame, "Buffs")
|
||||
UF:Configure_Auras(frame, "Debuffs")
|
||||
|
||||
UF:Configure_RaidDebuffs(frame)
|
||||
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
UF:Configure_DebuffHighlight(frame)
|
||||
|
||||
UF:Configure_Range(frame)
|
||||
|
||||
UF:UpdateAuraWatch(frame, true) --2nd argument is the petOverride
|
||||
|
||||
UF:Configure_CustomTexts(frame)
|
||||
|
||||
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||
end
|
||||
|
||||
UF.headerstoload.raidpet = true
|
||||
@@ -794,8 +794,8 @@ function UF:UpdateAllHeaders(event)
|
||||
|
||||
if instanceType == "party" or instanceType == "raid" then
|
||||
ORD:RegisterDebuffs(E.global.unitframe.aurafilters.RaidDebuffs.spells)
|
||||
else
|
||||
ORD:RegisterDebuffs(E.global.unitframe.aurafilters.CCDebuffs.spells)
|
||||
-- else
|
||||
-- ORD:RegisterDebuffs(E.global.unitframe.aurafilters.CCDebuffs.spells)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -809,7 +809,7 @@ function UF:UpdateAllHeaders(event)
|
||||
end
|
||||
UF.headerFunctions[group]:Update(header)
|
||||
|
||||
if group == "party" or group == "raid" then
|
||||
if group == "party" or group == "raid" or group == "raid40" then
|
||||
--Update BuffIndicators on profile change as they might be using profile specific data
|
||||
--self:UpdateAuraWatchFromHeader(group)
|
||||
end
|
||||
@@ -913,8 +913,8 @@ function UF:Initialize()
|
||||
ORD.ShowDispelableDebuff = true
|
||||
ORD.FilterDispellableDebuff = true
|
||||
|
||||
self:UpdateRangeCheckSpells()
|
||||
self:RegisterEvent("LEARNED_SPELL_IN_TAB", "UpdateRangeCheckSpells")
|
||||
-- self:UpdateRangeCheckSpells()
|
||||
-- self:RegisterEvent("LEARNED_SPELL_IN_TAB", "UpdateRangeCheckSpells")
|
||||
end
|
||||
|
||||
function UF:ResetUnitSettings(unit)
|
||||
|
||||
@@ -38,7 +38,6 @@ function UF:Construct_PlayerFrame(frame)
|
||||
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
||||
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
||||
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
|
||||
frame.RaidRoleFramesAnchor = self:Construct_RaidRoleFrames(frame)
|
||||
frame.RestingIndicator = self:Construct_RestingIndicator(frame)
|
||||
frame.CombatIndicator = self:Construct_CombatIndicator(frame)
|
||||
frame.PvPText = self:Construct_PvPIndicator(frame)
|
||||
@@ -137,8 +136,6 @@ function UF:Update_PlayerFrame(frame, db)
|
||||
|
||||
UF:Configure_PVPIcon(frame)
|
||||
|
||||
UF:Configure_RaidRoleIcons(frame)
|
||||
|
||||
UF:Configure_CustomTexts(frame)
|
||||
|
||||
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + db.castbar.height))
|
||||
|
||||
@@ -19,7 +19,6 @@ function UF:Construct_TargetTargetFrame(frame)
|
||||
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
|
||||
frame.Debuffs = self:Construct_Debuffs(frame)
|
||||
frame.Range = self:Construct_Range(frame)
|
||||
-- frame.ThreatIndicator = self:Construct_Threat(frame)
|
||||
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
||||
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
||||
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
||||
@@ -76,8 +75,6 @@ function UF:Update_TargetTargetFrame(frame, db)
|
||||
|
||||
UF:Configure_Portrait(frame)
|
||||
|
||||
-- UF:Configure_Threat(frame)
|
||||
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_Auras(frame, "Buffs")
|
||||
UF:Configure_Auras(frame, "Debuffs")
|
||||
|
||||
@@ -19,7 +19,6 @@ function UF:Construct_TargetTargetTargetFrame(frame)
|
||||
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
|
||||
frame.Debuffs = self:Construct_Debuffs(frame)
|
||||
frame.Range = self:Construct_Range(frame)
|
||||
-- frame.ThreatIndicator = self:Construct_Threat(frame)
|
||||
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
||||
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
||||
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
||||
@@ -76,8 +75,6 @@ function UF:Update_TargetTargetTargetFrame(frame, db)
|
||||
|
||||
UF:Configure_Portrait(frame)
|
||||
|
||||
-- UF:Configure_Threat(frame)
|
||||
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_Auras(frame, "Buffs")
|
||||
UF:Configure_Auras(frame, "Debuffs")
|
||||
|
||||
Reference in New Issue
Block a user