Files
wow-weakauras/Complete Projects/Legion/TSU - Shitty kara trinket.lua
2024-08-24 22:43:07 +02:00

59 lines
1.6 KiB
Lua

--TSU
--EVERY FRAME
function(allstates)
for _,v in pairs(allstates) do
v.show = false
v.changed = true
end
for i = 1, GetNumGroupMembers() do
local unit = "raid" .. i
local class = UnitClass(unit)
local buff = UnitBuff(unit, "Guardian's Familiar")
if buff then
local amount = select(17, UnitBuff(unit, "Guardian's Familiar"))
local maxval = 0
if amount > maxval then
maxval = amount
end
local name = UnitName(unit)
allstates[unit] =
{
changed = true,
show = true,
resort = true,
progressType = "static",
value = amount,
total = maxval,
index = amount,
class = class,
name = name,
}
end
end
return true
end
--ANIMATION
function()
if aura_env.statee then
return aura_env.classColor(aura_env.statee.class)
end
end
--INIT
aura_env.classColor = function(class)
if class == "Death Knight" then return 0.77, 0.12, 0.23, 1 elseif
class == "Demon Hunter" then return 0.64, 0.19, 0.79, 1 elseif
class == "Druid" then return 1, 0.49, 0.04, 1 elseif
class == "Hunter" then return 0.67, 0.83, 0.45, 1 elseif
class == "Mage" then return 0.25, 0.78, 0.92, 1 elseif
class == "Monk" then return 0, 1, 0.59, 1 elseif
class == "Paladin" then return 0.96, 0.55, 0.73, 1 elseif
class == "Priest" then return 1, 1, 1, 1 elseif
class == "Rogue" then return 1, 0.96, 0.41, 1 elseif
class == "Shaman" then return 0, 0.44, 0.87, 1 elseif
class == "Warlock" then return 0.53, 0.53, 0.93, 1 elseif
class == "Warrior" then return 0.78, 0.61, 0.43, 1 else
return 1, 1, 1, 1 end
end