Core/Tags: fix power color tags
This commit is contained in:
+29
-3
@@ -530,19 +530,45 @@ E:AddTag('pvptimer', 1, function(unit)
|
||||
end
|
||||
end)
|
||||
|
||||
E:AddTag('powercolor', 'UNIT_DISPLAYPOWER', function()
|
||||
local _, powerType = UnitPowerType("player")
|
||||
local color = ElvUF.colors.power[powerType] or ElvUF.colors.power.MANA
|
||||
local altR, altG, altB = color.r, color.g, color.b
|
||||
if color[1] then
|
||||
return Hex(color[1], color[2], color[3])
|
||||
else
|
||||
return Hex(altR, altG, altB)
|
||||
end
|
||||
end)
|
||||
|
||||
E:AddTag('manacolor', 'UNIT_DISPLAYPOWER', function()
|
||||
local color = ElvUF.colors.power.MANA
|
||||
return Hex(color)
|
||||
local altR, altG, altB = color.r, color.g, color.b
|
||||
if color[1] then
|
||||
return Hex(color[1], color[2], color[3])
|
||||
else
|
||||
return Hex(altR, altG, altB)
|
||||
end
|
||||
end)
|
||||
|
||||
E:AddTag('ragecolor', 'UNIT_DISPLAYPOWER', function()
|
||||
local color = ElvUF.colors.power.RAGE
|
||||
return Hex(color)
|
||||
local altR, altG, altB = color.r, color.g, color.b
|
||||
if color[1] then
|
||||
return Hex(color[1], color[2], color[3])
|
||||
else
|
||||
return Hex(altR, altG, altB)
|
||||
end
|
||||
end)
|
||||
|
||||
E:AddTag('energycolor', 'UNIT_DISPLAYPOWER', function()
|
||||
local color = ElvUF.colors.power.ENERGY
|
||||
return Hex(color)
|
||||
local altR, altG, altB = color.r, color.g, color.b
|
||||
if color[1] then
|
||||
return Hex(color[1], color[2], color[3])
|
||||
else
|
||||
return Hex(altR, altG, altB)
|
||||
end
|
||||
end)
|
||||
|
||||
E:AddTag('distance', 0.1, function(realUnit)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local A = E:GetModule("Auras")
|
||||
local NP = E:GetModule("NamePlates")
|
||||
local LSM = E.Libs.LSM
|
||||
local LBF = E.Libs.LBF
|
||||
|
||||
|
||||
@@ -506,8 +506,17 @@ function UF:AuraFilter(unit, button, name, _, _, _, debuffType, duration, expira
|
||||
if not name then return end -- checking for an aura that is not there, pass nil to break while loop
|
||||
|
||||
local parent = self:GetParent()
|
||||
local db = parent.db and parent.db[self.type]
|
||||
if not db then return true end
|
||||
local db
|
||||
if self.isNamePlate then
|
||||
db = NP:PlateDB(parent)
|
||||
db = db and db[self.type]
|
||||
else
|
||||
db = parent.db and parent.db[self.type]
|
||||
end
|
||||
|
||||
if not db then
|
||||
return true
|
||||
end
|
||||
|
||||
local isPlayer = (caster == "player" or caster == "vehicle")
|
||||
local isFriend = unit and UnitIsFriend("player", unit) and not UnitCanAttack("player", unit)
|
||||
|
||||
@@ -266,9 +266,9 @@ P.bags = {
|
||||
local NP_Auras = {
|
||||
enable = true,
|
||||
desaturate = true,
|
||||
numAuras = 5,
|
||||
numAuras = 8,
|
||||
numRows = 1,
|
||||
size = 27,
|
||||
size = 20,
|
||||
height = 23,
|
||||
attachTo = 'FRAME',
|
||||
keepSizeRatio = true,
|
||||
@@ -293,7 +293,7 @@ local NP_Auras = {
|
||||
countYOffset = 2,
|
||||
durationPosition = 'CENTER',
|
||||
minDuration = 0,
|
||||
maxDuration = 0,
|
||||
maxDuration = 300,
|
||||
priority = ''
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user