Update
This commit is contained in:
@@ -1,110 +1,110 @@
|
||||
--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, "Concordance of the Legionfall")
|
||||
if buff then
|
||||
local exptime = select(7, UnitBuff(unit, "Concordance of the Legionfall"))
|
||||
local amount = select(17, UnitBuff(unit, "Concordance of the Legionfall"))
|
||||
local dur = 10
|
||||
local cur = exptime - GetTime()
|
||||
local rem = dur - cur
|
||||
local name = UnitName(unit)
|
||||
allstates[unit] =
|
||||
{
|
||||
changed = true,
|
||||
show = true,
|
||||
resort = true,
|
||||
progressType = "timed",
|
||||
value = rem,
|
||||
total = dur,
|
||||
index = i,
|
||||
class = class,
|
||||
val = amount,
|
||||
name = name,
|
||||
}
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--ANIMATION
|
||||
function()
|
||||
if aura_env.state then
|
||||
return aura_env.classColor(aura_env.state.class)
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
aura_env.shorten = function(val)
|
||||
local function round(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
local n = 2
|
||||
if val < 1e3 then
|
||||
return round(val, n)
|
||||
elseif val > 1e3 and val < 1e6 then
|
||||
return round(val / 1e3, n) .. "k"
|
||||
elseif val > 1e6 and val < 1e9 then
|
||||
return round(val / 1e6, n) .. "M"
|
||||
elseif val > 1e9 then
|
||||
return round(val / 1e9, n) .. "G"
|
||||
end
|
||||
end
|
||||
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
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
aura_env.grad = function(c)
|
||||
--c expected as [0, 1]
|
||||
if c > 0.5 then
|
||||
c = 1 - (2 * (c - 0.5))
|
||||
return c, 1, 0, 1
|
||||
else
|
||||
c = c * 2
|
||||
return 1, c, 0, 1
|
||||
end
|
||||
end
|
||||
aura_env.range = function(val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
--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, "Concordance of the Legionfall")
|
||||
if buff then
|
||||
local exptime = select(7, UnitBuff(unit, "Concordance of the Legionfall"))
|
||||
local amount = select(17, UnitBuff(unit, "Concordance of the Legionfall"))
|
||||
local dur = 10
|
||||
local cur = exptime - GetTime()
|
||||
local rem = dur - cur
|
||||
local name = UnitName(unit)
|
||||
allstates[unit] =
|
||||
{
|
||||
changed = true,
|
||||
show = true,
|
||||
resort = true,
|
||||
progressType = "timed",
|
||||
value = rem,
|
||||
total = dur,
|
||||
index = i,
|
||||
class = class,
|
||||
val = amount,
|
||||
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.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
aura_env.shorten = function(val)
|
||||
local function round(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
local n = 2
|
||||
if val < 1e3 then
|
||||
return round(val, n)
|
||||
elseif val > 1e3 and val < 1e6 then
|
||||
return round(val / 1e3, n) .. "k"
|
||||
elseif val > 1e6 and val < 1e9 then
|
||||
return round(val / 1e6, n) .. "M"
|
||||
elseif val > 1e9 then
|
||||
return round(val / 1e9, n) .. "G"
|
||||
end
|
||||
end
|
||||
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
|
||||
aura_env.round = function(var, n)
|
||||
if (n) then
|
||||
var = math.floor((var * 10^n) + 0.5) / (10^n)
|
||||
else
|
||||
var = math.floor(var+0.5)
|
||||
end
|
||||
return var
|
||||
end
|
||||
aura_env.grad = function(c)
|
||||
--c expected as [0, 1]
|
||||
if c > 0.5 then
|
||||
c = 1 - (2 * (c - 0.5))
|
||||
return c, 1, 0, 1
|
||||
else
|
||||
c = c * 2
|
||||
return 1, c, 0, 1
|
||||
end
|
||||
end
|
||||
aura_env.range = function(val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
end
|
||||
Reference in New Issue
Block a user