mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
fix #75 Remove AuraBars
Maybe in future will be added, but requires another load of work to add. Other things to tackle at the moment.
This commit is contained in:
+3
-17
@@ -237,7 +237,6 @@ function E:SetupTheme(theme, noDisplayMsg)
|
||||
E.db.unitframe.colors.borderColor = (E.PixelMode and E:GetColor(0, 0, 0) or E:GetColor(.31, .31, .31))
|
||||
E.db.unitframe.colors.healthclass = false
|
||||
E.db.unitframe.colors.health = E:GetColor(.31, .31, .31)
|
||||
E.db.unitframe.colors.auraBarBuff = E:GetColor(.31, .31, .31)
|
||||
E.db.unitframe.colors.castColor = E:GetColor(.31, .31, .31)
|
||||
E.db.unitframe.colors.castClassColor = false
|
||||
elseif theme == "class" then
|
||||
@@ -245,7 +244,6 @@ function E:SetupTheme(theme, noDisplayMsg)
|
||||
E.db.general.backdropcolor = E:GetColor(.1, .1, .1)
|
||||
E.db.general.backdropfadecolor = E:GetColor(.06, .06, .06, .8)
|
||||
E.db.unitframe.colors.borderColor = (E.PixelMode and E:GetColor(0, 0, 0) or E:GetColor(.31, .31, .31))
|
||||
E.db.unitframe.colors.auraBarBuff = E:GetColor(classColor.r, classColor.b, classColor.g)
|
||||
E.db.unitframe.colors.healthclass = true
|
||||
E.db.unitframe.colors.castClassColor = true
|
||||
else
|
||||
@@ -253,7 +251,6 @@ function E:SetupTheme(theme, noDisplayMsg)
|
||||
E.db.general.backdropcolor = E:GetColor(.1, .1, .1)
|
||||
E.db.general.backdropfadecolor = E:GetColor(.054, .054, .054, .8)
|
||||
E.db.unitframe.colors.borderColor = (E.PixelMode and E:GetColor(0, 0, 0) or E:GetColor(.1, .1, .1))
|
||||
E.db.unitframe.colors.auraBarBuff = E:GetColor(.1, .1, .1)
|
||||
E.db.unitframe.colors.healthclass = false
|
||||
E.db.unitframe.colors.health = E:GetColor(.1, .1, .1)
|
||||
E.db.unitframe.colors.castColor = E:GetColor(.1, .1, .1)
|
||||
@@ -643,34 +640,28 @@ local function SetupAuras(style)
|
||||
local frame = UF.player
|
||||
E:CopyTable(E.db.unitframe.units.player.buffs, P.unitframe.units.player.buffs)
|
||||
E:CopyTable(E.db.unitframe.units.player.debuffs, P.unitframe.units.player.debuffs)
|
||||
E:CopyTable(E.db.unitframe.units.player.aurabar, P.unitframe.units.player.aurabar)
|
||||
|
||||
if frame then
|
||||
UF:Configure_Auras(frame, "Buffs")
|
||||
UF:Configure_Auras(frame, "Debuffs")
|
||||
-- UF:Configure_AuraBars(frame)
|
||||
end
|
||||
|
||||
frame = UF.target
|
||||
E:CopyTable(E.db.unitframe.units.target.buffs, P.unitframe.units.target.buffs)
|
||||
E:CopyTable(E.db.unitframe.units.target.debuffs, P.unitframe.units.target.debuffs)
|
||||
E:CopyTable(E.db.unitframe.units.target.aurabar, P.unitframe.units.target.aurabar)
|
||||
|
||||
if frame then
|
||||
UF:Configure_Auras(frame, "Buffs")
|
||||
UF:Configure_Auras(frame, "Debuffs")
|
||||
-- UF:Configure_AuraBars(frame)
|
||||
end
|
||||
|
||||
frame = UF.focus
|
||||
E:CopyTable(E.db.unitframe.units.focus.buffs, P.unitframe.units.focus.buffs)
|
||||
E:CopyTable(E.db.unitframe.units.focus.debuffs, P.unitframe.units.focus.debuffs)
|
||||
E:CopyTable(E.db.unitframe.units.focus.aurabar, P.unitframe.units.focus.aurabar)
|
||||
|
||||
if frame then
|
||||
UF:Configure_Auras(frame, "Buffs")
|
||||
UF:Configure_Auras(frame, "Debuffs")
|
||||
UF:Configure_AuraBars(frame)
|
||||
end
|
||||
|
||||
if not style then
|
||||
@@ -678,14 +669,12 @@ local function SetupAuras(style)
|
||||
E.db.unitframe.units.player.buffs.enable = true
|
||||
E.db.unitframe.units.player.buffs.attachTo = "FRAME"
|
||||
E.db.unitframe.units.player.debuffs.attachTo = "BUFFS"
|
||||
E.db.unitframe.units.player.aurabar.enable = false
|
||||
if E.private.unitframe.enable then
|
||||
E:GetModule("UnitFrames"):CreateAndUpdateUF("player")
|
||||
end
|
||||
|
||||
--TARGET
|
||||
E.db.unitframe.units.target.debuffs.enable = true
|
||||
E.db.unitframe.units.target.aurabar.enable = false
|
||||
if E.private.unitframe.enable then
|
||||
E:GetModule("UnitFrames"):CreateAndUpdateUF("target")
|
||||
end
|
||||
@@ -831,14 +820,11 @@ local function SetPage(PageNum)
|
||||
elseif PageNum == 7 then
|
||||
f.SubTitle:SetText(L["Auras"])
|
||||
f.Desc1:SetText(L["Select the type of aura system you want to use with ElvUI's unitframes. Set to Aura Bar & Icons to use both aura bars and icons, set to icons only to only see icons."])
|
||||
f.Desc2:SetText(L["If you have an icon or aurabar that you don't want to display simply hold down shift and right click the icon for it to disapear."])
|
||||
f.Desc2:SetText(L["If you have an icon that you don't want to display simply hold down shift and right click the icon for it to disapear."])
|
||||
f.Desc3:SetText(L["Importance: |cffD3CF00Medium|r"])
|
||||
InstallOption1Button:Show()
|
||||
InstallOption1Button:SetScript("OnClick", function() --[[SetupAuras(true)--]] end)
|
||||
InstallOption1Button:SetText(L["Aura Bars & Icons"])
|
||||
InstallOption2Button:Show()
|
||||
InstallOption2Button:SetScript("OnClick", function() --[[SetupAuras()--]] end)
|
||||
InstallOption2Button:SetText(L["Icons Only"])
|
||||
InstallOption1Button:SetScript("OnClick", function() SetupAuras() end)
|
||||
InstallOption1Button:SetText(L["Icons Only"])
|
||||
elseif PageNum == 8 then
|
||||
f.SubTitle:SetText(L["Installation Complete"])
|
||||
f.Desc1:SetText(L["You are now finished with the installation process. If you are in need of technical support please visit us at https://github.com/ElvUI-Vanilla/ElvUI"])
|
||||
|
||||
@@ -1,392 +0,0 @@
|
||||
local ns = oUF
|
||||
local oUF = ns.oUF
|
||||
assert(oUF, "oUF_AuraBars was unable to locate oUF install.")
|
||||
|
||||
local format = string.format
|
||||
local floor, huge, min, mod = math.floor, math.huge, math.min, math.mod
|
||||
local tsort, getn = table.sort, table.getn
|
||||
local tremove = table.remove
|
||||
local random = math.random
|
||||
|
||||
local CreateFrame = CreateFrame
|
||||
local UnitAura = UnitAura
|
||||
local UnitIsFriend = UnitIsFriend
|
||||
|
||||
local DAY, HOUR, MINUTE = 86400, 3600, 60
|
||||
local function FormatTime(s)
|
||||
if s < MINUTE then
|
||||
return format("%.1fs", s)
|
||||
elseif s < HOUR then
|
||||
return format("%dm %ds", mod(s/60,60), mod(s,60))
|
||||
elseif s < DAY then
|
||||
return format("%dh %dm", s/(60*60), mod(s/60,60))
|
||||
else
|
||||
return format("%dd %dh", s/DAY, (s / HOUR) - (floor(s/DAY) * 24))
|
||||
end
|
||||
end
|
||||
|
||||
local function UpdateTooltip(self)
|
||||
GameTooltip:SetUnitAura(self.__unit, self:GetParent().aura.name, self:GetParent().aura.rank, self:GetParent().aura.filter)
|
||||
end
|
||||
|
||||
local function OnEnter(self)
|
||||
if(not self:IsVisible()) then return end
|
||||
GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT")
|
||||
self:UpdateTooltip()
|
||||
end
|
||||
|
||||
local function OnLeave(self)
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
|
||||
local function SetAnchors(self)
|
||||
local bars = self.bars
|
||||
|
||||
for index = 1, getn(bars) do
|
||||
local frame = bars[index]
|
||||
local anchor = frame.anchor
|
||||
frame:SetHeight(self.auraBarHeight or 20)
|
||||
frame.statusBar.iconHolder:SetWidth(frame:GetHeight())
|
||||
frame.statusBar.iconHolder:SetHeight(frame:GetHeight())
|
||||
frame:SetWidth((self.auraBarWidth or self:GetWidth()) - (frame:GetHeight() + (self.gap or 0)))
|
||||
frame:ClearAllPoints()
|
||||
if self.down == true then
|
||||
if self == anchor then -- Root frame so indent for icon
|
||||
frame:SetPoint("TOPLEFT", anchor, "TOPLEFT", (frame:GetHeight() + (self.gap or 0) ), -1)
|
||||
else
|
||||
frame:SetPoint("TOPLEFT", anchor, "BOTTOMLEFT", 0, (-self.spacing or 0))
|
||||
end
|
||||
else
|
||||
if self == anchor then -- Root frame so indent for icon
|
||||
frame:SetPoint("BOTTOMLEFT", anchor, "BOTTOMLEFT", (frame:GetHeight() + (self.gap or 0)), 1)
|
||||
else
|
||||
frame:SetPoint("BOTTOMLEFT", anchor, "TOPLEFT", 0, (self.spacing or 0))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function CreateAuraBar(oUF, anchor)
|
||||
local auraBarParent = oUF.AuraBars
|
||||
|
||||
local frame = CreateFrame("Frame", nil, auraBarParent)
|
||||
frame:SetHeight(auraBarParent.auraBarHeight or 20)
|
||||
frame:SetWidth((auraBarParent.auraBarWidth or auraBarParent:GetWidth()) - (frame:GetHeight() + (auraBarParent.gap or 0)))
|
||||
frame.anchor = anchor
|
||||
|
||||
-- the main bar
|
||||
local statusBar = CreateFrame("StatusBar", nil, frame)
|
||||
statusBar:SetStatusBarTexture(auraBarParent.auraBarTexture or [[Interface\TargetingFrame\UI-StatusBar]])
|
||||
statusBar:SetAlpha(auraBarParent.fgalpha or 1)
|
||||
statusBar:SetAllPoints(frame)
|
||||
|
||||
frame.statusBar = statusBar
|
||||
|
||||
if auraBarParent.down == true then
|
||||
if auraBarParent == anchor then -- Root frame so indent for icon
|
||||
frame:SetPoint("TOPLEFT", anchor, "TOPLEFT", (frame:GetHeight() + (auraBarParent.gap or 0) ), -1)
|
||||
else
|
||||
frame:SetPoint("TOPLEFT", anchor, "BOTTOMLEFT", 0, (-auraBarParent.spacing or 0))
|
||||
end
|
||||
else
|
||||
if auraBarParent == anchor then -- Root frame so indent for icon
|
||||
frame:SetPoint("BOTTOMLEFT", anchor, "BOTTOMLEFT", (frame:GetHeight() + (auraBarParent.gap or 0)), 1)
|
||||
else
|
||||
frame:SetPoint("BOTTOMLEFT", anchor, "TOPLEFT", 0, (auraBarParent.spacing or 0))
|
||||
end
|
||||
end
|
||||
|
||||
local spark = statusBar:CreateTexture(nil, "OVERLAY", nil)
|
||||
spark:SetTexture([[Interface\CastingBar\UI-CastingBar-Spark]])
|
||||
spark:SetWidth(12)
|
||||
spark:SetBlendMode("ADD")
|
||||
spark:SetPoint("CENTER", statusBar:GetStatusBarTexture(), "RIGHT")
|
||||
statusBar.spark = spark
|
||||
|
||||
statusBar.iconHolder = CreateFrame("Button", nil, statusBar)
|
||||
statusBar.iconHolder:SetHeight(frame:GetHeight())
|
||||
statusBar.iconHolder:SetWidth(frame:GetHeight())
|
||||
statusBar.iconHolder:SetPoint("BOTTOMRIGHT", frame, "BOTTOMLEFT", -auraBarParent.gap, 0)
|
||||
statusBar.iconHolder.__unit = oUF.unit
|
||||
statusBar.iconHolder:SetScript("OnEnter", OnEnter)
|
||||
statusBar.iconHolder:SetScript("OnLeave", OnLeave)
|
||||
statusBar.iconHolder.UpdateTooltip = UpdateTooltip
|
||||
|
||||
statusBar.icon = statusBar.iconHolder:CreateTexture(nil, "BACKGROUND")
|
||||
statusBar.icon:SetTexCoord(.07, .93, .07, .93)
|
||||
statusBar.icon:SetAllPoints()
|
||||
|
||||
statusBar.spelltime = statusBar:CreateFontString(nil, "ARTWORK")
|
||||
if auraBarParent.spellTimeObject then
|
||||
statusBar.spelltime:SetFontObject(auraBarParent.spellTimeObject)
|
||||
else
|
||||
statusBar.spelltime:SetFont(auraBarParent.spellTimeFont or [[Fonts\FRIZQT__.TTF]], auraBarParent.spellTimeSize or 10)
|
||||
end
|
||||
statusBar.spelltime:SetTextColor(1, 1, 1)
|
||||
statusBar.spelltime:SetJustifyH("RIGHT")
|
||||
statusBar.spelltime:SetJustifyV("CENTER")
|
||||
statusBar.spelltime:SetPoint("RIGHT", 0, 0)
|
||||
|
||||
statusBar.spellname = statusBar:CreateFontString(nil, "ARTWORK")
|
||||
if auraBarParent.spellNameObject then
|
||||
statusBar.spellname:SetFontObject(auraBarParent.spellNameObject)
|
||||
else
|
||||
statusBar.spellname:SetFont(auraBarParent.spellNameFont or [[Fonts\FRIZQT__.TTF]], auraBarParent.spellNameSize or 10)
|
||||
end
|
||||
statusBar.spellname:SetTextColor(1, 1, 1)
|
||||
statusBar.spellname:SetJustifyH("LEFT")
|
||||
statusBar.spellname:SetJustifyV("CENTER")
|
||||
statusBar.spellname:SetPoint("LEFT", 0, 0)
|
||||
statusBar.spellname:SetPoint("RIGHT", statusBar.spelltime, "LEFT")
|
||||
|
||||
if auraBarParent.PostCreateBar then
|
||||
auraBarParent.PostCreateBar(frame)
|
||||
end
|
||||
|
||||
return frame
|
||||
end
|
||||
|
||||
local function UpdateBars(auraBars)
|
||||
local bars = auraBars.bars
|
||||
local timenow = GetTime()
|
||||
|
||||
for index = 1, getn(bars) do
|
||||
local frame = bars[index]
|
||||
local bar = frame.statusBar
|
||||
if not frame:IsVisible() then
|
||||
break
|
||||
end
|
||||
if bar.aura.noTime then
|
||||
bar.spelltime:SetText()
|
||||
bar.spark:Hide()
|
||||
else
|
||||
local timeleft = bar.aura.expirationTime - timenow
|
||||
bar:SetValue(timeleft)
|
||||
bar.spelltime:SetText(FormatTime(timeleft))
|
||||
if auraBars.spark == true then
|
||||
if (auraBars.scaleTime and ((auraBars.scaleTime <= 0) or (auraBars.scaleTime > 0 and timeleft < auraBars.scaleTime))) then
|
||||
bar.spark:Show()
|
||||
else
|
||||
bar.spark:Hide()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function DefaultFilter(self, unit, name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate)
|
||||
if unitCaster == "player" and not shouldConsolidate then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local sort = function(a, b)
|
||||
local compa, compb = a.noTime and huge or a.expirationTime, b.noTime and huge or b.expirationTime
|
||||
return compa > compb
|
||||
end
|
||||
|
||||
local function Update(self, event, unit)
|
||||
if self.unit ~= unit then return end
|
||||
local auraBars = self.AuraBars
|
||||
local helpOrHarm
|
||||
local isFriend = UnitIsFriend("player", unit) == 1 and true or false
|
||||
local both = false
|
||||
|
||||
if auraBars.friendlyAuraType and auraBars.enemyAuraType then
|
||||
if isFriend then
|
||||
helpOrHarm = auraBars.friendlyAuraType
|
||||
else
|
||||
helpOrHarm = auraBars.enemyAuraType
|
||||
end
|
||||
else
|
||||
helpOrHarm = isFriend and "HELPFUL" or "HARMFUL"
|
||||
end
|
||||
|
||||
if helpOrHarm == "BOTH" then
|
||||
both = true
|
||||
helpOrHarm = "HELPFUL"
|
||||
end
|
||||
|
||||
-- Create a table of auras to display
|
||||
local auras = {}
|
||||
local lastAuraIndex = 0
|
||||
local counter = 0
|
||||
if auraBars.forceShow then
|
||||
for index = 1, auraBars.maxBars do
|
||||
local spellID = 47540
|
||||
local name, rank, icon = GetSpellInfo(spellID)
|
||||
local count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate = 5, "Magic", 0, 0, "player", nil, nil
|
||||
lastAuraIndex = lastAuraIndex + 1
|
||||
auras[lastAuraIndex] = {}
|
||||
auras[lastAuraIndex].spellID = spellID
|
||||
auras[lastAuraIndex].name = name
|
||||
auras[lastAuraIndex].rank = rank
|
||||
auras[lastAuraIndex].icon = icon
|
||||
auras[lastAuraIndex].count = count
|
||||
auras[lastAuraIndex].debuffType = debuffType
|
||||
auras[lastAuraIndex].duration = duration
|
||||
auras[lastAuraIndex].expirationTime = expirationTime
|
||||
auras[lastAuraIndex].unitCaster = unitCaster
|
||||
auras[lastAuraIndex].isStealable = isStealable
|
||||
auras[lastAuraIndex].noTime = (duration == 0 and expirationTime == 0)
|
||||
auras[lastAuraIndex].filter = helpOrHarm
|
||||
auras[lastAuraIndex].shouldConsolidate = shouldConsolidate
|
||||
end
|
||||
else
|
||||
for index = 1, 40 do
|
||||
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellID
|
||||
|
||||
if not both then
|
||||
name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellID = UnitAura(unit, index, helpOrHarm)
|
||||
|
||||
if not name then break end
|
||||
else
|
||||
name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellID = UnitAura(unit, index, "HELPFUL")
|
||||
|
||||
if not name then
|
||||
name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellID = UnitAura(unit, index, "HARMFUL")
|
||||
|
||||
if not name then break end
|
||||
end
|
||||
end
|
||||
|
||||
if (auraBars.filter or DefaultFilter)(self, unit, name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellID) then
|
||||
lastAuraIndex = lastAuraIndex + 1
|
||||
auras[lastAuraIndex] = {}
|
||||
auras[lastAuraIndex].spellID = spellID
|
||||
auras[lastAuraIndex].name = name
|
||||
auras[lastAuraIndex].rank = rank
|
||||
auras[lastAuraIndex].icon = icon
|
||||
auras[lastAuraIndex].count = count
|
||||
auras[lastAuraIndex].debuffType = debuffType
|
||||
auras[lastAuraIndex].duration = duration
|
||||
auras[lastAuraIndex].expirationTime = expirationTime
|
||||
auras[lastAuraIndex].unitCaster = unitCaster
|
||||
auras[lastAuraIndex].isStealable = isStealable
|
||||
auras[lastAuraIndex].noTime = (duration == 0 and expirationTime == 0)
|
||||
auras[lastAuraIndex].filter = helpOrHarm
|
||||
auras[lastAuraIndex].shouldConsolidate = shouldConsolidate
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if auraBars.sort and not auraBars.forceShow then
|
||||
tsort(auras, type(auraBars.sort) == "function" and auraBars.sort or sort)
|
||||
end
|
||||
|
||||
for i=1, getn(auras) do
|
||||
if i > auraBars.maxBars then
|
||||
tremove(auras, i)
|
||||
else
|
||||
lastAuraIndex = i
|
||||
end
|
||||
end
|
||||
|
||||
-- Show and configure bars for buffs/debuffs.
|
||||
local bars = auraBars.bars
|
||||
if lastAuraIndex == 0 then
|
||||
self.AuraBars:SetHeight(1)
|
||||
end
|
||||
|
||||
for index = 1 , lastAuraIndex do
|
||||
-- if auraBars:GetWidth() == 0 then break end
|
||||
local aura = auras[index]
|
||||
local frame = bars[index]
|
||||
|
||||
if not frame then
|
||||
frame = CreateAuraBar(self, index == 1 and auraBars or bars[index - 1])
|
||||
bars[index] = frame
|
||||
end
|
||||
|
||||
if index == lastAuraIndex then
|
||||
if self.AuraBars.down then
|
||||
self.AuraBars:SetHeight(self.AuraBars:GetTop() - frame:GetBottom())
|
||||
elseif frame:GetTop() and self.AuraBars:GetBottom() then
|
||||
self.AuraBars:SetHeight(frame:GetTop() - self.AuraBars:GetBottom())
|
||||
else
|
||||
self.AuraBars:SetHeight(20)
|
||||
end
|
||||
end
|
||||
|
||||
local bar = frame.statusBar
|
||||
frame.index = index
|
||||
|
||||
-- Backup the details of the aura onto the bar, so the OnUpdate function can use it
|
||||
bar.aura = aura
|
||||
|
||||
-- Configure
|
||||
if bar.aura.noTime then
|
||||
bar:SetMinMaxValues(0, 1)
|
||||
bar:SetValue(1)
|
||||
else
|
||||
if auraBars.scaleTime and auraBars.scaleTime > 0 then
|
||||
local maxvalue = min(auraBars.scaleTime, bar.aura.duration)
|
||||
bar:SetMinMaxValues(0, auraBars.scaleTime)
|
||||
bar:SetWidth(
|
||||
( maxvalue / auraBars.scaleTime ) *
|
||||
( ( auraBars.auraBarWidth or auraBars:GetWidth() ) -
|
||||
( bar:GetHeight() + (auraBars.gap or 0) ) ) ) -- icon size + gap
|
||||
else
|
||||
bar:SetMinMaxValues(0, bar.aura.duration)
|
||||
end
|
||||
bar:SetValue(bar.aura.expirationTime - GetTime())
|
||||
end
|
||||
|
||||
bar.icon:SetTexture(bar.aura.icon)
|
||||
|
||||
-- bar.spellname:SetText(bar.aura.count > 1 and format("%s [%d]", bar.aura.name, bar.aura.count) or bar.aura.name)
|
||||
bar.spelltime:SetText(not bar.noTime and FormatTime(bar.aura.expirationTime-GetTime()))
|
||||
|
||||
-- Colour bars
|
||||
local r, g, b = .2, .6, 1 -- Colour for buffs
|
||||
if auraBars.buffColor then
|
||||
r, g, b = unpack(auraBars.buffColor)
|
||||
end
|
||||
|
||||
if helpOrHarm == "HARMFUL" then
|
||||
local debuffType = bar.aura.debuffType and bar.aura.debuffType or "none"
|
||||
|
||||
r, g, b = DebuffTypeColor[debuffType].r, DebuffTypeColor[debuffType].g, DebuffTypeColor[debuffType].b
|
||||
if auraBars.debuffColor then
|
||||
r, g, b = unpack(auraBars.debuffColor)
|
||||
else
|
||||
if debuffType == "none" and auraBars.defaultDebuffColor then
|
||||
r, g, b = unpack(auraBars.defaultDebuffColor)
|
||||
end
|
||||
end
|
||||
end
|
||||
bar:SetStatusBarColor(r, g, b)
|
||||
frame:Show()
|
||||
end
|
||||
|
||||
-- Hide unused bars.
|
||||
for index = lastAuraIndex + 1, getn(bars) do
|
||||
bars[index]:Hide()
|
||||
end
|
||||
|
||||
if auraBars.PostUpdate then
|
||||
auraBars:PostUpdate(event, unit)
|
||||
end
|
||||
end
|
||||
|
||||
local function Enable(self)
|
||||
if self.AuraBars then
|
||||
self:RegisterEvent("PLAYER_AURAS_CHANGED", Update)
|
||||
self.AuraBars:SetHeight(1)
|
||||
self.AuraBars.bars = self.AuraBars.bars or {}
|
||||
self.AuraBars.SetAnchors = SetAnchors
|
||||
self.AuraBars:SetScript("OnUpdate", function() UpdateBars(self.AuraBars) end)
|
||||
self.AuraBars.maxBars = self.AuraBars.maxBars or 40
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local function Disable(self)
|
||||
local auraFrame = self.AuraBars
|
||||
if auraFrame then
|
||||
self:UnregisterEvent("PLAYER_AURAS_CHANGED", Update)
|
||||
auraFrame:SetScript("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
|
||||
oUF:AddElement("AuraBars", Update, Enable, Disable)
|
||||
@@ -1,3 +0,0 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||
<Script file="oUF_AuraBars.lua"/>
|
||||
</Ui>
|
||||
@@ -1,5 +1,4 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||
<Include file="oUF_AuraBars\oUF_AuraBars.xml"/>
|
||||
<Include file="oUF_Smooth\oUF_Smooth.xml"/>
|
||||
<Include file="oUF_GPS\oUF_GPS.xml"/>
|
||||
</Ui>
|
||||
@@ -143,7 +143,7 @@ L["Healer"] = "治疗"
|
||||
L["High Resolution"] = "高分辨率"
|
||||
L["high"] = "高"
|
||||
L["Icons Only"] = "图标"
|
||||
L["If you have an icon or aurabar that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "如果你有不想显示的图标或光环条, 你可以简单的通过按住Shift右键点击使它隐藏."
|
||||
L["If you have an icon that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "如果你有不想显示的图标或光环条, 你可以简单的通过按住Shift右键点击使它隐藏."
|
||||
L["Importance: |cff07D400High|r"] = "重要度: |cff07D400高|r"
|
||||
L["Importance: |cffD3CF00Medium|r"] = "重要性: |cffD3CF00中|r"
|
||||
L["Importance: |cffFF0000Low|r"] = "重要性:|cffFF0000低|r"
|
||||
|
||||
@@ -143,7 +143,7 @@ L["Healer"] = true;
|
||||
L["High Resolution"] = true;
|
||||
L["high"] = true;
|
||||
L["Icons Only"] = true; --Also used in Bags
|
||||
L["If you have an icon or aurabar that you don't want to display simply hold down shift and right click the icon for it to disapear."] = true;
|
||||
L["If you have an icon that you don't want to display simply hold down shift and right click the icon for it to disapear."] = true;
|
||||
L["Importance: |cff07D400High|r"] = true;
|
||||
L["Importance: |cffD3CF00Medium|r"] = true;
|
||||
L["Importance: |cffFF0000Low|r"] = true;
|
||||
|
||||
@@ -143,7 +143,7 @@ L["Healer"] = "Soigneur"
|
||||
L["High Resolution"] = "Haute Résolution"
|
||||
L["high"] = "Haute"
|
||||
L["Icons Only"] = "Icônes seulement" --Also used in Bags
|
||||
L["If you have an icon or aurabar that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "Si vous avez une icône ou une barre d'aura que vous ne souhaitez pas afficher il suffit de maintenir la touche MAJ enfoncée et d'effectuer un clic droit sur l'icône correspondante pour la faire disparaitre."
|
||||
L["If you have an icon that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "Si vous avez une icône ou une barre d'aura que vous ne souhaitez pas afficher il suffit de maintenir la touche MAJ enfoncée et d'effectuer un clic droit sur l'icône correspondante pour la faire disparaitre."
|
||||
L["Importance: |cff07D400High|r"] = "Importance: |cff07D400Haute|r"
|
||||
L["Importance: |cffD3CF00Medium|r"] = "Importance: |cffD3CF00Moyenne|r"
|
||||
L["Importance: |cffFF0000Low|r"] = "Importance: |cffFF0000Faible|r"
|
||||
|
||||
@@ -143,7 +143,7 @@ L["Healer"] = "Heiler"
|
||||
L["High Resolution"] = "Hohe Auflösung"
|
||||
L["high"] = "hoch"
|
||||
L["Icons Only"] = "Nur Symbole" --Also used in Bags
|
||||
L["If you have an icon or aurabar that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "Wenn du ein Symbol oder eine Aurenleiste nicht angezeigt haben möchtest, dann halte Shift gedrückt und klicke mit Rechtsklick auf das Symbol um es auszublenden."
|
||||
L["If you have an icon that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "Wenn du ein Symbol oder eine Aurenleiste nicht angezeigt haben möchtest, dann halte Shift gedrückt und klicke mit Rechtsklick auf das Symbol um es auszublenden."
|
||||
L["Importance: |cff07D400High|r"] = "Bedeutung: |cff07D400Hoch|r"
|
||||
L["Importance: |cffD3CF00Medium|r"] = "Bedeutung: |cffD3CF00Mittel|r"
|
||||
L["Importance: |cffFF0000Low|r"] = "Bedeutung: |cffD3CF00Niedrig|r"
|
||||
|
||||
@@ -143,7 +143,7 @@ L["Healer"] = "힐러"
|
||||
L["High Resolution"] = "고해상도 세팅"
|
||||
L["high"] = "고"
|
||||
L["Icons Only"] = "아이콘만 표시"
|
||||
L["If you have an icon or aurabar that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "표시하고 싶지 않은 버프/디버프가 보이면 아이콘을 Shift 우클릭하세요. 차단 목록에 등록되어 보이지 않게 됩니다."
|
||||
L["If you have an icon that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "표시하고 싶지 않은 버프/디버프가 보이면 아이콘을 Shift 우클릭하세요. 차단 목록에 등록되어 보이지 않게 됩니다."
|
||||
L["Importance: |cff07D400High|r"] = "중요도: |cff07D400높음|r"
|
||||
L["Importance: |cffD3CF00Medium|r"] = "중요도: |cffD3CF00보통|r"
|
||||
L["Importance: |cffFF0000Low|r"] = "중요도 : |cffFF0000낮음|r"
|
||||
|
||||
@@ -143,7 +143,7 @@ L["Healer"] = "Curandeiro"
|
||||
L["High Resolution"] = "Alta Resolução"
|
||||
L["high"] = "alto"
|
||||
L["Icons Only"] = "Apenas Ícones"
|
||||
L["If you have an icon or aurabar that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "Se existir um ícone ou uma barra de aura que você não queira ver exibida simplesmente mantenha pressionada a tecla Shift e clique no ícone com o botão direito para que o ícone/barra de aura desapareça."
|
||||
L["If you have an icon that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "Se existir um ícone ou uma barra de aura que você não queira ver exibida simplesmente mantenha pressionada a tecla Shift e clique no ícone com o botão direito para que o ícone/barra de aura desapareça."
|
||||
L["Importance: |cff07D400High|r"] = "Importância: |cff07D400Alta|r"
|
||||
L["Importance: |cffD3CF00Medium|r"] = "Importância: |cffD3CF00Média|r"
|
||||
L["Importance: |cffFF0000Low|r"] = "Importância: |cffFF0000Baixa|r"
|
||||
|
||||
@@ -143,7 +143,7 @@ L["Healer"] = "Лекарь"
|
||||
L["High Resolution"] = "Высокое разрешение"
|
||||
L["high"] = "высоким"
|
||||
L["Icons Only"] = "Только иконки" --Also used in Bags
|
||||
L["If you have an icon or aurabar that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "Если Вы видите иконку или полосу аур, которую Вы не хотите отображать, просто зажмите shift и кликните на иконке правой кнопкой, чтобы она исчезла."
|
||||
L["If you have an icon that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "Если Вы видите иконку или полосу аур, которую Вы не хотите отображать, просто зажмите shift и кликните на иконке правой кнопкой, чтобы она исчезла."
|
||||
L["Importance: |cff07D400High|r"] = "Важность: |cff07D400Высокая|r"
|
||||
L["Importance: |cffD3CF00Medium|r"] = "Важность: |cffD3CF00Средняя|r"
|
||||
L["Importance: |cffFF0000Low|r"] = "Важность: |cffFF0000Низкая|r"
|
||||
|
||||
@@ -143,7 +143,7 @@ L["Healer"] = "Sanador"
|
||||
L["High Resolution"] = "Alta Resolución"
|
||||
L["high"] = "alta"
|
||||
L["Icons Only"] = "Sólo Iconos"
|
||||
L["If you have an icon or aurabar that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "Si tienes un icono o una barra de aura que no quieres ver simplemente mantén pulsado la tecla Shift y haz clic con el botón izquierdo del ratón en el icono para que desaparezca."
|
||||
L["If you have an icon that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "Si tienes un icono o una barra de aura que no quieres ver simplemente mantén pulsado la tecla Shift y haz clic con el botón izquierdo del ratón en el icono para que desaparezca."
|
||||
L["Importance: |cff07D400High|r"] = "Importancia: |cff07D400Alta|r"
|
||||
L["Importance: |cffD3CF00Medium|r"] = "Importancia: |cffD3CF00Media|r"
|
||||
L["Importance: |cffFF0000Low|r"] = "Importancia: |cffFF0000Baja|r"
|
||||
|
||||
@@ -143,7 +143,7 @@ L["Healer"] = "補師"
|
||||
L["High Resolution"] = "高解析度"
|
||||
L["high"] = "高"
|
||||
L["Icons Only"] = "圖示" --Also used in Bags
|
||||
L["If you have an icon or aurabar that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "如果你有不想顯示的圖示或光環條, 你可以簡單的通過按住Shift + 右鍵點擊使它隱藏."
|
||||
L["If you have an icon that you don't want to display simply hold down shift and right click the icon for it to disapear."] = "如果你有不想顯示的圖示或光環條, 你可以簡單的通過按住Shift + 右鍵點擊使它隱藏."
|
||||
L["Importance: |cff07D400High|r"] = "重要性: |cff07D400高|r"
|
||||
L["Importance: |cffD3CF00Medium|r"] = "重要性: |cffD3CF00中|r"
|
||||
L["Importance: |cffFF0000Low|r"] = "重要性: |cffFF0000低|r"
|
||||
|
||||
@@ -1,287 +0,0 @@
|
||||
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 match = string.match
|
||||
local strsplit = strsplit
|
||||
local tostring = tostring
|
||||
local format = format
|
||||
local getn = table.getn
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
local IsShiftKeyDown = IsShiftKeyDown
|
||||
local IsAltKeyDown = IsAltKeyDown
|
||||
local IsControlKeyDown = IsControlKeyDown
|
||||
local UnitIsFriend = UnitIsFriend
|
||||
local UnitIsUnit = UnitIsUnit
|
||||
local UnitCanAttack = UnitCanAttack
|
||||
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
||||
|
||||
function UF:Construct_AuraBars()
|
||||
local bar = self.statusBar
|
||||
|
||||
E:SetTemplate(self, "Default", nil, nil, UF.thinBorders, true)
|
||||
local inset = UF.thinBorders and E.mult or nil
|
||||
E:SetInside(bar, self, inset, inset)
|
||||
UF.statusbars[bar] = true
|
||||
UF:Update_StatusBar(bar)
|
||||
|
||||
UF:Configure_FontString(bar.spelltime)
|
||||
UF:Configure_FontString(bar.spellname)
|
||||
UF:Update_FontString(bar.spelltime)
|
||||
UF:Update_FontString(bar.spellname)
|
||||
|
||||
bar.spellname:ClearAllPoints()
|
||||
E:Point(bar.spellname, "LEFT", bar, "LEFT", 2, 0)
|
||||
E:Point(bar.spellname, "RIGHT", bar.spelltime, "LEFT", -4, 0)
|
||||
-- bar.spellname:SetWordWrap(false)
|
||||
|
||||
E:SetTemplate(bar.iconHolder, "Default", nil, nil, UF.thinBorders, true)
|
||||
E:SetInside(bar.icon, bar.iconHolder, inset, inset)
|
||||
bar.icon:SetDrawLayer("OVERLAY")
|
||||
|
||||
bar.bg = bar:CreateTexture(nil, "BORDER")
|
||||
bar.bg:Hide()
|
||||
|
||||
bar.iconHolder:RegisterForClicks("RightButtonUp")
|
||||
bar.iconHolder:SetScript("OnClick", function(self)
|
||||
if E.db.unitframe.auraBlacklistModifier == "NONE" or not ((E.db.unitframe.auraBlacklistModifier == "SHIFT" and IsShiftKeyDown()) or (E.db.unitframe.auraBlacklistModifier == "ALT" and IsAltKeyDown()) or (E.db.unitframe.auraBlacklistModifier == "CTRL" and IsControlKeyDown())) then return; end
|
||||
local auraName = self:GetParent().aura.name
|
||||
|
||||
if auraName then
|
||||
E:Print(format(L["The spell '%s' has been added to the Blacklist unitframe aura filter."], auraName))
|
||||
E.global["unitframe"]["aurafilters"]["Blacklist"]["spells"][auraName] = {
|
||||
["enable"] = true,
|
||||
["priority"] = 0,
|
||||
}
|
||||
UF:Update_AllFrames()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function UF:Construct_AuraBarHeader(frame)
|
||||
local auraBar = CreateFrame("Frame", nil, frame)
|
||||
auraBar:SetFrameLevel(frame.RaisedElementParent:GetFrameLevel() + 10) --Make them appear above any text element
|
||||
auraBar.PostCreateBar = UF.Construct_AuraBars
|
||||
auraBar.gap = (-frame.BORDER + frame.SPACING*3)
|
||||
auraBar.spacing = (-frame.BORDER + frame.SPACING*3)
|
||||
auraBar.spark = true
|
||||
auraBar.filter = UF.AuraBarFilter
|
||||
auraBar.PostUpdate = UF.ColorizeAuraBars
|
||||
|
||||
return auraBar
|
||||
end
|
||||
|
||||
function UF:Configure_AuraBars(frame)
|
||||
if not frame.VARIABLES_SET then return end
|
||||
local auraBars = frame.AuraBars
|
||||
local db = frame.db
|
||||
if db.aurabar.enable then
|
||||
if not frame:IsElementEnabled("AuraBars") then
|
||||
frame:EnableElement("AuraBars")
|
||||
end
|
||||
auraBars:Show()
|
||||
auraBars.friendlyAuraType = db.aurabar.friendlyAuraType
|
||||
auraBars.enemyAuraType = db.aurabar.enemyAuraType
|
||||
auraBars.scaleTime = db.aurabar.uniformThreshold
|
||||
|
||||
local buffColor = self.db.colors.auraBarBuff
|
||||
local debuffColor = self.db.colors.auraBarDebuff
|
||||
local attachTo = frame
|
||||
|
||||
if E:CheckClassColor(buffColor.r, buffColor.g, buffColor.b) then
|
||||
buffColor = E.myclass == "PRIEST" and E.PriestColors or (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[E.myclass] or RAID_CLASS_COLORS[E.myclass])
|
||||
end
|
||||
|
||||
if E:CheckClassColor(debuffColor.r, debuffColor.g, debuffColor.b) then
|
||||
debuffColor = E.myclass == "PRIEST" and E.PriestColors or (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[E.myclass] or RAID_CLASS_COLORS[E.myclass])
|
||||
end
|
||||
|
||||
if db.aurabar.attachTo == "BUFFS" then
|
||||
attachTo = frame.Buffs
|
||||
elseif db.aurabar.attachTo == "DEBUFFS" then
|
||||
attachTo = frame.Debuffs
|
||||
elseif db.aurabar.attachTo == "PLAYER_AURABARS" and ElvUF_Player then
|
||||
attachTo = ElvUF_Player.AuraBars
|
||||
end
|
||||
|
||||
local anchorPoint, anchorTo = "BOTTOM", "TOP"
|
||||
if db.aurabar.anchorPoint == "BELOW" then
|
||||
anchorPoint, anchorTo = "TOP", "BOTTOM"
|
||||
end
|
||||
|
||||
local yOffset
|
||||
local spacing = (((db.aurabar.attachTo == "FRAME" and 3) or (db.aurabar.attachTo == "PLAYER_AURABARS" and 4) or 2) * frame.SPACING)
|
||||
local border = (((db.aurabar.attachTo == "FRAME" or db.aurabar.attachTo == "PLAYER_AURABARS") and 2 or 1) * frame.BORDER)
|
||||
|
||||
if db.aurabar.anchorPoint == "BELOW" then
|
||||
yOffset = -spacing + border - (not db.aurabar.yOffset and 0 or db.aurabar.yOffset)
|
||||
else
|
||||
yOffset = spacing - border + (not db.aurabar.yOffset and 0 or db.aurabar.yOffset)
|
||||
end
|
||||
|
||||
local xOffset = (db.aurabar.attachTo == "FRAME" and frame.SPACING or 0)
|
||||
local offsetLeft = xOffset + ((db.aurabar.attachTo == "FRAME" and ((anchorTo == "TOP" and frame.ORIENTATION ~= "LEFT") or (anchorTo == "BOTTOM" and frame.ORIENTATION == "LEFT"))) and frame.POWERBAR_OFFSET or 0)
|
||||
local offsetRight = -xOffset - ((db.aurabar.attachTo == "FRAME" and ((anchorTo == "TOP" and frame.ORIENTATION ~= "RIGHT") or (anchorTo == "BOTTOM" and frame.ORIENTATION == "RIGHT"))) and frame.POWERBAR_OFFSET or 0)
|
||||
|
||||
auraBars.auraBarHeight = db.aurabar.height
|
||||
auraBars:ClearAllPoints()
|
||||
E:Point(auraBars, anchorPoint.."LEFT", attachTo, anchorTo.."LEFT", offsetLeft, yOffset)
|
||||
E:Point(auraBars, anchorPoint.."RIGHT", attachTo, anchorTo.."RIGHT", offsetRight, yOffset)
|
||||
auraBars.buffColor = {buffColor.r, buffColor.g, buffColor.b}
|
||||
if UF.db.colors.auraBarByType then
|
||||
auraBars.debuffColor = nil;
|
||||
auraBars.defaultDebuffColor = {debuffColor.r, debuffColor.g, debuffColor.b}
|
||||
else
|
||||
auraBars.debuffColor = {debuffColor.r, debuffColor.g, debuffColor.b}
|
||||
auraBars.defaultDebuffColor = nil;
|
||||
end
|
||||
auraBars.down = db.aurabar.anchorPoint == "BELOW"
|
||||
|
||||
if db.aurabar.sort == "TIME_REMAINING" then
|
||||
auraBars.sort = true --default function
|
||||
elseif db.aurabar.sort == "TIME_REMAINING_REVERSE" then
|
||||
auraBars.sort = self.SortAuraBarReverse
|
||||
elseif db.aurabar.sort == "TIME_DURATION" then
|
||||
auraBars.sort = self.SortAuraBarDuration
|
||||
elseif db.aurabar.sort == "TIME_DURATION_REVERSE" then
|
||||
auraBars.sort = self.SortAuraBarDurationReverse
|
||||
elseif db.aurabar.sort == "NAME" then
|
||||
auraBars.sort = self.SortAuraBarName
|
||||
else
|
||||
auraBars.sort = nil
|
||||
end
|
||||
|
||||
auraBars.maxBars = db.aurabar.maxBars
|
||||
auraBars.forceShow = frame.forceShowAuras
|
||||
-- auraBars:SetAnchors()
|
||||
else
|
||||
if frame:IsElementEnabled("AuraBars") then
|
||||
frame:DisableElement("AuraBars")
|
||||
auraBars:Hide()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local huge = math.huge
|
||||
function UF.SortAuraBarReverse(a, b)
|
||||
local compa, compb = a.noTime and huge or a.expirationTime, b.noTime and huge or b.expirationTime
|
||||
return compa < compb
|
||||
end
|
||||
|
||||
function UF.SortAuraBarDuration(a, b)
|
||||
local compa, compb = a.noTime and huge or a.duration, b.noTime and huge or b.duration
|
||||
return compa > compb
|
||||
end
|
||||
|
||||
function UF.SortAuraBarDurationReverse(a, b)
|
||||
local compa, compb = a.noTime and huge or a.duration, b.noTime and huge or b.duration
|
||||
return compa < compb
|
||||
end
|
||||
|
||||
function UF.SortAuraBarName(a, b)
|
||||
return a.name > b.name
|
||||
end
|
||||
|
||||
function UF:CheckFilter(name, caster, spellID, isFriend, isPlayer, isUnit, allowDuration, noDuration, canDispell, ...)
|
||||
-- local friendCheck, filterName, filter, filterType, spellList, spell
|
||||
-- for i=1, select("#", ...) do
|
||||
-- filterName = select(i, ...)
|
||||
-- friendCheck = (isFriend and match(filterName, "^Friendly:([^,]*)")) or (not isFriend and match(filterName, "^Enemy:([^,]*)")) or nil
|
||||
-- if friendCheck ~= false then
|
||||
-- if friendCheck ~= nil and (G.unitframe.specialFilters[friendCheck] or E.global.unitframe.aurafilters[friendCheck]) then
|
||||
-- filterName = friendCheck -- this is for our filters to handle Friendly and Enemy
|
||||
-- end
|
||||
-- filter = E.global.unitframe.aurafilters[filterName]
|
||||
-- if filter then
|
||||
-- filterType = filter.type
|
||||
-- spellList = filter.spells
|
||||
-- spell = spellList and (spellList[spellID] or spellList[name])
|
||||
|
||||
-- if filterType and (filterType == "Whitelist") and (spell and spell.enable) and allowDuration then
|
||||
-- return true, spell.priority -- this is the only difference from auarbars code
|
||||
-- elseif filterType and (filterType == "Blacklist") and (spell and spell.enable) then
|
||||
-- return false
|
||||
-- end
|
||||
-- elseif filterName == "Personal" and isPlayer and allowDuration then
|
||||
-- return true
|
||||
-- elseif filterName == "nonPersonal" and (not isPlayer) and allowDuration then
|
||||
-- return true
|
||||
-- elseif filterName == "CastByUnit" and (caster and isUnit) and allowDuration then
|
||||
-- return true
|
||||
-- elseif filterName == "notCastByUnit" and (caster and not isUnit) and allowDuration then
|
||||
-- return true
|
||||
-- elseif filterName == "Dispellable" and canDispell and allowDuration then
|
||||
-- return true
|
||||
-- elseif filterName == "blockNoDuration" and noDuration then
|
||||
-- return false
|
||||
-- elseif filterName == "blockNonPersonal" and (not isPlayer) then
|
||||
-- return false
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function UF:AuraBarFilter(unit, name, _, _, _, debuffType, duration, _, unitCaster, isStealable, _, spellID)
|
||||
if not self.db then return end
|
||||
local db = self.db.aurabar
|
||||
|
||||
if not name then return nil end
|
||||
local filterCheck, isUnit, isFriend, isPlayer, canDispell, allowDuration, noDuration
|
||||
|
||||
if db.priority ~= "" then
|
||||
noDuration = (not duration or duration == 0)
|
||||
isFriend = unit and UnitIsFriend("player", unit) and not UnitCanAttack("player", unit)
|
||||
isPlayer = (unitCaster == "player")
|
||||
isUnit = unit and unitCaster and UnitIsUnit(unit, unitCaster)
|
||||
canDispell = (self.type == "Buffs" and isStealable) or (self.type == "Debuffs" and debuffType and E:IsDispellableByMe(debuffType))
|
||||
allowDuration = noDuration or (duration and (duration > 0) and (db.maxDuration == 0 or duration <= db.maxDuration) and (db.minDuration == 0 or duration >= db.minDuration))
|
||||
filterCheck = UF:CheckFilter(name, unitCaster, spellID, isFriend, isPlayer, isUnit, allowDuration, noDuration, canDispell, strsplit(",", db.priority))
|
||||
else
|
||||
filterCheck = true -- Allow all auras to be shown when the filter list is empty
|
||||
end
|
||||
|
||||
return filterCheck
|
||||
end
|
||||
|
||||
function UF:ColorizeAuraBars()
|
||||
local bars = self.bars
|
||||
for index = 1, getn(bars) do
|
||||
local frame = bars[index]
|
||||
if not frame:IsVisible() then break end
|
||||
local spellName = frame.statusBar.aura.name
|
||||
local spellID = frame.statusBar.aura.spellID
|
||||
-- local colors = E.global.unitframe.AuraBarColors[spellID] or E.global.unitframe.AuraBarColors[tostring(spellID)] or E.global.unitframe.AuraBarColors[spellName]
|
||||
|
||||
-- if E.db.unitframe.colors.auraBarTurtle and (E.global.unitframe.aurafilters.TurtleBuffs.spells[spellID] or E.global.unitframe.aurafilters.TurtleBuffs.spells[spellName]) and not colors then
|
||||
-- colors = E.db.unitframe.colors.auraBarTurtleColor
|
||||
-- end
|
||||
|
||||
if colors then
|
||||
frame.statusBar:SetStatusBarColor(colors.r, colors.g, colors.b)
|
||||
frame.statusBar.bg:SetTexture(colors.r * 0.25, colors.g * 0.25, colors.b * 0.25)
|
||||
else
|
||||
local r, g, b = frame.statusBar:GetStatusBarColor()
|
||||
frame.statusBar.bg:SetTexture(r * 0.25, g * 0.25, b * 0.25)
|
||||
end
|
||||
|
||||
if UF.db.colors.transparentAurabars and not frame.statusBar.isTransparent then
|
||||
UF:ToggleTransparentStatusBar(true, frame.statusBar, frame.statusBar.bg, nil, true)
|
||||
elseif(frame.statusBar.isTransparent and not UF.db.colors.transparentAurabars) then
|
||||
UF:ToggleTransparentStatusBar(false, frame.statusBar, frame.statusBar.bg, nil, true)
|
||||
end
|
||||
|
||||
if UF.db.colors.transparentAurabars then
|
||||
local _, _, _, alpha = frame:GetBackdropColor()
|
||||
if colors then
|
||||
frame:SetBackdropColor(colors.r * 0.58, colors.g * 0.58, colors.b * 0.58, alpha)
|
||||
else
|
||||
local r, g, b = frame.statusBar:GetStatusBarColor()
|
||||
frame:SetBackdropColor(r * 0.58, g * 0.58, b * 0.58, alpha)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,5 +1,4 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||
<Script file="AuraBars.lua"/>
|
||||
<Script file="Auras.lua"/>
|
||||
<Script file="Castbar.lua"/>
|
||||
<Script file="Classbars.lua"/>
|
||||
|
||||
@@ -35,7 +35,6 @@ function UF:Construct_TargetFrame(frame)
|
||||
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
||||
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
||||
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
||||
frame.AuraBars = self:Construct_AuraBarHeader(frame)
|
||||
frame.Range = self:Construct_Range(frame)
|
||||
frame.PvPIndicator = self:Construct_PvPIcon(frame)
|
||||
frame.customTexts = {}
|
||||
@@ -116,8 +115,6 @@ function UF:Update_TargetFrame(frame, db)
|
||||
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
UF:Configure_AuraBars(frame)
|
||||
|
||||
UF:Configure_Range(frame)
|
||||
|
||||
UF:Configure_PVPIcon(frame)
|
||||
|
||||
@@ -694,13 +694,9 @@ P["unitframe"] = {
|
||||
["classbackdrop"] = false,
|
||||
["healthmultiplier"] = 0.6,
|
||||
["bgUseBarTexture"] = false,
|
||||
["auraBarByType"] = true,
|
||||
["auraBarTurtle"] = true,
|
||||
["auraBarTurtleColor"] = {r = 143/255, g = 101/255, b = 158/255},
|
||||
["transparentHealth"] = false,
|
||||
["transparentPower"] = false,
|
||||
["transparentCastbar"] = false,
|
||||
["transparentAurabars"] = false,
|
||||
["castColor"] = {r = .31, g = .31, b = .31},
|
||||
["castClassColor"] = false,
|
||||
["castReactionColor"] = false,
|
||||
@@ -710,8 +706,6 @@ P["unitframe"] = {
|
||||
["health_backdrop_dead"] = {r = .8, g = .01, b = .01},
|
||||
["tapped"] = {r = 0.55, g = 0.57, b = 0.61},
|
||||
["disconnected"] = {r = 0.84, g = 0.75, b = 0.65},
|
||||
["auraBarBuff"] = {r = .31, g = .31, b = .31},
|
||||
["auraBarDebuff"] = {r = 0.8, g = 0.1, b = 0.1},
|
||||
["power"] = {
|
||||
["MANA"] = {r = 0.31, g = 0.45, b = 0.63},
|
||||
["RAGE"] = {r = 0.78, g = 0.25, b = 0.25},
|
||||
@@ -944,25 +938,6 @@ P["unitframe"] = {
|
||||
["frameLevel"] = 1
|
||||
},
|
||||
},
|
||||
["aurabar"] = {
|
||||
["enable"] = true,
|
||||
["anchorPoint"] = "ABOVE",
|
||||
["attachTo"] = "DEBUFFS",
|
||||
["maxBars"] = 6,
|
||||
["useBlacklist"] = true,
|
||||
["useWhitelist"] = true,
|
||||
["noDuration"] = true,
|
||||
["minDuration"] = 0,
|
||||
["maxDuration"] = 120,
|
||||
["useFilter"] = "",
|
||||
["friendlyAuraType"] = "HELPFUL",
|
||||
["enemyAuraType"] = "HARMFUL",
|
||||
["height"] = 20,
|
||||
["sort"] = "TIME_REMAINING",
|
||||
["uniformThreshold"] = 0,
|
||||
["yOffset"] = 0,
|
||||
["spacing"] = 0,
|
||||
},
|
||||
["raidicon"] = {
|
||||
["enable"] = true,
|
||||
["size"] = 18,
|
||||
@@ -1114,25 +1089,6 @@ P["unitframe"] = {
|
||||
["frameLevel"] = 1
|
||||
}
|
||||
},
|
||||
["aurabar"] = {
|
||||
["enable"] = true,
|
||||
["anchorPoint"] = "ABOVE",
|
||||
["attachTo"] = "DEBUFFS",
|
||||
["maxBars"] = 6,
|
||||
["useBlacklist"] = {friendly = true, enemy = true},
|
||||
["useWhitelist"] = {friendly = false, enemy = false},
|
||||
["noDuration"] = {friendly = true, enemy = true},
|
||||
["minDuration"] = 0,
|
||||
["maxDuration"] = 300,
|
||||
["useFilter"] = "",
|
||||
["friendlyAuraType"] = "HELPFUL",
|
||||
["enemyAuraType"] = "HARMFUL",
|
||||
["height"] = 20,
|
||||
["sort"] = "TIME_REMAINING",
|
||||
["uniformThreshold"] = 0,
|
||||
["yOffset"] = 0,
|
||||
["spacing"] = 0,
|
||||
},
|
||||
["raidicon"] = {
|
||||
["enable"] = true,
|
||||
["size"] = 18,
|
||||
@@ -1443,25 +1399,6 @@ P["unitframe"] = {
|
||||
["frameLevel"] = 1
|
||||
}
|
||||
},
|
||||
["aurabar"] = {
|
||||
["enable"] = false,
|
||||
["anchorPoint"] = "ABOVE",
|
||||
["attachTo"] = "DEBUFFS",
|
||||
["maxBars"] = 3,
|
||||
["useBlacklist"] = {friendly = true, enemy = true},
|
||||
["useWhitelist"] = {friendly = false, enemy = false},
|
||||
["noDuration"] = {friendly = false, enemy = false},
|
||||
["minDuration"] = 0,
|
||||
["maxDuration"] = 120,
|
||||
["useFilter"] = "",
|
||||
["friendlyAuraType"] = "HELPFUL",
|
||||
["enemyAuraType"] = "HARMFUL",
|
||||
["height"] = 20,
|
||||
["sort"] = "TIME_REMAINING",
|
||||
["uniformThreshold"] = 0,
|
||||
["yOffset"] = 0,
|
||||
["spacing"] = 0,
|
||||
},
|
||||
["raidicon"] = {
|
||||
["enable"] = true,
|
||||
["size"] = 18,
|
||||
@@ -1660,25 +1597,6 @@ P["unitframe"] = {
|
||||
["xOffset"] = 0,
|
||||
["yOffset"] = 0
|
||||
},
|
||||
["aurabar"] = {
|
||||
["enable"] = false,
|
||||
["anchorPoint"] = "ABOVE",
|
||||
["attachTo"] = "FRAME",
|
||||
["maxBars"] = 6,
|
||||
["useBlacklist"] = {friendly = true, enemy = true},
|
||||
["useWhitelist"] = {friendly = false, enemy = false},
|
||||
["noDuration"] = {friendly = true, enemy = true},
|
||||
["minDuration"] = 0,
|
||||
["maxDuration"] = 120,
|
||||
["useFilter"] = "",
|
||||
["friendlyAuraType"] = "HELPFUL",
|
||||
["enemyAuraType"] = "HARMFUL",
|
||||
["height"] = 20,
|
||||
["sort"] = "TIME_REMAINING",
|
||||
["uniformThreshold"] = 0,
|
||||
["yOffset"] = 2,
|
||||
["spacing"] = 2
|
||||
},
|
||||
["buffIndicator"] = {
|
||||
["enable"] = true,
|
||||
["size"] = 8,
|
||||
|
||||
Reference in New Issue
Block a user