Update
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UNIT_AURA
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, CombatLogGetCurrentEventInfo())
|
||||
local sid = select(12, CombatLogGetCurrentEventInfo())
|
||||
local caster = select(5, CombatLogGetCurrentEventInfo())
|
||||
if caster == UnitName("player") and se == "SPELL_CAST_SUCCESS" and sid == 53595 then
|
||||
WeakAurasSaved.CustomTrash.ProcShit.casts = WeakAurasSaved.CustomTrash.ProcShit.casts + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.CustomTrash.ProcShit.procs .. " / " .. WeakAurasSaved.CustomTrash.ProcShit.casts .. "\n" .. WeakAurasSaved.CustomTrash.ProcShit.procs / WeakAurasSaved.CustomTrash.ProcShit.casts
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UNIT_AURA
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, CombatLogGetCurrentEventInfo())
|
||||
local sid = select(12, CombatLogGetCurrentEventInfo())
|
||||
local caster = select(5, CombatLogGetCurrentEventInfo())
|
||||
if caster == UnitName("player") and se == "SPELL_CAST_SUCCESS" and sid == 53595 then
|
||||
WeakAurasSaved.CustomTrash.ProcShit.casts = WeakAurasSaved.CustomTrash.ProcShit.casts + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.CustomTrash.ProcShit.procs .. " / " .. WeakAurasSaved.CustomTrash.ProcShit.casts .. "\n" .. WeakAurasSaved.CustomTrash.ProcShit.procs / WeakAurasSaved.CustomTrash.ProcShit.casts
|
||||
end
|
||||
@@ -1,34 +1,34 @@
|
||||
--Custom text
|
||||
function()
|
||||
output = ""
|
||||
for k, v in pairs(aura_env.elites) do
|
||||
output = output .. aura_env.eliteColor .. k .. " " .. v .. "\124r\n"
|
||||
end
|
||||
for k, v in pairs(aura_env.rares) do
|
||||
output = output .. aura_env.rareColor .. k .. " " .. v .. "\124r\n"
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--NAME_PLATE_UNIT_ADDED
|
||||
function(e, u)
|
||||
class = UnitClassification(u)
|
||||
-- use date() for time
|
||||
if class == "elite" then
|
||||
aura_env.elites[UnitName(u)] = aura_env.GetTime()
|
||||
return true
|
||||
elseif class == "rare" or class == "rareelite" then
|
||||
aura_env.rares[UnitName(u)] = aura_env.GetTime()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.elites = {}
|
||||
aura_env.rares = {}
|
||||
aura_env.eliteColor = "\124c" .. "ff3e3e3e"
|
||||
aura_env.rareColor = "\124c" .. "ffffe72e"
|
||||
|
||||
aura_env.GetTime = function()
|
||||
return string.match(date(), "%d%d:%d%d:%d%d")
|
||||
--Custom text
|
||||
function()
|
||||
output = ""
|
||||
for k, v in pairs(aura_env.elites) do
|
||||
output = output .. aura_env.eliteColor .. k .. " " .. v .. "\124r\n"
|
||||
end
|
||||
for k, v in pairs(aura_env.rares) do
|
||||
output = output .. aura_env.rareColor .. k .. " " .. v .. "\124r\n"
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--NAME_PLATE_UNIT_ADDED
|
||||
function(e, u)
|
||||
class = UnitClassification(u)
|
||||
-- use date() for time
|
||||
if class == "elite" then
|
||||
aura_env.elites[UnitName(u)] = aura_env.GetTime()
|
||||
return true
|
||||
elseif class == "rare" or class == "rareelite" then
|
||||
aura_env.rares[UnitName(u)] = aura_env.GetTime()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.elites = {}
|
||||
aura_env.rares = {}
|
||||
aura_env.eliteColor = "\124c" .. "ff3e3e3e"
|
||||
aura_env.rareColor = "\124c" .. "ffffe72e"
|
||||
|
||||
aura_env.GetTime = function()
|
||||
return string.match(date(), "%d%d:%d%d:%d%d")
|
||||
endee
|
||||
@@ -1,10 +1,10 @@
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.text:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE, MONOCHROME")
|
||||
aura_env.region.text:SetTextColor(0, 1, 0, 0.8)
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER", 1, 0)
|
||||
aura_env.region.text:SetText("SW")
|
||||
aura_env.region.text:Show()
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.text:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE, MONOCHROME")
|
||||
aura_env.region.text:SetTextColor(0, 1, 0, 0.8)
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER", 1, 0)
|
||||
aura_env.region.text:SetText("SW")
|
||||
aura_env.region.text:Show()
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
if aura_env.altlist[UnitName(unit)] then
|
||||
local plate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
if plate then
|
||||
aura_env.region:SetAnchor("CENTER", plate, "CENTER")
|
||||
aura_env.region:SetOffset(0, 50)
|
||||
aura_env.region:Color(1, 1, 1, 1)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
if aura_env.altlist[UnitName(unit)] then
|
||||
aura_env.region:ClearAllPoints()
|
||||
aura_env.region:Color(1, 1, 1, 0)
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.altlist =
|
||||
{
|
||||
["Elna"] = 1,
|
||||
["Melna"] = 1,
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
if aura_env.altlist[UnitName(unit)] then
|
||||
local plate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
if plate then
|
||||
aura_env.region:SetAnchor("CENTER", plate, "CENTER")
|
||||
aura_env.region:SetOffset(0, 50)
|
||||
aura_env.region:Color(1, 1, 1, 1)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
if aura_env.altlist[UnitName(unit)] then
|
||||
aura_env.region:ClearAllPoints()
|
||||
aura_env.region:Color(1, 1, 1, 0)
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.altlist =
|
||||
{
|
||||
["Elna"] = 1,
|
||||
["Melna"] = 1,
|
||||
}
|
||||
@@ -1,22 +1,22 @@
|
||||
--TRADE_SHOW
|
||||
function()
|
||||
if UnitName("target") == "Melna" then
|
||||
local items = 0
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local link = select(7, GetContainerItemInfo(i, j))
|
||||
if link then
|
||||
local type = select(7, GetItemInfo(link))
|
||||
if (type == "Cooking" or type == "Cloth") and items < 6 then
|
||||
UseContainerItem(i, j)
|
||||
items = items + 1
|
||||
elseif items >= 6 then
|
||||
AcceptTrade()
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
AcceptTrade()
|
||||
end
|
||||
--TRADE_SHOW
|
||||
function()
|
||||
if UnitName("target") == "Melna" then
|
||||
local items = 0
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local link = select(7, GetContainerItemInfo(i, j))
|
||||
if link then
|
||||
local type = select(7, GetItemInfo(link))
|
||||
if (type == "Cooking" or type == "Cloth") and items < 6 then
|
||||
UseContainerItem(i, j)
|
||||
items = items + 1
|
||||
elseif items >= 6 then
|
||||
AcceptTrade()
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
AcceptTrade()
|
||||
end
|
||||
end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,27 +1,27 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_DISABLED
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_ENERGIZE" then
|
||||
local caster = select(9, ...)
|
||||
if caster == UnitName("player") then
|
||||
local spell = select(13, ...)
|
||||
if spell == "Lucid Dreams" then
|
||||
local amount = select(15, ...)
|
||||
aura_env.amount = aura_env.amount + amount
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_DISABLED" then
|
||||
aura_env.amount = 0
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.amount
|
||||
end
|
||||
|
||||
--INIT
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_DISABLED
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_ENERGIZE" then
|
||||
local caster = select(9, ...)
|
||||
if caster == UnitName("player") then
|
||||
local spell = select(13, ...)
|
||||
if spell == "Lucid Dreams" then
|
||||
local amount = select(15, ...)
|
||||
aura_env.amount = aura_env.amount + amount
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_DISABLED" then
|
||||
aura_env.amount = 0
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.amount
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.amount = 0
|
||||
@@ -1,64 +1,64 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SWING_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
aura_env.nummelee = aura_env.nummelee + 1
|
||||
local bloq = select(17, ...)
|
||||
if bloq then
|
||||
aura_env.numbloq = aura_env.numbloq + 1
|
||||
local amount = select(13, ...)
|
||||
local total = amount + bloq
|
||||
local pbloq = bloq / total * 100
|
||||
aura_env.bloqs[#aura_env.bloqs + 1] = pbloq
|
||||
local count = 1
|
||||
for k,v in ipairs(aura_env.bloqs) do
|
||||
aura_env.pbloq = aura_env.pbloq + v
|
||||
count = count + 1
|
||||
end
|
||||
aura_env.pbloq = aura_env.pbloq / count
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
aura_env.nummelee = aura_env.nummelee + 1
|
||||
local bloq = select(20, ...)
|
||||
if bloq then
|
||||
aura_env.numbloq = aura_env.numbloq + 1
|
||||
local amount = select(16, ...)
|
||||
local total = amount + bloq
|
||||
local pbloq = bloq / total * 100
|
||||
aura_env.bloqs[#aura_env.bloqs + 1] = pbloq
|
||||
local count = 1
|
||||
for k,v in ipairs(aura_env.bloqs) do
|
||||
aura_env.pbloq = aura_env.pbloq + v
|
||||
count = count + 1
|
||||
end
|
||||
aura_env.pbloq = aura_env.pbloq / count
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.round(aura_env.pbloq, 2) .. "\n" .. aura_env.round((aura_env.numbloq / aura_env.nummelee) * 100, 2)
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.bloqs = {}
|
||||
aura_env.numbloq = 0
|
||||
aura_env.nummelee = 0
|
||||
aura_env.pbloq = 0
|
||||
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
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SWING_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
aura_env.nummelee = aura_env.nummelee + 1
|
||||
local bloq = select(17, ...)
|
||||
if bloq then
|
||||
aura_env.numbloq = aura_env.numbloq + 1
|
||||
local amount = select(13, ...)
|
||||
local total = amount + bloq
|
||||
local pbloq = bloq / total * 100
|
||||
aura_env.bloqs[#aura_env.bloqs + 1] = pbloq
|
||||
local count = 1
|
||||
for k,v in ipairs(aura_env.bloqs) do
|
||||
aura_env.pbloq = aura_env.pbloq + v
|
||||
count = count + 1
|
||||
end
|
||||
aura_env.pbloq = aura_env.pbloq / count
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
aura_env.nummelee = aura_env.nummelee + 1
|
||||
local bloq = select(20, ...)
|
||||
if bloq then
|
||||
aura_env.numbloq = aura_env.numbloq + 1
|
||||
local amount = select(16, ...)
|
||||
local total = amount + bloq
|
||||
local pbloq = bloq / total * 100
|
||||
aura_env.bloqs[#aura_env.bloqs + 1] = pbloq
|
||||
local count = 1
|
||||
for k,v in ipairs(aura_env.bloqs) do
|
||||
aura_env.pbloq = aura_env.pbloq + v
|
||||
count = count + 1
|
||||
end
|
||||
aura_env.pbloq = aura_env.pbloq / count
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.round(aura_env.pbloq, 2) .. "\n" .. aura_env.round((aura_env.numbloq / aura_env.nummelee) * 100, 2)
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.bloqs = {}
|
||||
aura_env.numbloq = 0
|
||||
aura_env.nummelee = 0
|
||||
aura_env.pbloq = 0
|
||||
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
|
||||
@@ -1,162 +1,162 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SWING_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
local amount = select(13, ...)
|
||||
local block = select(17, ...) or 0
|
||||
local absorb = select(18, ...) or 0
|
||||
if amount then
|
||||
local output = amount
|
||||
local total = amount
|
||||
total = total + block + absorb
|
||||
local rel = aura_env.round(((absorb + block) / total) * 100, 2) or 0
|
||||
output = output .. " " .. block .. " " .. absorb .. " " .. rel
|
||||
if #aura_env.melee == aura_env.lines then
|
||||
table.remove(aura_env.melee, 1)
|
||||
table.insert(aura_env.melee, output)
|
||||
else
|
||||
table.insert(aura_env.melee, output)
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
local amount = select(16, ...)
|
||||
local block = select(20, ...) or 0
|
||||
local absorb = select(21, ...) or 0
|
||||
if amount then
|
||||
local output = amount
|
||||
local total = amount
|
||||
total = total + block + absorb
|
||||
local rel = aura_env.round(((absorb + block) / total) * 100, 2) or 0
|
||||
output = output .. " " .. block .. " " .. absorb .. " " .. rel
|
||||
if #aura_env.melee == aura_env.lines then
|
||||
table.remove(aura_env.melee, 1)
|
||||
table.insert(aura_env.melee, output)
|
||||
else
|
||||
table.insert(aura_env.melee, output)
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local meleeT, blockT, absorbT, perT = "", "", "", ""
|
||||
local melee, block, absorb, per = 0, 0, 0, 0
|
||||
for i = #aura_env.melee, 1, -1 do
|
||||
melee = aura_env.melee[i]:match("(%d+)")
|
||||
if melee then
|
||||
melee = tonumber(melee)
|
||||
block = aura_env.melee[i]:match("%d+ (%d+)") or 0
|
||||
block = tonumber(block)
|
||||
absorb = aura_env.melee[i]:match("%d+ %d+ (%d+)") or 0
|
||||
absorb = tonumber(absorb)
|
||||
if block or absorb then
|
||||
per = aura_env.melee[i]:match("%d+ %d+ %d+ (%d+%.?%d*)") or 0
|
||||
per = tonumber(per)
|
||||
end
|
||||
meleeT = meleeT .. aura_env.shorten(melee) .. "\n"
|
||||
blockT = blockT .. aura_env.shorten(block) .. "\n"
|
||||
absorbT = absorbT .. aura_env.shorten(absorb) .. "\n"
|
||||
perT = perT .. aura_env.shorten(per) .. "\n"
|
||||
end
|
||||
end
|
||||
aura_env.region.melee:SetText(meleeT)
|
||||
aura_env.region.block:SetText(blockT)
|
||||
aura_env.region.absorb:SetText(absorbT)
|
||||
aura_env.region.percentage:SetText(perT)
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.lines = 10
|
||||
|
||||
----------------------------------------
|
||||
-- PLEASE DO NOT EDIT BELOW THIS LINE --
|
||||
----------------------------------------
|
||||
local fontsize = select(2, aura_env.region.text:GetFont())
|
||||
aura_env.region:SetWidth(fontsize * 20)
|
||||
aura_env.region:SetHeight(fontsize * aura_env.lines)
|
||||
aura_env.melee = {""}
|
||||
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
|
||||
if not aura_env.region.melee then
|
||||
local melee = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.melee = melee
|
||||
end
|
||||
aura_env.region.melee:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.melee:SetTextColor(1, 1, 1)
|
||||
aura_env.region.melee:SetPoint("CENTER", aura_env.region, "CENTER", -fontsize * 7.5, 0)
|
||||
aura_env.region.melee:SetWidth(fontsize * 5)
|
||||
aura_env.region.melee:SetJustifyH("LEFT")
|
||||
aura_env.region.melee:SetText("")
|
||||
aura_env.region.melee:Show()
|
||||
|
||||
if not aura_env.region.block then
|
||||
local block = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.block = block
|
||||
end
|
||||
aura_env.region.block:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.block:SetTextColor(0.75, 0.23, 0.23)
|
||||
aura_env.region.block:SetPoint("CENTER", aura_env.region, "CENTER", -fontsize * 2.5, 0)
|
||||
aura_env.region.block:SetWidth(fontsize * 5)
|
||||
aura_env.region.block:SetJustifyH("LEFT")
|
||||
aura_env.region.block:SetText("")
|
||||
aura_env.region.block:Show()
|
||||
|
||||
if not aura_env.region.absorb then
|
||||
local absorb = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.absorb = absorb
|
||||
end
|
||||
aura_env.region.absorb:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.absorb:SetTextColor(0.1227, 0.4089, 0.65)
|
||||
aura_env.region.absorb:SetPoint("CENTER", aura_env.region, "CENTER", fontsize * 2.5, 0)
|
||||
aura_env.region.absorb:SetWidth(fontsize * 5)
|
||||
aura_env.region.absorb:SetJustifyH("LEFT")
|
||||
aura_env.region.absorb:SetText("")
|
||||
aura_env.region.absorb:Show()
|
||||
|
||||
if not aura_env.region.percentage then
|
||||
local percentage = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.percentage = percentage
|
||||
end
|
||||
aura_env.region.percentage:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.percentage:SetTextColor(0.32, 0.32, 0.34)
|
||||
aura_env.region.percentage:SetPoint("CENTER", aura_env.region, "CENTER", fontsize * 7.5, 0)
|
||||
aura_env.region.percentage:SetWidth(fontsize * 5)
|
||||
aura_env.region.percentage:SetJustifyH("LEFT")
|
||||
aura_env.region.percentage:SetText("")
|
||||
aura_env.region.percentage:Show()
|
||||
|
||||
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
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SWING_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
local amount = select(13, ...)
|
||||
local block = select(17, ...) or 0
|
||||
local absorb = select(18, ...) or 0
|
||||
if amount then
|
||||
local output = amount
|
||||
local total = amount
|
||||
total = total + block + absorb
|
||||
local rel = aura_env.round(((absorb + block) / total) * 100, 2) or 0
|
||||
output = output .. " " .. block .. " " .. absorb .. " " .. rel
|
||||
if #aura_env.melee == aura_env.lines then
|
||||
table.remove(aura_env.melee, 1)
|
||||
table.insert(aura_env.melee, output)
|
||||
else
|
||||
table.insert(aura_env.melee, output)
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
local amount = select(16, ...)
|
||||
local block = select(20, ...) or 0
|
||||
local absorb = select(21, ...) or 0
|
||||
if amount then
|
||||
local output = amount
|
||||
local total = amount
|
||||
total = total + block + absorb
|
||||
local rel = aura_env.round(((absorb + block) / total) * 100, 2) or 0
|
||||
output = output .. " " .. block .. " " .. absorb .. " " .. rel
|
||||
if #aura_env.melee == aura_env.lines then
|
||||
table.remove(aura_env.melee, 1)
|
||||
table.insert(aura_env.melee, output)
|
||||
else
|
||||
table.insert(aura_env.melee, output)
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local meleeT, blockT, absorbT, perT = "", "", "", ""
|
||||
local melee, block, absorb, per = 0, 0, 0, 0
|
||||
for i = #aura_env.melee, 1, -1 do
|
||||
melee = aura_env.melee[i]:match("(%d+)")
|
||||
if melee then
|
||||
melee = tonumber(melee)
|
||||
block = aura_env.melee[i]:match("%d+ (%d+)") or 0
|
||||
block = tonumber(block)
|
||||
absorb = aura_env.melee[i]:match("%d+ %d+ (%d+)") or 0
|
||||
absorb = tonumber(absorb)
|
||||
if block or absorb then
|
||||
per = aura_env.melee[i]:match("%d+ %d+ %d+ (%d+%.?%d*)") or 0
|
||||
per = tonumber(per)
|
||||
end
|
||||
meleeT = meleeT .. aura_env.shorten(melee) .. "\n"
|
||||
blockT = blockT .. aura_env.shorten(block) .. "\n"
|
||||
absorbT = absorbT .. aura_env.shorten(absorb) .. "\n"
|
||||
perT = perT .. aura_env.shorten(per) .. "\n"
|
||||
end
|
||||
end
|
||||
aura_env.region.melee:SetText(meleeT)
|
||||
aura_env.region.block:SetText(blockT)
|
||||
aura_env.region.absorb:SetText(absorbT)
|
||||
aura_env.region.percentage:SetText(perT)
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.lines = 10
|
||||
|
||||
----------------------------------------
|
||||
-- PLEASE DO NOT EDIT BELOW THIS LINE --
|
||||
----------------------------------------
|
||||
local fontsize = select(2, aura_env.region.text:GetFont())
|
||||
aura_env.region:SetWidth(fontsize * 20)
|
||||
aura_env.region:SetHeight(fontsize * aura_env.lines)
|
||||
aura_env.melee = {""}
|
||||
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
|
||||
if not aura_env.region.melee then
|
||||
local melee = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.melee = melee
|
||||
end
|
||||
aura_env.region.melee:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.melee:SetTextColor(1, 1, 1)
|
||||
aura_env.region.melee:SetPoint("CENTER", aura_env.region, "CENTER", -fontsize * 7.5, 0)
|
||||
aura_env.region.melee:SetWidth(fontsize * 5)
|
||||
aura_env.region.melee:SetJustifyH("LEFT")
|
||||
aura_env.region.melee:SetText("")
|
||||
aura_env.region.melee:Show()
|
||||
|
||||
if not aura_env.region.block then
|
||||
local block = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.block = block
|
||||
end
|
||||
aura_env.region.block:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.block:SetTextColor(0.75, 0.23, 0.23)
|
||||
aura_env.region.block:SetPoint("CENTER", aura_env.region, "CENTER", -fontsize * 2.5, 0)
|
||||
aura_env.region.block:SetWidth(fontsize * 5)
|
||||
aura_env.region.block:SetJustifyH("LEFT")
|
||||
aura_env.region.block:SetText("")
|
||||
aura_env.region.block:Show()
|
||||
|
||||
if not aura_env.region.absorb then
|
||||
local absorb = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.absorb = absorb
|
||||
end
|
||||
aura_env.region.absorb:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.absorb:SetTextColor(0.1227, 0.4089, 0.65)
|
||||
aura_env.region.absorb:SetPoint("CENTER", aura_env.region, "CENTER", fontsize * 2.5, 0)
|
||||
aura_env.region.absorb:SetWidth(fontsize * 5)
|
||||
aura_env.region.absorb:SetJustifyH("LEFT")
|
||||
aura_env.region.absorb:SetText("")
|
||||
aura_env.region.absorb:Show()
|
||||
|
||||
if not aura_env.region.percentage then
|
||||
local percentage = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.percentage = percentage
|
||||
end
|
||||
aura_env.region.percentage:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.percentage:SetTextColor(0.32, 0.32, 0.34)
|
||||
aura_env.region.percentage:SetPoint("CENTER", aura_env.region, "CENTER", fontsize * 7.5, 0)
|
||||
aura_env.region.percentage:SetWidth(fontsize * 5)
|
||||
aura_env.region.percentage:SetJustifyH("LEFT")
|
||||
aura_env.region.percentage:SetText("")
|
||||
aura_env.region.percentage:Show()
|
||||
|
||||
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
|
||||
@@ -1,89 +1,89 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local dest = select(6, ...)
|
||||
if dest == UnitName("player") then
|
||||
local name = select(14, ...)
|
||||
if name == "Shield Block" or name == "Ignore Pain" then
|
||||
local c1, c2, c3, c4 = "|cFFFFFFFF", "|cFFFFFFFF", "|cFFFFFFFF", "|cFFFFFFFF"
|
||||
local Avatar = GetSpellCooldown("Avatar")
|
||||
local AvatarD = select(2, GetSpellCooldown("Avatar"))
|
||||
local LastStand = GetSpellCooldown("Last Stand")
|
||||
local ShieldWall = GetSpellCooldown("Shield Wall")
|
||||
local DemoralizingShout = GetSpellCooldown("Demoralizing Shout")
|
||||
local DemoralizingShoutD = select(2, GetSpellCooldown("Demoralizing Shout"))
|
||||
if Avatar > 0 and AvatarD > 2 then
|
||||
if name == "Shield Block" then
|
||||
aura_env.AvatarCD = aura_env.AvatarCD + 3
|
||||
else
|
||||
aura_env.AvatarCD = aura_env.AvatarCD + 4
|
||||
end
|
||||
end
|
||||
if LastStand > 0 then
|
||||
if name == "Shield Block" then
|
||||
aura_env.LastStandCD = aura_env.LastStandCD + 3
|
||||
else
|
||||
aura_env.LastStandCD = aura_env.LastStandCD + 4
|
||||
end
|
||||
end
|
||||
if ShieldWall > 0 then
|
||||
if name == "Shield Block" then
|
||||
aura_env.ShieldWallCD = aura_env.ShieldWallCD + 3
|
||||
else
|
||||
aura_env.ShieldWallCD = aura_env.ShieldWallCD + 4
|
||||
end
|
||||
end
|
||||
if DemoralizingShout > 0 and DemoralizingShoutD > 2 then
|
||||
if name == "Shield Block" then
|
||||
aura_env.DemoralizingShoutCD = aura_env.DemoralizingShoutCD + 3
|
||||
else
|
||||
aura_env.DemoralizingShoutCD = aura_env.DemoralizingShoutCD + 4
|
||||
end
|
||||
end
|
||||
if AvatarD < 2 then c1 = "|cFF0080FF" end
|
||||
if LastStand == 0 then c2 = "|cFF0080FF" end
|
||||
if ShieldWall == 0 then c3 = "|cFF0080FF" end
|
||||
if DemoralizingShoutD < 2 then c4 = "|cFF0080FF" end
|
||||
aura_env.region.text2:SetText(c1 .. aura_env.AvatarCD .. "|r\n" .. c2 .. aura_env.LastStandCD .. "|r\n" .. c3 .. aura_env.ShieldWallCD .. "|r\n" .. c4 .. aura_env.DemoralizingShoutCD .. "|r")
|
||||
elseif name == "Avatar" then
|
||||
aura_env.AvatarCD = 0
|
||||
elseif name == "Last Stand" then
|
||||
aura_env.LastStandCD = 0
|
||||
elseif name == "Shield Wall" then
|
||||
aura_env.ShieldWallCD = 0
|
||||
elseif name == "Demoralizing Shout" then
|
||||
aura_env.DemoralizingShoutCD = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.AvatarCD, aura_env.LastStandCD, aura_env.ShieldWallCD, aura_env.DemoralizingShoutCD = 0, 0, 0, 0
|
||||
local fontsize = 16
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region:SetWidth(128)
|
||||
aura_env.region.text:SetFont(font, size, flags)
|
||||
aura_env.region.text:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.text:SetJustifyH("LEFT")
|
||||
aura_env.region.text:SetText("Avatar\nLast Stand\nShield Wall\nDemoralizing Shout")
|
||||
aura_env.region.text:Show()
|
||||
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text2:SetPoint("RIGHT", aura_env.region, "RIGHT", 128, 0)
|
||||
aura_env.region.text2:SetJustifyH("LEFT")
|
||||
aura_env.region.text2:SetText("0" .. "\n" .. "0" .. "\n" .. "0" .. "\n" .. "0")
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local dest = select(6, ...)
|
||||
if dest == UnitName("player") then
|
||||
local name = select(14, ...)
|
||||
if name == "Shield Block" or name == "Ignore Pain" then
|
||||
local c1, c2, c3, c4 = "|cFFFFFFFF", "|cFFFFFFFF", "|cFFFFFFFF", "|cFFFFFFFF"
|
||||
local Avatar = GetSpellCooldown("Avatar")
|
||||
local AvatarD = select(2, GetSpellCooldown("Avatar"))
|
||||
local LastStand = GetSpellCooldown("Last Stand")
|
||||
local ShieldWall = GetSpellCooldown("Shield Wall")
|
||||
local DemoralizingShout = GetSpellCooldown("Demoralizing Shout")
|
||||
local DemoralizingShoutD = select(2, GetSpellCooldown("Demoralizing Shout"))
|
||||
if Avatar > 0 and AvatarD > 2 then
|
||||
if name == "Shield Block" then
|
||||
aura_env.AvatarCD = aura_env.AvatarCD + 3
|
||||
else
|
||||
aura_env.AvatarCD = aura_env.AvatarCD + 4
|
||||
end
|
||||
end
|
||||
if LastStand > 0 then
|
||||
if name == "Shield Block" then
|
||||
aura_env.LastStandCD = aura_env.LastStandCD + 3
|
||||
else
|
||||
aura_env.LastStandCD = aura_env.LastStandCD + 4
|
||||
end
|
||||
end
|
||||
if ShieldWall > 0 then
|
||||
if name == "Shield Block" then
|
||||
aura_env.ShieldWallCD = aura_env.ShieldWallCD + 3
|
||||
else
|
||||
aura_env.ShieldWallCD = aura_env.ShieldWallCD + 4
|
||||
end
|
||||
end
|
||||
if DemoralizingShout > 0 and DemoralizingShoutD > 2 then
|
||||
if name == "Shield Block" then
|
||||
aura_env.DemoralizingShoutCD = aura_env.DemoralizingShoutCD + 3
|
||||
else
|
||||
aura_env.DemoralizingShoutCD = aura_env.DemoralizingShoutCD + 4
|
||||
end
|
||||
end
|
||||
if AvatarD < 2 then c1 = "|cFF0080FF" end
|
||||
if LastStand == 0 then c2 = "|cFF0080FF" end
|
||||
if ShieldWall == 0 then c3 = "|cFF0080FF" end
|
||||
if DemoralizingShoutD < 2 then c4 = "|cFF0080FF" end
|
||||
aura_env.region.text2:SetText(c1 .. aura_env.AvatarCD .. "|r\n" .. c2 .. aura_env.LastStandCD .. "|r\n" .. c3 .. aura_env.ShieldWallCD .. "|r\n" .. c4 .. aura_env.DemoralizingShoutCD .. "|r")
|
||||
elseif name == "Avatar" then
|
||||
aura_env.AvatarCD = 0
|
||||
elseif name == "Last Stand" then
|
||||
aura_env.LastStandCD = 0
|
||||
elseif name == "Shield Wall" then
|
||||
aura_env.ShieldWallCD = 0
|
||||
elseif name == "Demoralizing Shout" then
|
||||
aura_env.DemoralizingShoutCD = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.AvatarCD, aura_env.LastStandCD, aura_env.ShieldWallCD, aura_env.DemoralizingShoutCD = 0, 0, 0, 0
|
||||
local fontsize = 16
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region:SetWidth(128)
|
||||
aura_env.region.text:SetFont(font, size, flags)
|
||||
aura_env.region.text:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.text:SetJustifyH("LEFT")
|
||||
aura_env.region.text:SetText("Avatar\nLast Stand\nShield Wall\nDemoralizing Shout")
|
||||
aura_env.region.text:Show()
|
||||
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text2:SetPoint("RIGHT", aura_env.region, "RIGHT", 128, 0)
|
||||
aura_env.region.text2:SetJustifyH("LEFT")
|
||||
aura_env.region.text2:SetText("0" .. "\n" .. "0" .. "\n" .. "0" .. "\n" .. "0")
|
||||
aura_env.region.text2:Show()
|
||||
@@ -1,50 +1,50 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local caster = select(6, ...)
|
||||
if caster == UnitName("player") then
|
||||
local name = select(14, ...)
|
||||
if name == "Rampage" then
|
||||
local c1 = "|cFFFFFFFF"
|
||||
local Recklessness = GetSpellCooldown("Recklessness")
|
||||
local RecklessnessD = select(2, GetSpellCooldown("Recklessness"))
|
||||
if Recklessness > 0 and RecklessnessD > 2 then
|
||||
aura_env.RecklessnessCD = aura_env.RecklessnessCD + 3.75
|
||||
end
|
||||
if RecklessnessD < 2 then c1 = "|cFF0080FF" end
|
||||
aura_env.region.text2:SetText(c1 .. aura_env.RecklessnessCD .. "|r")
|
||||
elseif name == "Recklessness" then
|
||||
aura_env.RecklessnessCD = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.RecklessnessCD = 0
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region:SetWidth(128)
|
||||
aura_env.region.text:SetFont(font, size, flags)
|
||||
aura_env.region.text:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.text:SetJustifyH("LEFT")
|
||||
aura_env.region.text:SetText("Recklessness")
|
||||
aura_env.region.text:Show()
|
||||
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text2:SetPoint("RIGHT", aura_env.region, "RIGHT", 128, 0)
|
||||
aura_env.region.text2:SetJustifyH("LEFT")
|
||||
aura_env.region.text2:SetText("0")
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local caster = select(6, ...)
|
||||
if caster == UnitName("player") then
|
||||
local name = select(14, ...)
|
||||
if name == "Rampage" then
|
||||
local c1 = "|cFFFFFFFF"
|
||||
local Recklessness = GetSpellCooldown("Recklessness")
|
||||
local RecklessnessD = select(2, GetSpellCooldown("Recklessness"))
|
||||
if Recklessness > 0 and RecklessnessD > 2 then
|
||||
aura_env.RecklessnessCD = aura_env.RecklessnessCD + 3.75
|
||||
end
|
||||
if RecklessnessD < 2 then c1 = "|cFF0080FF" end
|
||||
aura_env.region.text2:SetText(c1 .. aura_env.RecklessnessCD .. "|r")
|
||||
elseif name == "Recklessness" then
|
||||
aura_env.RecklessnessCD = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.RecklessnessCD = 0
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region:SetWidth(128)
|
||||
aura_env.region.text:SetFont(font, size, flags)
|
||||
aura_env.region.text:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.text:SetJustifyH("LEFT")
|
||||
aura_env.region.text:SetText("Recklessness")
|
||||
aura_env.region.text:Show()
|
||||
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text2:SetPoint("RIGHT", aura_env.region, "RIGHT", 128, 0)
|
||||
aura_env.region.text2:SetJustifyH("LEFT")
|
||||
aura_env.region.text2:SetText("0")
|
||||
aura_env.region.text2:Show()
|
||||
@@ -1,15 +1,15 @@
|
||||
/click ChatFrame1Tab RightButton
|
||||
DropDownList1Button4
|
||||
|
||||
|
||||
/click ChatFrame3Tab RightButton
|
||||
/click DropDownList1Button10
|
||||
/click ChatConfigChatSettingsLeftCheckBox2Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox4Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox12Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox13Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox14Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox15Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox16Check
|
||||
|
||||
/click ChatFrame1Tab RightButton
|
||||
DropDownList1Button4
|
||||
|
||||
|
||||
/click ChatFrame3Tab RightButton
|
||||
/click DropDownList1Button10
|
||||
/click ChatConfigChatSettingsLeftCheckBox2Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox4Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox12Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox13Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox14Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox15Check
|
||||
/click ChatConfigChatSettingsLeftCheckBox16Check
|
||||
|
||||
/run local c="ChatConfigChatSettingsLeftCheckBox2Check";c:Click();c=c:gsub("%d","4");c:Click();for i=12,14 do c=c:gsub("%d", i); c:Click() end --no work
|
||||
@@ -1,20 +1,20 @@
|
||||
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED UPDATE
|
||||
function(e)
|
||||
if e == "PLAYER_REGEN_DISABLED" then
|
||||
if not aura_env.seconds then aura_env.seconds = 0 end
|
||||
if not aura_env.minutes then aura_env.minutes = 0 end
|
||||
local aura_env = aura_env
|
||||
aura_env.ticker = C_Timer.NewTicker(1, function() aura_env.seconds = aura_env.seconds + 1; if aura_env.seconds > 59 then aura_env.seconds = 0; aura_env.minutes = aura_env.minutes + 1 end; WeakAuras.ScanEvents("UPDATE") end)
|
||||
return true
|
||||
elseif e == "PLAYER_REGEN_ENABLED" then
|
||||
aura_env.minutes = 0; aura_env.seconds = 0
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
elseif e == "UPDATE" then return true end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.seconds and aura_env.minutes then
|
||||
return aura_env.minutes .. ":" .. aura_env.seconds
|
||||
end
|
||||
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED UPDATE
|
||||
function(e)
|
||||
if e == "PLAYER_REGEN_DISABLED" then
|
||||
if not aura_env.seconds then aura_env.seconds = 0 end
|
||||
if not aura_env.minutes then aura_env.minutes = 0 end
|
||||
local aura_env = aura_env
|
||||
aura_env.ticker = C_Timer.NewTicker(1, function() aura_env.seconds = aura_env.seconds + 1; if aura_env.seconds > 59 then aura_env.seconds = 0; aura_env.minutes = aura_env.minutes + 1 end; WeakAuras.ScanEvents("UPDATE") end)
|
||||
return true
|
||||
elseif e == "PLAYER_REGEN_ENABLED" then
|
||||
aura_env.minutes = 0; aura_env.seconds = 0
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
elseif e == "UPDATE" then return true end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.seconds and aura_env.minutes then
|
||||
return aura_env.minutes .. ":" .. aura_env.seconds
|
||||
end
|
||||
end
|
||||
@@ -1,27 +1,27 @@
|
||||
--ANIMATION
|
||||
function()
|
||||
if GetSpellCooldown("Memory of Lucid Dreams") then
|
||||
local start, dur = GetSpellCooldown("Memory of Lucid Dreams")
|
||||
local remcd = start + dur - GetTime()
|
||||
if remcd > 0 then
|
||||
remcd = 1 - aura_env.range(remcd, 0, 120, 1)
|
||||
return aura_env.grad(remcd)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
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
|
||||
--ANIMATION
|
||||
function()
|
||||
if GetSpellCooldown("Memory of Lucid Dreams") then
|
||||
local start, dur = GetSpellCooldown("Memory of Lucid Dreams")
|
||||
local remcd = start + dur - GetTime()
|
||||
if remcd > 0 then
|
||||
remcd = 1 - aura_env.range(remcd, 0, 120, 1)
|
||||
return aura_env.grad(remcd)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
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
|
||||
@@ -1,17 +1,17 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if name == "Deepcoral Bud" then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if name == "Deepcoral Bud" then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if name == "Deepcoral Bud" then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if name == "Deepcoral Bud" then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,19 +1,19 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(e, ...)
|
||||
local se = select(2, ...)
|
||||
if se == "SWING_MISSED" or se == "SPELL_MISSED" then
|
||||
local target = select(9, ...)
|
||||
local misstype = select(12, ...)
|
||||
if misstype == "DODGE" and target == UnitName("player") then
|
||||
if not aura_env.dodg then aura_env.dodg = 0 end
|
||||
aura_env.dodg = aura_env.dodg + 1
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if not aura_env.dodg then aura_env.dodg = 0 end
|
||||
return aura_env.dodg
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(e, ...)
|
||||
local se = select(2, ...)
|
||||
if se == "SWING_MISSED" or se == "SPELL_MISSED" then
|
||||
local target = select(9, ...)
|
||||
local misstype = select(12, ...)
|
||||
if misstype == "DODGE" and target == UnitName("player") then
|
||||
if not aura_env.dodg then aura_env.dodg = 0 end
|
||||
aura_env.dodg = aura_env.dodg + 1
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if not aura_env.dodg then aura_env.dodg = 0 end
|
||||
return aura_env.dodg
|
||||
end
|
||||
@@ -1,40 +1,40 @@
|
||||
--CLEU
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "PARTY_KILL" then
|
||||
local name = select(10, ...)
|
||||
if aura_env.mobs[name] then
|
||||
Garbage.baqcrap.count = Garbage.baqcrap.count + aura_env.mobs[name]
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return Garbage.baqcrap.count .. "%"
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not Garbage.baqcrap then Garbage.baqcrap = {} end
|
||||
if not Garbage.baqcrap.count then Garbage.baqcrap.count = 0 end
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Tidemistress Ethendriss"] = 3,
|
||||
["Shirakess Starseeker"] = 1.2,
|
||||
["Azsh'ari Siegemistress"] = 0.9,
|
||||
["Shirakess Voidtwister"] = 0.7,
|
||||
["Shadowbinder Athissa"] = 0.6,
|
||||
["Azsh'ari Invoker"] = 0.5,
|
||||
["Shirakess Apprentice"] = 0.5,
|
||||
["Shirakess Overseer"] = 0.5,
|
||||
["Incantatrix Vazina"] = 0.5,
|
||||
["Lady Naz'jess"] = 0.5,
|
||||
["Herald of the Queen"] = 0.5,
|
||||
["Shirakess Apprentice"] = 0.4,
|
||||
["Azsh'ari Stormsurger"] = 0.3,
|
||||
["Azsh'ari Stormsurger"] = 0.3,
|
||||
["Theurgist Nitara"] = 0.2,
|
||||
["Azsh'ari Oracle"] = 0.13,
|
||||
["Tidebinder Sarjezi"] = 0.09,
|
||||
--CLEU
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "PARTY_KILL" then
|
||||
local name = select(10, ...)
|
||||
if aura_env.mobs[name] then
|
||||
Garbage.baqcrap.count = Garbage.baqcrap.count + aura_env.mobs[name]
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return Garbage.baqcrap.count .. "%"
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not Garbage.baqcrap then Garbage.baqcrap = {} end
|
||||
if not Garbage.baqcrap.count then Garbage.baqcrap.count = 0 end
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Tidemistress Ethendriss"] = 3,
|
||||
["Shirakess Starseeker"] = 1.2,
|
||||
["Azsh'ari Siegemistress"] = 0.9,
|
||||
["Shirakess Voidtwister"] = 0.7,
|
||||
["Shadowbinder Athissa"] = 0.6,
|
||||
["Azsh'ari Invoker"] = 0.5,
|
||||
["Shirakess Apprentice"] = 0.5,
|
||||
["Shirakess Overseer"] = 0.5,
|
||||
["Incantatrix Vazina"] = 0.5,
|
||||
["Lady Naz'jess"] = 0.5,
|
||||
["Herald of the Queen"] = 0.5,
|
||||
["Shirakess Apprentice"] = 0.4,
|
||||
["Azsh'ari Stormsurger"] = 0.3,
|
||||
["Azsh'ari Stormsurger"] = 0.3,
|
||||
["Theurgist Nitara"] = 0.2,
|
||||
["Azsh'ari Oracle"] = 0.13,
|
||||
["Tidebinder Sarjezi"] = 0.09,
|
||||
}
|
||||
@@ -1,40 +1,40 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
--handle death exception
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Tidemistress Ethendriss"] = 3,
|
||||
["Shirakess Starseeker"] = 1.2,
|
||||
["Azsh'ari Siegemistress"] = 0.9,
|
||||
["Shirakess Voidtwister"] = 0.7,
|
||||
["Shadowbinder Athissa"] = 0.6,
|
||||
["Azsh'ari Invoker"] = 0.5,
|
||||
["Shirakess Apprentice"] = 0.5,
|
||||
["Shirakess Overseer"] = 0.5,
|
||||
["Incantatrix Vazina"] = 0.5,
|
||||
["Lady Naz'jess"] = 0.5,
|
||||
["Herald of the Queen"] = 0.5,
|
||||
["Shirakess Apprentice"] = 0.4,
|
||||
["Azsh'ari Stormsurger"] = 0.3,
|
||||
["Azsh'ari Stormsurger"] = 0.3,
|
||||
["Theurgist Nitara"] = 0.2,
|
||||
["Azsh'ari Oracle"] = 0.13,
|
||||
["Tidebinder Sarjezi"] = 0.09,
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
--handle death exception
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Tidemistress Ethendriss"] = 3,
|
||||
["Shirakess Starseeker"] = 1.2,
|
||||
["Azsh'ari Siegemistress"] = 0.9,
|
||||
["Shirakess Voidtwister"] = 0.7,
|
||||
["Shadowbinder Athissa"] = 0.6,
|
||||
["Azsh'ari Invoker"] = 0.5,
|
||||
["Shirakess Apprentice"] = 0.5,
|
||||
["Shirakess Overseer"] = 0.5,
|
||||
["Incantatrix Vazina"] = 0.5,
|
||||
["Lady Naz'jess"] = 0.5,
|
||||
["Herald of the Queen"] = 0.5,
|
||||
["Shirakess Apprentice"] = 0.4,
|
||||
["Azsh'ari Stormsurger"] = 0.3,
|
||||
["Azsh'ari Stormsurger"] = 0.3,
|
||||
["Theurgist Nitara"] = 0.2,
|
||||
["Azsh'ari Oracle"] = 0.13,
|
||||
["Tidebinder Sarjezi"] = 0.09,
|
||||
}
|
||||
@@ -1,51 +1,51 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
--handle death exception
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Start(nameplate, {0,1,0,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Barnacled Reefwalker"] = 1.6,
|
||||
["Gloomchasm Reefwalker"] = 1.4,
|
||||
["Whitewave Reefwalker"] = 1.2,
|
||||
["Staghorn Reefwalker"] = 1.2,
|
||||
["Deep Reefwalker"] = 1.2,
|
||||
["Sunbleached Reefwalker"] = 1,
|
||||
["Kelpwillow"] = 1,
|
||||
["Anemonar"] = 0.9,
|
||||
["Seashelf Reefwalker"] = 0.8,
|
||||
["Murkbloom Reefwalker"] = 0.7,
|
||||
["Oronu"] = 0.6,
|
||||
["Urduu"] = 0.6,
|
||||
["Emorneth"] = 0.5,
|
||||
["Sandclaw Stoneshell"] = 6,
|
||||
["Chitterspine Ambusher"] = 0.8,
|
||||
["Chitterspine Crab"] = 0.5,
|
||||
["Chitterspine Lurker"] = 0.5,
|
||||
["Iridescent Glimmershell"] = 0.5,
|
||||
["Needlespine"] = 0.5,
|
||||
["Chitterspine Encroacher"] = 0.4,
|
||||
["Glimmershell Crab"] = 0.4,
|
||||
["Sandclaw Crab"] = 0.4,
|
||||
["Chitterspine Ambusher"] = 0.4,
|
||||
["Crackleclaw Crab"] = 0.3,
|
||||
["Glimmershell Hulk"] = 0.3,
|
||||
["Chitterspine Crab"] = 0.3,
|
||||
["Braxicus"] = 0.3,
|
||||
["Chitterspine Guillotine"] = 0.16,
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
--handle death exception
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Start(nameplate, {0,1,0,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Barnacled Reefwalker"] = 1.6,
|
||||
["Gloomchasm Reefwalker"] = 1.4,
|
||||
["Whitewave Reefwalker"] = 1.2,
|
||||
["Staghorn Reefwalker"] = 1.2,
|
||||
["Deep Reefwalker"] = 1.2,
|
||||
["Sunbleached Reefwalker"] = 1,
|
||||
["Kelpwillow"] = 1,
|
||||
["Anemonar"] = 0.9,
|
||||
["Seashelf Reefwalker"] = 0.8,
|
||||
["Murkbloom Reefwalker"] = 0.7,
|
||||
["Oronu"] = 0.6,
|
||||
["Urduu"] = 0.6,
|
||||
["Emorneth"] = 0.5,
|
||||
["Sandclaw Stoneshell"] = 6,
|
||||
["Chitterspine Ambusher"] = 0.8,
|
||||
["Chitterspine Crab"] = 0.5,
|
||||
["Chitterspine Lurker"] = 0.5,
|
||||
["Iridescent Glimmershell"] = 0.5,
|
||||
["Needlespine"] = 0.5,
|
||||
["Chitterspine Encroacher"] = 0.4,
|
||||
["Glimmershell Crab"] = 0.4,
|
||||
["Sandclaw Crab"] = 0.4,
|
||||
["Chitterspine Ambusher"] = 0.4,
|
||||
["Crackleclaw Crab"] = 0.3,
|
||||
["Glimmershell Hulk"] = 0.3,
|
||||
["Chitterspine Crab"] = 0.3,
|
||||
["Braxicus"] = 0.3,
|
||||
["Chitterspine Guillotine"] = 0.16,
|
||||
}
|
||||
@@ -1,51 +1,51 @@
|
||||
--CLEU
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "PARTY_KILL" then
|
||||
local name = select(10, ...)
|
||||
if aura_env.mobs[name] then
|
||||
Garbage.baqcrap.count3 = Garbage.baqcrap.count3 + aura_env.mobs[name]
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return Garbage.baqcrap.count3 .. "%"
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not Garbage.baqcrap then Garbage.baqcrap = {} end
|
||||
if not Garbage.baqcrap.count3 then Garbage.baqcrap.count3 = 0 end
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Barnacled Reefwalker"] = 1.6,
|
||||
["Gloomchasm Reefwalker"] = 1.4,
|
||||
["Whitewave Reefwalker"] = 1.2,
|
||||
["Staghorn Reefwalker"] = 1.2,
|
||||
["Deep Reefwalker"] = 1.2,
|
||||
["Sunbleached Reefwalker"] = 1,
|
||||
["Kelpwillow"] = 1,
|
||||
["Anemonar"] = 0.9,
|
||||
["Seashelf Reefwalker"] = 0.8,
|
||||
["Murkbloom Reefwalker"] = 0.7,
|
||||
["Oronu"] = 0.6,
|
||||
["Urduu"] = 0.6,
|
||||
["Emorneth"] = 0.5,
|
||||
["Sandclaw Stoneshell"] = 6,
|
||||
["Chitterspine Ambusher"] = 0.8,
|
||||
["Chitterspine Crab"] = 0.5,
|
||||
["Chitterspine Lurker"] = 0.5,
|
||||
["Iridescent Glimmershell"] = 0.5,
|
||||
["Needlespine"] = 0.5,
|
||||
["Chitterspine Encroacher"] = 0.4,
|
||||
["Glimmershell Crab"] = 0.4,
|
||||
["Sandclaw Crab"] = 0.4,
|
||||
["Chitterspine Ambusher"] = 0.4,
|
||||
["Crackleclaw Crab"] = 0.3,
|
||||
["Glimmershell Hulk"] = 0.3,
|
||||
["Chitterspine Crab"] = 0.3,
|
||||
["Braxicus"] = 0.3,
|
||||
["Chitterspine Guillotine"] = 0.16,
|
||||
--CLEU
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "PARTY_KILL" then
|
||||
local name = select(10, ...)
|
||||
if aura_env.mobs[name] then
|
||||
Garbage.baqcrap.count3 = Garbage.baqcrap.count3 + aura_env.mobs[name]
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return Garbage.baqcrap.count3 .. "%"
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not Garbage.baqcrap then Garbage.baqcrap = {} end
|
||||
if not Garbage.baqcrap.count3 then Garbage.baqcrap.count3 = 0 end
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Barnacled Reefwalker"] = 1.6,
|
||||
["Gloomchasm Reefwalker"] = 1.4,
|
||||
["Whitewave Reefwalker"] = 1.2,
|
||||
["Staghorn Reefwalker"] = 1.2,
|
||||
["Deep Reefwalker"] = 1.2,
|
||||
["Sunbleached Reefwalker"] = 1,
|
||||
["Kelpwillow"] = 1,
|
||||
["Anemonar"] = 0.9,
|
||||
["Seashelf Reefwalker"] = 0.8,
|
||||
["Murkbloom Reefwalker"] = 0.7,
|
||||
["Oronu"] = 0.6,
|
||||
["Urduu"] = 0.6,
|
||||
["Emorneth"] = 0.5,
|
||||
["Sandclaw Stoneshell"] = 6,
|
||||
["Chitterspine Ambusher"] = 0.8,
|
||||
["Chitterspine Crab"] = 0.5,
|
||||
["Chitterspine Lurker"] = 0.5,
|
||||
["Iridescent Glimmershell"] = 0.5,
|
||||
["Needlespine"] = 0.5,
|
||||
["Chitterspine Encroacher"] = 0.4,
|
||||
["Glimmershell Crab"] = 0.4,
|
||||
["Sandclaw Crab"] = 0.4,
|
||||
["Chitterspine Ambusher"] = 0.4,
|
||||
["Crackleclaw Crab"] = 0.3,
|
||||
["Glimmershell Hulk"] = 0.3,
|
||||
["Chitterspine Crab"] = 0.3,
|
||||
["Braxicus"] = 0.3,
|
||||
["Chitterspine Guillotine"] = 0.16,
|
||||
}
|
||||
@@ -1,80 +1,80 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
--handle death exception
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Start(nameplate, {0,0,1,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Herald of Salgos"] = 33,
|
||||
["Spawn of Salgos"] = 33,
|
||||
["Osgen"] = 30,
|
||||
["Ungormath"] = 30,
|
||||
["Burning Amalgamation"] = 29,
|
||||
["Moghiea"] = 29,
|
||||
["Salgos the Eternal"] = 28,
|
||||
["Zomera"] = 27,
|
||||
["Arcane Amalgamation"] = 25,
|
||||
["Xue"] = 25,
|
||||
["Aldrantiss"] = 22,
|
||||
["Watery Amalgamation"] = 22,
|
||||
["Dusty Amalgamation"] = 22,
|
||||
["Alzana"] = 21,
|
||||
["Vyz'olgo the Mind-Taker"] = 20,
|
||||
["Qalina"] = 19,
|
||||
["Omus"] = 19,
|
||||
["Voice in the Deeps"] = 13,
|
||||
["King Gakula"] = 11,
|
||||
["Chasm-Haunter"] = 11,
|
||||
["Scale Matriarch Vynara"] = 11,
|
||||
["Anemonar"] = 10,
|
||||
["Sandcastle"] = 9,
|
||||
["Shiz'narasz the Consumer"] = 9,
|
||||
["Toxigore the Alpha"] = 9,
|
||||
["Needlespine"] = 9,
|
||||
["Siltstalker the Packmother"] = 9,
|
||||
["Urduu"] = 9,
|
||||
["Tidemistress Leth'sindra"] = 9,
|
||||
["Banescale the Packfather"] = 9,
|
||||
["Sandclaw Stoneshell"] = 8,
|
||||
["Garnetscale"] = 8,
|
||||
["Allseer Oma'kil"] = 8,
|
||||
["Vor'koth"] = 8,
|
||||
["Elder Unu"] = 8,
|
||||
["Caverndark Terror"] = 8,
|
||||
["Blindlight"] = 8,
|
||||
["Shassera"] = 8,
|
||||
["Soundless"] = 8,
|
||||
["Scale Matriarch Gratinax"] = 8,
|
||||
["Tidelord Aquatus"] = 8,
|
||||
["Tidelord Dispersius"] = 8,
|
||||
["Carnivorous Lasher"] = 7,
|
||||
["Mirecrawler"] = 7,
|
||||
["Daggertooth Terror"] = 7,
|
||||
["Amethyst Spireshell"] = 7,
|
||||
["Prince Typhonus"] = 7,
|
||||
["Alga the Eyeless"] = 7,
|
||||
["Prince Vortran"] = 7,
|
||||
["Kelpwillow"] = 7,
|
||||
["Deepglider"] = 7,
|
||||
["Scale Matriarch Zodia"] = 7,
|
||||
["Rockweed Shambler"] = 7,
|
||||
["Avarius"] = 6,
|
||||
["Iridescent Glimmershell"] = 6,
|
||||
["Oronu"] = 6,
|
||||
["Elderspawn Nalaada"] = 5,
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(e, unit)
|
||||
--handle death exception
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Start(nameplate, {0,0,1,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(unit) or ""
|
||||
if aura_env.mobs[name] then
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Herald of Salgos"] = 33,
|
||||
["Spawn of Salgos"] = 33,
|
||||
["Osgen"] = 30,
|
||||
["Ungormath"] = 30,
|
||||
["Burning Amalgamation"] = 29,
|
||||
["Moghiea"] = 29,
|
||||
["Salgos the Eternal"] = 28,
|
||||
["Zomera"] = 27,
|
||||
["Arcane Amalgamation"] = 25,
|
||||
["Xue"] = 25,
|
||||
["Aldrantiss"] = 22,
|
||||
["Watery Amalgamation"] = 22,
|
||||
["Dusty Amalgamation"] = 22,
|
||||
["Alzana"] = 21,
|
||||
["Vyz'olgo the Mind-Taker"] = 20,
|
||||
["Qalina"] = 19,
|
||||
["Omus"] = 19,
|
||||
["Voice in the Deeps"] = 13,
|
||||
["King Gakula"] = 11,
|
||||
["Chasm-Haunter"] = 11,
|
||||
["Scale Matriarch Vynara"] = 11,
|
||||
["Anemonar"] = 10,
|
||||
["Sandcastle"] = 9,
|
||||
["Shiz'narasz the Consumer"] = 9,
|
||||
["Toxigore the Alpha"] = 9,
|
||||
["Needlespine"] = 9,
|
||||
["Siltstalker the Packmother"] = 9,
|
||||
["Urduu"] = 9,
|
||||
["Tidemistress Leth'sindra"] = 9,
|
||||
["Banescale the Packfather"] = 9,
|
||||
["Sandclaw Stoneshell"] = 8,
|
||||
["Garnetscale"] = 8,
|
||||
["Allseer Oma'kil"] = 8,
|
||||
["Vor'koth"] = 8,
|
||||
["Elder Unu"] = 8,
|
||||
["Caverndark Terror"] = 8,
|
||||
["Blindlight"] = 8,
|
||||
["Shassera"] = 8,
|
||||
["Soundless"] = 8,
|
||||
["Scale Matriarch Gratinax"] = 8,
|
||||
["Tidelord Aquatus"] = 8,
|
||||
["Tidelord Dispersius"] = 8,
|
||||
["Carnivorous Lasher"] = 7,
|
||||
["Mirecrawler"] = 7,
|
||||
["Daggertooth Terror"] = 7,
|
||||
["Amethyst Spireshell"] = 7,
|
||||
["Prince Typhonus"] = 7,
|
||||
["Alga the Eyeless"] = 7,
|
||||
["Prince Vortran"] = 7,
|
||||
["Kelpwillow"] = 7,
|
||||
["Deepglider"] = 7,
|
||||
["Scale Matriarch Zodia"] = 7,
|
||||
["Rockweed Shambler"] = 7,
|
||||
["Avarius"] = 6,
|
||||
["Iridescent Glimmershell"] = 6,
|
||||
["Oronu"] = 6,
|
||||
["Elderspawn Nalaada"] = 5,
|
||||
}
|
||||
@@ -1,80 +1,80 @@
|
||||
--CLEU
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "PARTY_KILL" then
|
||||
local name = select(10, ...)
|
||||
if aura_env.mobs[name] then
|
||||
Garbage.baqcrap.count2 = Garbage.baqcrap.count2 + aura_env.mobs[name]
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return Garbage.baqcrap.count2 .. "%"
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not Garbage.baqcrap then Garbage.baqcrap = {} end
|
||||
if not Garbage.baqcrap.count2 then Garbage.baqcrap.count2 = 0 end
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Herald of Salgos"] = 33,
|
||||
["Spawn of Salgos"] = 33,
|
||||
["Osgen"] = 30,
|
||||
["Ungormath"] = 30,
|
||||
["Burning Amalgamation"] = 29,
|
||||
["Moghiea"] = 29,
|
||||
["Salgos the Eternal"] = 28,
|
||||
["Zomera"] = 27,
|
||||
["Arcane Amalgamation"] = 25,
|
||||
["Xue"] = 25,
|
||||
["Aldrantiss"] = 22,
|
||||
["Watery Amalgamation"] = 22,
|
||||
["Dusty Amalgamation"] = 22,
|
||||
["Alzana"] = 21,
|
||||
["Vyz'olgo the Mind-Taker"] = 20,
|
||||
["Qalina"] = 19,
|
||||
["Omus"] = 19,
|
||||
["Voice in the Deeps"] = 13,
|
||||
["King Gakula"] = 11,
|
||||
["Chasm-Haunter"] = 11,
|
||||
["Scale Matriarch Vynara"] = 11,
|
||||
["Anemonar"] = 10,
|
||||
["Sandcastle"] = 9,
|
||||
["Shiz'narasz the Consumer"] = 9,
|
||||
["Toxigore the Alpha"] = 9,
|
||||
["Needlespine"] = 9,
|
||||
["Siltstalker the Packmother"] = 9,
|
||||
["Urduu"] = 9,
|
||||
["Tidemistress Leth'sindra"] = 9,
|
||||
["Banescale the Packfather"] = 9,
|
||||
["Sandclaw Stoneshell"] = 8,
|
||||
["Garnetscale"] = 8,
|
||||
["Allseer Oma'kil"] = 8,
|
||||
["Vor'koth"] = 8,
|
||||
["Elder Unu"] = 8,
|
||||
["Caverndark Terror"] = 8,
|
||||
["Blindlight"] = 8,
|
||||
["Shassera"] = 8,
|
||||
["Soundless"] = 8,
|
||||
["Scale Matriarch Gratinax"] = 8,
|
||||
["Tidelord Aquatus"] = 8,
|
||||
["Tidelord Dispersius"] = 8,
|
||||
["Carnivorous Lasher"] = 7,
|
||||
["Mirecrawler"] = 7,
|
||||
["Daggertooth Terror"] = 7,
|
||||
["Amethyst Spireshell"] = 7,
|
||||
["Prince Typhonus"] = 7,
|
||||
["Alga the Eyeless"] = 7,
|
||||
["Prince Vortran"] = 7,
|
||||
["Kelpwillow"] = 7,
|
||||
["Deepglider"] = 7,
|
||||
["Scale Matriarch Zodia"] = 7,
|
||||
["Rockweed Shambler"] = 7,
|
||||
["Avarius"] = 6,
|
||||
["Iridescent Glimmershell"] = 6,
|
||||
["Oronu"] = 6,
|
||||
["Elderspawn Nalaada"] = 5,
|
||||
--CLEU
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "PARTY_KILL" then
|
||||
local name = select(10, ...)
|
||||
if aura_env.mobs[name] then
|
||||
Garbage.baqcrap.count2 = Garbage.baqcrap.count2 + aura_env.mobs[name]
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return Garbage.baqcrap.count2 .. "%"
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not Garbage.baqcrap then Garbage.baqcrap = {} end
|
||||
if not Garbage.baqcrap.count2 then Garbage.baqcrap.count2 = 0 end
|
||||
aura_env.mobs =
|
||||
{
|
||||
["Herald of Salgos"] = 33,
|
||||
["Spawn of Salgos"] = 33,
|
||||
["Osgen"] = 30,
|
||||
["Ungormath"] = 30,
|
||||
["Burning Amalgamation"] = 29,
|
||||
["Moghiea"] = 29,
|
||||
["Salgos the Eternal"] = 28,
|
||||
["Zomera"] = 27,
|
||||
["Arcane Amalgamation"] = 25,
|
||||
["Xue"] = 25,
|
||||
["Aldrantiss"] = 22,
|
||||
["Watery Amalgamation"] = 22,
|
||||
["Dusty Amalgamation"] = 22,
|
||||
["Alzana"] = 21,
|
||||
["Vyz'olgo the Mind-Taker"] = 20,
|
||||
["Qalina"] = 19,
|
||||
["Omus"] = 19,
|
||||
["Voice in the Deeps"] = 13,
|
||||
["King Gakula"] = 11,
|
||||
["Chasm-Haunter"] = 11,
|
||||
["Scale Matriarch Vynara"] = 11,
|
||||
["Anemonar"] = 10,
|
||||
["Sandcastle"] = 9,
|
||||
["Shiz'narasz the Consumer"] = 9,
|
||||
["Toxigore the Alpha"] = 9,
|
||||
["Needlespine"] = 9,
|
||||
["Siltstalker the Packmother"] = 9,
|
||||
["Urduu"] = 9,
|
||||
["Tidemistress Leth'sindra"] = 9,
|
||||
["Banescale the Packfather"] = 9,
|
||||
["Sandclaw Stoneshell"] = 8,
|
||||
["Garnetscale"] = 8,
|
||||
["Allseer Oma'kil"] = 8,
|
||||
["Vor'koth"] = 8,
|
||||
["Elder Unu"] = 8,
|
||||
["Caverndark Terror"] = 8,
|
||||
["Blindlight"] = 8,
|
||||
["Shassera"] = 8,
|
||||
["Soundless"] = 8,
|
||||
["Scale Matriarch Gratinax"] = 8,
|
||||
["Tidelord Aquatus"] = 8,
|
||||
["Tidelord Dispersius"] = 8,
|
||||
["Carnivorous Lasher"] = 7,
|
||||
["Mirecrawler"] = 7,
|
||||
["Daggertooth Terror"] = 7,
|
||||
["Amethyst Spireshell"] = 7,
|
||||
["Prince Typhonus"] = 7,
|
||||
["Alga the Eyeless"] = 7,
|
||||
["Prince Vortran"] = 7,
|
||||
["Kelpwillow"] = 7,
|
||||
["Deepglider"] = 7,
|
||||
["Scale Matriarch Zodia"] = 7,
|
||||
["Rockweed Shambler"] = 7,
|
||||
["Avarius"] = 6,
|
||||
["Iridescent Glimmershell"] = 6,
|
||||
["Oronu"] = 6,
|
||||
["Elderspawn Nalaada"] = 5,
|
||||
}
|
||||
@@ -1,33 +1,33 @@
|
||||
--DEBUG_UPDATE DEBUG_ADD
|
||||
function(e, m, t, c)
|
||||
if e == "DEBUG_UPDATE" then
|
||||
return true
|
||||
elseif e == "DEBUG_ADD" and m and t then
|
||||
if c then aura_env.DebugTextArray[#aura_env.DebugTextArray + 1] = {m, t, c} else aura_env.DebugTextArray[#aura_env.DebugTextArray + 1] = {m, t} end
|
||||
WeakAuras.ScanEvents("DEBUG_UPDATE")
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.DebugTextArray then
|
||||
aura_env.output = ""
|
||||
if #aura_env.DebugTextArray > 0 then
|
||||
for k,v in ipairs(aura_env.DebugTextArray) do
|
||||
if v[3] then aura_env.output = aura_env.output .. "|c" .. v[3] end
|
||||
aura_env.output = aura_env.output .. v[1]
|
||||
if v[3] then aura_env.output = aura_env.output .. "|r" end
|
||||
aura_env.output = aura_env.output .. "\n"
|
||||
if v[2] > 0 then
|
||||
local aura_env = aura_env
|
||||
C_Timer.After(v[2], function() table.remove(aura_env.DebugTextArray, k); WeakAuras.ScanEvents("DEBUG_UPDATE") end)
|
||||
end
|
||||
end
|
||||
end
|
||||
return aura_env.output
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
--DevTools_Dump nice
|
||||
--DEBUG_UPDATE DEBUG_ADD
|
||||
function(e, m, t, c)
|
||||
if e == "DEBUG_UPDATE" then
|
||||
return true
|
||||
elseif e == "DEBUG_ADD" and m and t then
|
||||
if c then aura_env.DebugTextArray[#aura_env.DebugTextArray + 1] = {m, t, c} else aura_env.DebugTextArray[#aura_env.DebugTextArray + 1] = {m, t} end
|
||||
WeakAuras.ScanEvents("DEBUG_UPDATE")
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.DebugTextArray then
|
||||
aura_env.output = ""
|
||||
if #aura_env.DebugTextArray > 0 then
|
||||
for k,v in ipairs(aura_env.DebugTextArray) do
|
||||
if v[3] then aura_env.output = aura_env.output .. "|c" .. v[3] end
|
||||
aura_env.output = aura_env.output .. v[1]
|
||||
if v[3] then aura_env.output = aura_env.output .. "|r" end
|
||||
aura_env.output = aura_env.output .. "\n"
|
||||
if v[2] > 0 then
|
||||
local aura_env = aura_env
|
||||
C_Timer.After(v[2], function() table.remove(aura_env.DebugTextArray, k); WeakAuras.ScanEvents("DEBUG_UPDATE") end)
|
||||
end
|
||||
end
|
||||
end
|
||||
return aura_env.output
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
--DevTools_Dump nice
|
||||
if not aura_env.DebugTextArray then aura_env.DebugTextArray = {} end
|
||||
@@ -1,25 +1,25 @@
|
||||
--[05:42 PM] [G] [Whispa]: <Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons
|
||||
--/run WeakAuras.ScanEvents("BULLSHIT_BEGIN")
|
||||
--BULLSHIT_BEGIN BULLSHIT_STOP PLAYER_ENTERING_WORLD
|
||||
function(e)
|
||||
if e == "BULLSHIT_BEGIN" then
|
||||
if IsInInstance() == false then
|
||||
aura_env.ticker = C_Timer.NewTicker(600, function() SendChatMessage("<Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons", "CHANNEL", _, "1") end)
|
||||
--aura_env.ticker = C_Timer.NewTicker(0.60, function() print("<Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons") end)
|
||||
else
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
end
|
||||
end
|
||||
elseif e == "BULLSHIT_STOP" then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
end
|
||||
elseif e == "PLAYER_ENTERING_WORLD" then
|
||||
if IsInInstance() == true then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
end
|
||||
end
|
||||
end
|
||||
--[05:42 PM] [G] [Whispa]: <Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons
|
||||
--/run WeakAuras.ScanEvents("BULLSHIT_BEGIN")
|
||||
--BULLSHIT_BEGIN BULLSHIT_STOP PLAYER_ENTERING_WORLD
|
||||
function(e)
|
||||
if e == "BULLSHIT_BEGIN" then
|
||||
if IsInInstance() == false then
|
||||
aura_env.ticker = C_Timer.NewTicker(600, function() SendChatMessage("<Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons", "CHANNEL", _, "1") end)
|
||||
--aura_env.ticker = C_Timer.NewTicker(0.60, function() print("<Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons") end)
|
||||
else
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
end
|
||||
end
|
||||
elseif e == "BULLSHIT_STOP" then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
end
|
||||
elseif e == "PLAYER_ENTERING_WORLD" then
|
||||
if IsInInstance() == true then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,38 +1,38 @@
|
||||
--MERCHANT_SHOW PLAYER_ALIVE CHAT_MSG_LOOT
|
||||
function(e, msg)
|
||||
if e == "PLAYER_ALIVE" then
|
||||
for c = 0, 5 do
|
||||
for s = 1, GetContainerNumSlots(c) do
|
||||
if GetContainerItemLink(c, s) then
|
||||
local name = GetItemInfo(GetContainerItemLink(c, s))
|
||||
local icon = select(10, GetItemInfo(GetContainerItemLink(c, s)))
|
||||
local link = GetContainerItemLink(c, s)
|
||||
local id = link:match("item:(%d+):")
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "MERCHANT_SHOW" then
|
||||
local i = 1
|
||||
C_Timer.After(0.2, function()
|
||||
while GetMerchantItemInfo(i) do
|
||||
local name, icon = GetMerchantItemInfo(i)
|
||||
local link = GetMerchantItemLink(i)
|
||||
local id = link:match("item:(%d+):")
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end
|
||||
i = i + 1
|
||||
end
|
||||
end)
|
||||
elseif e == "CHAT_MSG_LOOT" then
|
||||
local itemID, icon, name
|
||||
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
|
||||
itemID = itemLink:match("item:(%d+):")
|
||||
icon = select(10, GetItemInfo(itemLink))
|
||||
name = GetItemInfo(itemLink)
|
||||
end
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end
|
||||
end
|
||||
--MERCHANT_SHOW PLAYER_ALIVE CHAT_MSG_LOOT
|
||||
function(e, msg)
|
||||
if e == "PLAYER_ALIVE" then
|
||||
for c = 0, 5 do
|
||||
for s = 1, GetContainerNumSlots(c) do
|
||||
if GetContainerItemLink(c, s) then
|
||||
local name = GetItemInfo(GetContainerItemLink(c, s))
|
||||
local icon = select(10, GetItemInfo(GetContainerItemLink(c, s)))
|
||||
local link = GetContainerItemLink(c, s)
|
||||
local id = link:match("item:(%d+):")
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "MERCHANT_SHOW" then
|
||||
local i = 1
|
||||
C_Timer.After(0.2, function()
|
||||
while GetMerchantItemInfo(i) do
|
||||
local name, icon = GetMerchantItemInfo(i)
|
||||
local link = GetMerchantItemLink(i)
|
||||
local id = link:match("item:(%d+):")
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end
|
||||
i = i + 1
|
||||
end
|
||||
end)
|
||||
elseif e == "CHAT_MSG_LOOT" then
|
||||
local itemID, icon, name
|
||||
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
|
||||
itemID = itemLink:match("item:(%d+):")
|
||||
icon = select(10, GetItemInfo(itemLink))
|
||||
name = GetItemInfo(itemLink)
|
||||
end
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end
|
||||
end
|
||||
end
|
||||
@@ -1,28 +1,28 @@
|
||||
--CLEU PLAYER_TARGET_CHANGED
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
if (select(2, ...) == "SPELL_AURA_APPLIED" or select(2, ...) == "SPELL_AURA_REFRESH" or select(2, ...) == "SPELL_PERIODIC_DAMAGE") and select(5, ...) == UnitName("player") and select(13, ...) == "Ignite" then
|
||||
return true
|
||||
end
|
||||
elseif e == "PLAYER_TARGET_CHANGED" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local function UnitDebuffC(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i, PLAYER)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i, PLAYER)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
local thing = select(16, UnitDebuffC("target", "Ignite"))
|
||||
if thing then return thing else return 0 end
|
||||
--CLEU PLAYER_TARGET_CHANGED
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
if (select(2, ...) == "SPELL_AURA_APPLIED" or select(2, ...) == "SPELL_AURA_REFRESH" or select(2, ...) == "SPELL_PERIODIC_DAMAGE") and select(5, ...) == UnitName("player") and select(13, ...) == "Ignite" then
|
||||
return true
|
||||
end
|
||||
elseif e == "PLAYER_TARGET_CHANGED" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local function UnitDebuffC(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i, PLAYER)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i, PLAYER)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
local thing = select(16, UnitDebuffC("target", "Ignite"))
|
||||
if thing then return thing else return 0 end
|
||||
end
|
||||
@@ -1,79 +1,79 @@
|
||||
--UNIT_AURA:player UNIT_POWER_UPDATE:player
|
||||
function(e, ...)
|
||||
if e == "UNIT_AURA" then
|
||||
if aura_env.UnitBuffC("Ignore Pain") then
|
||||
local expTime = math.floor((select(6, aura_env.UnitBuffC("Ignore Pain")) * 100))
|
||||
local ctime = math.floor((GetTime() * 100))
|
||||
if ctime + 1200 == expTime then aura_env.absorb = select(16, aura_env.UnitBuffC("Ignore Pain")) end
|
||||
end
|
||||
elseif e == "UNIT_POWER_UPDATE" then
|
||||
local rage = UnitPower("player")
|
||||
local time = GetTime()
|
||||
if rage < 40 then
|
||||
aura_env.region:Hide()
|
||||
return false
|
||||
elseif rage >= 40 and rage < 90 and not aura_env.UnitBuffC("player", "Ignore Pain") then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
|
||||
aura_env.region:SetOffset(128, 200)
|
||||
aura_env.region:SetGlow(true)
|
||||
aura_env.region:Color(1, 1, 1, 1)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
elseif rage >= 40 and rage < 90 and aura_env.UnitBuffC("player", "Ignore Pain") then
|
||||
local absorb = select(16, aura_env.UnitBuffC("player", "Ignore Pain")) or 0
|
||||
local expTime = select(6, aura_env.UnitBuffC("player", "Ignore Pain")) or 0
|
||||
if absorb > 0 and expTime > 0 then
|
||||
if expTime - time <= 3 then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
|
||||
aura_env.region:SetOffset(128, 200)
|
||||
aura_env.region:SetGlow(false)
|
||||
aura_env.region:Color(1, 1, 1, 1)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
elseif absorb <= 0.2 * aura_env.absorb then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
|
||||
aura_env.region:SetOffset(128, 200)
|
||||
aura_env.region:SetGlow(false)
|
||||
aura_env.region:Color(1, 1, 1, 1)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
else
|
||||
aura_env.region:Hide()
|
||||
return false
|
||||
end
|
||||
end
|
||||
elseif rage >= 90 and not aura_env.UnitBuffC("player", "Shield Block") then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Shield Block"))
|
||||
aura_env.region:SetOffset(-128, 200)
|
||||
aura_env.region:SetGlow(false)
|
||||
aura_env.region:Color(1, 1, 1, 0.33)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
elseif rage >= 90 and aura_env.UnitBuffC("player", "Shield Block") then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
|
||||
aura_env.region:SetOffset(128, 200)
|
||||
aura_env.region:SetGlow(false)
|
||||
aura_env.region:Color(1, 1, 1, 0.5)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
else
|
||||
aura_env.region:Hide()()
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.absorb = 0
|
||||
aura_env.UnitBuffC = function(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
--UNIT_AURA:player UNIT_POWER_UPDATE:player
|
||||
function(e, ...)
|
||||
if e == "UNIT_AURA" then
|
||||
if aura_env.UnitBuffC("Ignore Pain") then
|
||||
local expTime = math.floor((select(6, aura_env.UnitBuffC("Ignore Pain")) * 100))
|
||||
local ctime = math.floor((GetTime() * 100))
|
||||
if ctime + 1200 == expTime then aura_env.absorb = select(16, aura_env.UnitBuffC("Ignore Pain")) end
|
||||
end
|
||||
elseif e == "UNIT_POWER_UPDATE" then
|
||||
local rage = UnitPower("player")
|
||||
local time = GetTime()
|
||||
if rage < 40 then
|
||||
aura_env.region:Hide()
|
||||
return false
|
||||
elseif rage >= 40 and rage < 90 and not aura_env.UnitBuffC("player", "Ignore Pain") then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
|
||||
aura_env.region:SetOffset(128, 200)
|
||||
aura_env.region:SetGlow(true)
|
||||
aura_env.region:Color(1, 1, 1, 1)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
elseif rage >= 40 and rage < 90 and aura_env.UnitBuffC("player", "Ignore Pain") then
|
||||
local absorb = select(16, aura_env.UnitBuffC("player", "Ignore Pain")) or 0
|
||||
local expTime = select(6, aura_env.UnitBuffC("player", "Ignore Pain")) or 0
|
||||
if absorb > 0 and expTime > 0 then
|
||||
if expTime - time <= 3 then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
|
||||
aura_env.region:SetOffset(128, 200)
|
||||
aura_env.region:SetGlow(false)
|
||||
aura_env.region:Color(1, 1, 1, 1)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
elseif absorb <= 0.2 * aura_env.absorb then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
|
||||
aura_env.region:SetOffset(128, 200)
|
||||
aura_env.region:SetGlow(false)
|
||||
aura_env.region:Color(1, 1, 1, 1)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
else
|
||||
aura_env.region:Hide()
|
||||
return false
|
||||
end
|
||||
end
|
||||
elseif rage >= 90 and not aura_env.UnitBuffC("player", "Shield Block") then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Shield Block"))
|
||||
aura_env.region:SetOffset(-128, 200)
|
||||
aura_env.region:SetGlow(false)
|
||||
aura_env.region:Color(1, 1, 1, 0.33)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
elseif rage >= 90 and aura_env.UnitBuffC("player", "Shield Block") then
|
||||
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
|
||||
aura_env.region:SetOffset(128, 200)
|
||||
aura_env.region:SetGlow(false)
|
||||
aura_env.region:Color(1, 1, 1, 0.5)
|
||||
aura_env.region:Show()
|
||||
return true
|
||||
else
|
||||
aura_env.region:Hide()()
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.absorb = 0
|
||||
aura_env.UnitBuffC = function(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,65 +1,65 @@
|
||||
--UNIT_COMBAT:player UNIT_AURA:player
|
||||
function(e, ...)
|
||||
if e == "UNIT_AURA" then
|
||||
if aura_env.CUnitBuff("Ignore Pain") then
|
||||
aura_env.amount = select(16, aura_env.CUnitBuff("Ignore Pain"))
|
||||
local expTime = math.floor((select(6, aura_env.CUnitBuff("Ignore Pain")) * 100))
|
||||
local ctime = math.floor((GetTime() * 100))
|
||||
if ctime + 1200 == expTime then aura_env.lastTime = GetTime(); aura_env.maxamount = select(16, aura_env.CUnitBuff("Ignore Pain")) end
|
||||
aura_env.region.text:SetText(aura_env.shorten(aura_env.amount))
|
||||
aura_env.region.timer:SetText(aura_env.shorten(aura_env.maxamount))
|
||||
else
|
||||
aura_env.region.text:SetText("")
|
||||
aura_env.region.timer:SetText("")
|
||||
aura_env.maxamount = 0
|
||||
end
|
||||
return true
|
||||
elseif e == "UNIT_COMBAT" then
|
||||
if aura_env.CUnitBuff("Ignore Pain") then
|
||||
aura_env.amount = select(16, aura_env.CUnitBuff("Ignore Pain"))
|
||||
aura_env.region.text:SetText(aura_env.shorten(aura_env.amount))
|
||||
aura_env.region.timer:SetText(aura_env.shorten(aura_env.maxamount))
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
return aura_env.amount, aura_env.maxamount, 1
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.absorb = 0
|
||||
aura_env.CUnitBuff = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff("player", i)
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
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
|
||||
--UNIT_COMBAT:player UNIT_AURA:player
|
||||
function(e, ...)
|
||||
if e == "UNIT_AURA" then
|
||||
if aura_env.CUnitBuff("Ignore Pain") then
|
||||
aura_env.amount = select(16, aura_env.CUnitBuff("Ignore Pain"))
|
||||
local expTime = math.floor((select(6, aura_env.CUnitBuff("Ignore Pain")) * 100))
|
||||
local ctime = math.floor((GetTime() * 100))
|
||||
if ctime + 1200 == expTime then aura_env.lastTime = GetTime(); aura_env.maxamount = select(16, aura_env.CUnitBuff("Ignore Pain")) end
|
||||
aura_env.region.text:SetText(aura_env.shorten(aura_env.amount))
|
||||
aura_env.region.timer:SetText(aura_env.shorten(aura_env.maxamount))
|
||||
else
|
||||
aura_env.region.text:SetText("")
|
||||
aura_env.region.timer:SetText("")
|
||||
aura_env.maxamount = 0
|
||||
end
|
||||
return true
|
||||
elseif e == "UNIT_COMBAT" then
|
||||
if aura_env.CUnitBuff("Ignore Pain") then
|
||||
aura_env.amount = select(16, aura_env.CUnitBuff("Ignore Pain"))
|
||||
aura_env.region.text:SetText(aura_env.shorten(aura_env.amount))
|
||||
aura_env.region.timer:SetText(aura_env.shorten(aura_env.maxamount))
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
return aura_env.amount, aura_env.maxamount, 1
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.absorb = 0
|
||||
aura_env.CUnitBuff = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff("player", i)
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
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
|
||||
@@ -1,24 +1,24 @@
|
||||
--CLEU SPELL_UPDATE_COOLDOWN
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
if select(2, ...) == "SPELL_DAMAGE" and select(5, ...) == UnitName("player") and (select(13, ...) == "Fireball" or select(13, ...) == "Fire Blast" or select(13, ...) == "Pyroblast") and select(21, ...) == true and GetSpellCooldown("Combustion") > 0 then
|
||||
if not aura_env.cd then aura_env.cd = 0 end
|
||||
aura_env.cd = aura_env.cd + 1
|
||||
return true
|
||||
end
|
||||
if select(2, ...) == "SPELL_CAST_SUCCESS" and select(5, ...) == UnitName("player") and select(13, ...) == "Combustion" then
|
||||
aura_env.cd = 0
|
||||
end
|
||||
elseif e == "SPELL_UPDATE_COOLDOWN" then return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if not aura_env.cd then aura_env.cd = 0 end
|
||||
if GetSpellCooldown("Combustion") > 0 then
|
||||
return "|cfffd477b" .. aura_env.cd
|
||||
else
|
||||
return "|cff78cb00" .. aura_env.cd
|
||||
end
|
||||
--CLEU SPELL_UPDATE_COOLDOWN
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
if select(2, ...) == "SPELL_DAMAGE" and select(5, ...) == UnitName("player") and (select(13, ...) == "Fireball" or select(13, ...) == "Fire Blast" or select(13, ...) == "Pyroblast") and select(21, ...) == true and GetSpellCooldown("Combustion") > 0 then
|
||||
if not aura_env.cd then aura_env.cd = 0 end
|
||||
aura_env.cd = aura_env.cd + 1
|
||||
return true
|
||||
end
|
||||
if select(2, ...) == "SPELL_CAST_SUCCESS" and select(5, ...) == UnitName("player") and select(13, ...) == "Combustion" then
|
||||
aura_env.cd = 0
|
||||
end
|
||||
elseif e == "SPELL_UPDATE_COOLDOWN" then return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if not aura_env.cd then aura_env.cd = 0 end
|
||||
if GetSpellCooldown("Combustion") > 0 then
|
||||
return "|cfffd477b" .. aura_env.cd
|
||||
else
|
||||
return "|cff78cb00" .. aura_env.cd
|
||||
end
|
||||
end
|
||||
@@ -1,34 +1,34 @@
|
||||
--CHAT_MSG_LOOT
|
||||
function(_,msg,who)
|
||||
local who = who:match(UnitName("player"))
|
||||
local what = msg:match("%[([a-zA-Z ' -]+)%]")
|
||||
if who == UnitName("player") then
|
||||
local link = ""
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
if GetContainerItemLink(i,j) then
|
||||
if GetItemInfo(GetContainerItemLink(i, j)) == what then
|
||||
link = GetContainerItemLink(i, j)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
table.insert(aura_env.loot, {["Who"] = who, ["What"] = what, ["When"] = GetTime() + 2.5, ["Link"] = link})
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(aura_env.loot) do
|
||||
if v.When < GetTime() then
|
||||
table.remove(aura_env.loot, k)
|
||||
else
|
||||
output = output .. v.Link .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--INIT
|
||||
--CHAT_MSG_LOOT
|
||||
function(_,msg,who)
|
||||
local who = who:match(UnitName("player"))
|
||||
local what = msg:match("%[([a-zA-Z ' -]+)%]")
|
||||
if who == UnitName("player") then
|
||||
local link = ""
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
if GetContainerItemLink(i,j) then
|
||||
if GetItemInfo(GetContainerItemLink(i, j)) == what then
|
||||
link = GetContainerItemLink(i, j)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
table.insert(aura_env.loot, {["Who"] = who, ["What"] = what, ["When"] = GetTime() + 2.5, ["Link"] = link})
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(aura_env.loot) do
|
||||
if v.When < GetTime() then
|
||||
table.remove(aura_env.loot, k)
|
||||
else
|
||||
output = output .. v.Link .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.loot = {}
|
||||
@@ -1,121 +1,121 @@
|
||||
--EVERY FRAME (Throttled)
|
||||
function()
|
||||
if aura_env.lastscan < GetTime() then
|
||||
if UnitExists("focus") then
|
||||
if UnitInParty("focus") then
|
||||
--Get MapID for both
|
||||
local myMapID = C_Map.GetBestMapForUnit("player")
|
||||
local focusMapID = C_Map.GetBestMapForUnit("focus")
|
||||
|
||||
--Get Coordinates for both within same map
|
||||
local pX, pY, fX, fY = 0, 0, 0, 0
|
||||
if myMapID == focusMapID then
|
||||
pX, pY = aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "player").x, 4) * 10000, aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "player").y, 4) * 10000
|
||||
fX, fY = aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "focus").x, 4) * 10000, aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "focus").y, 4) * 10000
|
||||
end
|
||||
|
||||
if pX > 0 and pY > 0 and fX > 0 and fY > 0 then
|
||||
--Get player direction facing and convert to angle
|
||||
local playerFace = GetPlayerFacing() or 0
|
||||
local playerA = math.floor(playerFace * 100)
|
||||
playerA = aura_env.range(playerA, 0, 630, 360) - 1
|
||||
playerA = - playerA
|
||||
playerA = math.floor(playerA)
|
||||
playerA = playerA - 90
|
||||
if playerA < 0 then playerA = playerA + 360 end
|
||||
|
||||
--Get relative Coordinates
|
||||
local X = fX - pX
|
||||
local Y = fY - pY
|
||||
local hyp = math.sqrt((X ^ 2) + (Y ^ 2))
|
||||
local a = math.atan2(Y, X)
|
||||
a = a - math.rad(playerA)
|
||||
local Y2, X2 = hyp * math.cos(a), hyp * math.sin(a)
|
||||
local zoomout, zoomin = 100, 50
|
||||
if (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom > 0.3 then
|
||||
aura_env.zoom = aura_env.zoom - 0.2
|
||||
elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom <= 0.3 and aura_env.zoom > 0.1 then
|
||||
aura_env.zoom = aura_env.zoom - 0.05
|
||||
elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom <= 0.1 and aura_env.zoom > 0.0005 then
|
||||
aura_env.zoom = aura_env.zoom - 0.0005
|
||||
elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom < 0.001 then
|
||||
aura_env.zoom = 1
|
||||
end
|
||||
if (math.abs((X2 * aura_env.zoom)) < zoomin and math.abs((Y2 * aura_env.zoom)) < zoomin) and aura_env.zoom < 50 then
|
||||
aura_env.zoom = aura_env.zoom + 0.2
|
||||
end
|
||||
aura_env.region.text:SetText("Zoom: " .. aura_env.zoom .. "\nDistance: " .. aura_env.round(hyp, 0))
|
||||
aura_env.region.playerTexture:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0)
|
||||
aura_env.region.focusTexture:SetPoint("CENTER", aura_env.region, "CENTER", X2 * aura_env.zoom, Y2 * aura_env.zoom)
|
||||
|
||||
--Get class to color
|
||||
local pclass, fclass = select(3, UnitClass("player")), select(3, UnitClass("focus"))
|
||||
aura_env.region.playerTexture:SetVertexColor(aura_env.classColor(pclass))
|
||||
aura_env.region.focusTexture:SetVertexColor(aura_env.classColor(fclass))
|
||||
return true
|
||||
else
|
||||
print("Focus not in map!")
|
||||
end
|
||||
aura_env.lastscan = GetTime() + aura_env.throttle / 1000
|
||||
else print("Focus not in party!"); aura_env.region.playerTexture:Hide(); aura_env.region.focusTexture:Hide(); aura_env.lastscan = GetTime() + 5 end
|
||||
else print("No focus found!"); aura_env.region.playerTexture:Hide(); aura_env.region.focusTexture:Hide(); aura_env.lastscan = GetTime() + 5 end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.throttle = 250
|
||||
aura_env.lastscan = 0
|
||||
aura_env.zoom = 1
|
||||
aura_env.range = function(val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
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.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43, 0.75 elseif
|
||||
class == 2 then return 0.96, 0.55, 0.73, 0.75 elseif
|
||||
class == 3 then return 0.67, 0.83, 0.45, 0.75 elseif
|
||||
class == 4 then return 1, 0.96, 0.41, 0.75 elseif
|
||||
class == 5 then return 1, 1, 1, 0.75 elseif
|
||||
class == 6 then return 0.77, 0.12, 0.23, 0.75 elseif
|
||||
class == 7 then return 0, 0.44, 0.87, 0.75 elseif
|
||||
class == 8 then return 0.25, 0.78, 0.92, 0.75 elseif
|
||||
class == 9 then return 0.53, 0.53, 0.93, 0.75 elseif
|
||||
class == 10 then return 0, 1, 0.59, 0.75 elseif
|
||||
class == 11 then return 1, 0.49, 0.04, 0.75 elseif
|
||||
class == 12 then return 0.64, 0.19, 0.79, 0.75 else
|
||||
return 1, 1, 1, 1 end
|
||||
end
|
||||
|
||||
if not aura_env.region.playerTexture then
|
||||
local playerTexture = aura_env.region:CreateTexture(nil, "OVERLAY")
|
||||
aura_env.region.playerTexture = playerTexture
|
||||
end
|
||||
aura_env.region.playerTexture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura72")
|
||||
aura_env.region.playerTexture:SetHeight(16)
|
||||
aura_env.region.playerTexture:SetWidth(16)
|
||||
aura_env.region.playerTexture:Show()
|
||||
if not aura_env.region.focusTexture then
|
||||
local focusTexture = aura_env.region:CreateTexture(nil, "OVERLAY")
|
||||
aura_env.region.focusTexture = focusTexture
|
||||
end
|
||||
aura_env.region.focusTexture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura72")
|
||||
aura_env.region.focusTexture:SetHeight(16)
|
||||
aura_env.region.focusTexture:SetWidth(16)
|
||||
aura_env.region.focusTexture:Show()
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text = text
|
||||
end
|
||||
aura_env.region.text:ClearAllPoints()
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER", 0, 500)
|
||||
aura_env.region.text:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Medium.ttf", 16, "OUTLINE")
|
||||
aura_env.region.text:SetJustifyH("CENTER")
|
||||
--EVERY FRAME (Throttled)
|
||||
function()
|
||||
if aura_env.lastscan < GetTime() then
|
||||
if UnitExists("focus") then
|
||||
if UnitInParty("focus") then
|
||||
--Get MapID for both
|
||||
local myMapID = C_Map.GetBestMapForUnit("player")
|
||||
local focusMapID = C_Map.GetBestMapForUnit("focus")
|
||||
|
||||
--Get Coordinates for both within same map
|
||||
local pX, pY, fX, fY = 0, 0, 0, 0
|
||||
if myMapID == focusMapID then
|
||||
pX, pY = aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "player").x, 4) * 10000, aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "player").y, 4) * 10000
|
||||
fX, fY = aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "focus").x, 4) * 10000, aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "focus").y, 4) * 10000
|
||||
end
|
||||
|
||||
if pX > 0 and pY > 0 and fX > 0 and fY > 0 then
|
||||
--Get player direction facing and convert to angle
|
||||
local playerFace = GetPlayerFacing() or 0
|
||||
local playerA = math.floor(playerFace * 100)
|
||||
playerA = aura_env.range(playerA, 0, 630, 360) - 1
|
||||
playerA = - playerA
|
||||
playerA = math.floor(playerA)
|
||||
playerA = playerA - 90
|
||||
if playerA < 0 then playerA = playerA + 360 end
|
||||
|
||||
--Get relative Coordinates
|
||||
local X = fX - pX
|
||||
local Y = fY - pY
|
||||
local hyp = math.sqrt((X ^ 2) + (Y ^ 2))
|
||||
local a = math.atan2(Y, X)
|
||||
a = a - math.rad(playerA)
|
||||
local Y2, X2 = hyp * math.cos(a), hyp * math.sin(a)
|
||||
local zoomout, zoomin = 100, 50
|
||||
if (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom > 0.3 then
|
||||
aura_env.zoom = aura_env.zoom - 0.2
|
||||
elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom <= 0.3 and aura_env.zoom > 0.1 then
|
||||
aura_env.zoom = aura_env.zoom - 0.05
|
||||
elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom <= 0.1 and aura_env.zoom > 0.0005 then
|
||||
aura_env.zoom = aura_env.zoom - 0.0005
|
||||
elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom < 0.001 then
|
||||
aura_env.zoom = 1
|
||||
end
|
||||
if (math.abs((X2 * aura_env.zoom)) < zoomin and math.abs((Y2 * aura_env.zoom)) < zoomin) and aura_env.zoom < 50 then
|
||||
aura_env.zoom = aura_env.zoom + 0.2
|
||||
end
|
||||
aura_env.region.text:SetText("Zoom: " .. aura_env.zoom .. "\nDistance: " .. aura_env.round(hyp, 0))
|
||||
aura_env.region.playerTexture:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0)
|
||||
aura_env.region.focusTexture:SetPoint("CENTER", aura_env.region, "CENTER", X2 * aura_env.zoom, Y2 * aura_env.zoom)
|
||||
|
||||
--Get class to color
|
||||
local pclass, fclass = select(3, UnitClass("player")), select(3, UnitClass("focus"))
|
||||
aura_env.region.playerTexture:SetVertexColor(aura_env.classColor(pclass))
|
||||
aura_env.region.focusTexture:SetVertexColor(aura_env.classColor(fclass))
|
||||
return true
|
||||
else
|
||||
print("Focus not in map!")
|
||||
end
|
||||
aura_env.lastscan = GetTime() + aura_env.throttle / 1000
|
||||
else print("Focus not in party!"); aura_env.region.playerTexture:Hide(); aura_env.region.focusTexture:Hide(); aura_env.lastscan = GetTime() + 5 end
|
||||
else print("No focus found!"); aura_env.region.playerTexture:Hide(); aura_env.region.focusTexture:Hide(); aura_env.lastscan = GetTime() + 5 end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.throttle = 250
|
||||
aura_env.lastscan = 0
|
||||
aura_env.zoom = 1
|
||||
aura_env.range = function(val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
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.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43, 0.75 elseif
|
||||
class == 2 then return 0.96, 0.55, 0.73, 0.75 elseif
|
||||
class == 3 then return 0.67, 0.83, 0.45, 0.75 elseif
|
||||
class == 4 then return 1, 0.96, 0.41, 0.75 elseif
|
||||
class == 5 then return 1, 1, 1, 0.75 elseif
|
||||
class == 6 then return 0.77, 0.12, 0.23, 0.75 elseif
|
||||
class == 7 then return 0, 0.44, 0.87, 0.75 elseif
|
||||
class == 8 then return 0.25, 0.78, 0.92, 0.75 elseif
|
||||
class == 9 then return 0.53, 0.53, 0.93, 0.75 elseif
|
||||
class == 10 then return 0, 1, 0.59, 0.75 elseif
|
||||
class == 11 then return 1, 0.49, 0.04, 0.75 elseif
|
||||
class == 12 then return 0.64, 0.19, 0.79, 0.75 else
|
||||
return 1, 1, 1, 1 end
|
||||
end
|
||||
|
||||
if not aura_env.region.playerTexture then
|
||||
local playerTexture = aura_env.region:CreateTexture(nil, "OVERLAY")
|
||||
aura_env.region.playerTexture = playerTexture
|
||||
end
|
||||
aura_env.region.playerTexture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura72")
|
||||
aura_env.region.playerTexture:SetHeight(16)
|
||||
aura_env.region.playerTexture:SetWidth(16)
|
||||
aura_env.region.playerTexture:Show()
|
||||
if not aura_env.region.focusTexture then
|
||||
local focusTexture = aura_env.region:CreateTexture(nil, "OVERLAY")
|
||||
aura_env.region.focusTexture = focusTexture
|
||||
end
|
||||
aura_env.region.focusTexture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura72")
|
||||
aura_env.region.focusTexture:SetHeight(16)
|
||||
aura_env.region.focusTexture:SetWidth(16)
|
||||
aura_env.region.focusTexture:Show()
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text = text
|
||||
end
|
||||
aura_env.region.text:ClearAllPoints()
|
||||
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER", 0, 500)
|
||||
aura_env.region.text:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Medium.ttf", 16, "OUTLINE")
|
||||
aura_env.region.text:SetJustifyH("CENTER")
|
||||
aura_env.region.text:Show()
|
||||
@@ -1,108 +1,108 @@
|
||||
--QUEST_LOG_UPDATE
|
||||
function(e, unit)
|
||||
if e == "QUEST_LOG_UPDATE" then
|
||||
local entries = GetNumQuestLogEntries()
|
||||
for i = 1, entries do
|
||||
if GetQuestLogLeaderBoard(1, i) then
|
||||
for j = 1, 40 do
|
||||
local text, type, finished = GetQuestLogLeaderBoard(1, i)
|
||||
if not text then
|
||||
break
|
||||
elseif text and not finished then
|
||||
if type == "monster" and text:match("slain") then
|
||||
local count, mcount = text:match("(%d*)%/(%d*)")
|
||||
local rem = mcount - count
|
||||
local mob = text:match("%d*%/%d* (.+) slain")
|
||||
aura_env.mobs[mob] = rem
|
||||
end
|
||||
elseif finished and aura_env.mobs[mob] then
|
||||
local mob = text:match("%d*%/%d* (.+) slain")
|
||||
table.remove(aura_env.mobs, mob)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
--TSU
|
||||
function(allstates, e, unit)
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
if UnitExists(unit) then
|
||||
if aura_env.mobs[UnitName(unit)] then
|
||||
local name = UnitName(unit)
|
||||
allstates[unit] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
unit = unit,
|
||||
name = name,
|
||||
count = aura_env.mobs[name],
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
if allstates[unit] then
|
||||
allstates[unit] =
|
||||
{
|
||||
show = false,
|
||||
changed = true,
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ON SHOW
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text = text
|
||||
end
|
||||
aura_env.region:SetHeight(128)
|
||||
aura_env.region:SetWidth(512)
|
||||
aura_env.region.text:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Regular.ttf", 18, "OUTLINE")
|
||||
aura_env.region.text:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text:SetText(aura_env.state.count)
|
||||
if not aura_env.region.texture then
|
||||
local texture = aura_env.region:CreateTexture(nil, "OVERLAY")
|
||||
aura_env.region.texture = texture
|
||||
end
|
||||
aura_env.region.texture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura51")
|
||||
aura_env.region.texture:SetHeight(32)
|
||||
aura_env.region.texture:SetWidth(32)
|
||||
local plate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit)
|
||||
if plate then
|
||||
print("found plate pls work")
|
||||
aura_env.region.texture:ClearAllPoints()
|
||||
aura_env.region.texture:SetPoint("TOP", plate, "TOP", 0, 32)
|
||||
aura_env.region.texture:Show()
|
||||
aura_env.region.text:ClearAllPoints()
|
||||
aura_env.region.text:SetPoint("CENTER", plate, "CENTER", 32, 48)
|
||||
aura_env.region.text:Show()
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.mobs = {}
|
||||
local entries = GetNumQuestLogEntries()
|
||||
for i = 1, entries do
|
||||
if GetQuestLogLeaderBoard(1, i) then
|
||||
for j = 1, 40 do
|
||||
local text, type, finished = GetQuestLogLeaderBoard(1, i)
|
||||
if not text then
|
||||
break
|
||||
elseif text and not finished then
|
||||
if type == "monster" and text:match("slain") then
|
||||
local count, mcount = text:match("(%d*)%/(%d*)")
|
||||
local rem = mcount - count
|
||||
local mob = text:match("%d*%/%d* (.+) slain")
|
||||
aura_env.mobs[mob] = rem
|
||||
end
|
||||
elseif finished and aura_env.mobs[mob] then
|
||||
local mob = text:match("%d*%/%d* (.+) slain")
|
||||
table.remove(aura_env.mobs, mob)
|
||||
end
|
||||
end
|
||||
end
|
||||
--QUEST_LOG_UPDATE
|
||||
function(e, unit)
|
||||
if e == "QUEST_LOG_UPDATE" then
|
||||
local entries = GetNumQuestLogEntries()
|
||||
for i = 1, entries do
|
||||
if GetQuestLogLeaderBoard(1, i) then
|
||||
for j = 1, 40 do
|
||||
local text, type, finished = GetQuestLogLeaderBoard(1, i)
|
||||
if not text then
|
||||
break
|
||||
elseif text and not finished then
|
||||
if type == "monster" and text:match("slain") then
|
||||
local count, mcount = text:match("(%d*)%/(%d*)")
|
||||
local rem = mcount - count
|
||||
local mob = text:match("%d*%/%d* (.+) slain")
|
||||
aura_env.mobs[mob] = rem
|
||||
end
|
||||
elseif finished and aura_env.mobs[mob] then
|
||||
local mob = text:match("%d*%/%d* (.+) slain")
|
||||
table.remove(aura_env.mobs, mob)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
--TSU
|
||||
function(allstates, e, unit)
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
if UnitExists(unit) then
|
||||
if aura_env.mobs[UnitName(unit)] then
|
||||
local name = UnitName(unit)
|
||||
allstates[unit] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
unit = unit,
|
||||
name = name,
|
||||
count = aura_env.mobs[name],
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
if allstates[unit] then
|
||||
allstates[unit] =
|
||||
{
|
||||
show = false,
|
||||
changed = true,
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ON SHOW
|
||||
if not aura_env.region.text then
|
||||
local text = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text = text
|
||||
end
|
||||
aura_env.region:SetHeight(128)
|
||||
aura_env.region:SetWidth(512)
|
||||
aura_env.region.text:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Regular.ttf", 18, "OUTLINE")
|
||||
aura_env.region.text:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text:SetText(aura_env.statee.count)
|
||||
if not aura_env.region.texture then
|
||||
local texture = aura_env.region:CreateTexture(nil, "OVERLAY")
|
||||
aura_env.region.texture = texture
|
||||
end
|
||||
aura_env.region.texture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura51")
|
||||
aura_env.region.texture:SetHeight(32)
|
||||
aura_env.region.texture:SetWidth(32)
|
||||
local plate = C_NamePlate.GetNamePlateForUnit(aura_env.statee.unit)
|
||||
if plate then
|
||||
print("found plate pls work")
|
||||
aura_env.region.texture:ClearAllPoints()
|
||||
aura_env.region.texture:SetPoint("TOP", plate, "TOP", 0, 32)
|
||||
aura_env.region.texture:Show()
|
||||
aura_env.region.text:ClearAllPoints()
|
||||
aura_env.region.text:SetPoint("CENTER", plate, "CENTER", 32, 48)
|
||||
aura_env.region.text:Show()
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.mobs = {}
|
||||
local entries = GetNumQuestLogEntries()
|
||||
for i = 1, entries do
|
||||
if GetQuestLogLeaderBoard(1, i) then
|
||||
for j = 1, 40 do
|
||||
local text, type, finished = GetQuestLogLeaderBoard(1, i)
|
||||
if not text then
|
||||
break
|
||||
elseif text and not finished then
|
||||
if type == "monster" and text:match("slain") then
|
||||
local count, mcount = text:match("(%d*)%/(%d*)")
|
||||
local rem = mcount - count
|
||||
local mob = text:match("%d*%/%d* (.+) slain")
|
||||
aura_env.mobs[mob] = rem
|
||||
end
|
||||
elseif finished and aura_env.mobs[mob] then
|
||||
local mob = text:match("%d*%/%d* (.+) slain")
|
||||
table.remove(aura_env.mobs, mob)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,67 +1,67 @@
|
||||
--UNIT_COMBAT:player UNIT_AURA:player
|
||||
function(e, ...)
|
||||
if e == "UNIT_AURA" then
|
||||
if aura_env.CUnitBuff("Null Barrier") then
|
||||
aura_env.amount = select(16, aura_env.CUnitBuff("Null Barrier"))
|
||||
local expTime = math.floor((select(6, aura_env.CUnitBuff("Null Barrier")) * 100))
|
||||
local ctime = math.floor((GetTime() * 100))
|
||||
if ctime + 1000 == expTime then aura_env.lastTime = GetTime(); aura_env.maxamount = select(16, aura_env.CUnitBuff("Null Barrier")) end
|
||||
end
|
||||
return true
|
||||
elseif e == "UNIT_COMBAT" then
|
||||
if aura_env.CUnitBuff("Null Barrier") then
|
||||
aura_env.amount = select(16, aura_env.CUnitBuff("Null Barrier"))
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
if aura_env.CUnitBuff("Null Barrier") then
|
||||
aura_env.region:SetInverse(false)
|
||||
aura_env.region:Color(0.5, 0, 0.5, 1)
|
||||
return aura_env.amount, aura_env.maxamount, 1
|
||||
else
|
||||
aura_env.region:SetInverse(true)
|
||||
aura_env.region:Color(0.5, 0.5, 0.5, 1)
|
||||
return 15, aura_env.lastTime + 15
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.maxamount = 0
|
||||
aura_env.amount = 0
|
||||
aura_env.lastTime = GetTime()
|
||||
aura_env.CUnitBuff = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff("player", i)
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
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
|
||||
--UNIT_COMBAT:player UNIT_AURA:player
|
||||
function(e, ...)
|
||||
if e == "UNIT_AURA" then
|
||||
if aura_env.CUnitBuff("Null Barrier") then
|
||||
aura_env.amount = select(16, aura_env.CUnitBuff("Null Barrier"))
|
||||
local expTime = math.floor((select(6, aura_env.CUnitBuff("Null Barrier")) * 100))
|
||||
local ctime = math.floor((GetTime() * 100))
|
||||
if ctime + 1000 == expTime then aura_env.lastTime = GetTime(); aura_env.maxamount = select(16, aura_env.CUnitBuff("Null Barrier")) end
|
||||
end
|
||||
return true
|
||||
elseif e == "UNIT_COMBAT" then
|
||||
if aura_env.CUnitBuff("Null Barrier") then
|
||||
aura_env.amount = select(16, aura_env.CUnitBuff("Null Barrier"))
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
if aura_env.CUnitBuff("Null Barrier") then
|
||||
aura_env.region:SetInverse(false)
|
||||
aura_env.region:Color(0.5, 0, 0.5, 1)
|
||||
return aura_env.amount, aura_env.maxamount, 1
|
||||
else
|
||||
aura_env.region:SetInverse(true)
|
||||
aura_env.region:Color(0.5, 0.5, 0.5, 1)
|
||||
return 15, aura_env.lastTime + 15
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.maxamount = 0
|
||||
aura_env.amount = 0
|
||||
aura_env.lastTime = GetTime()
|
||||
aura_env.CUnitBuff = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitBuff("player", i)
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
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
|
||||
@@ -1,20 +1,20 @@
|
||||
--QUEST_POI_UPDATE UPDATE_Q_ITEM
|
||||
function()
|
||||
if InCombatLockdown() ~= 1 then
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local link = select(7, GetContainerItemInfo(i, j))
|
||||
if link then
|
||||
local type = select(6, GetItemInfo(link))
|
||||
if type == "Quest" then
|
||||
PickupContainerItem(i, j)
|
||||
if CursorHasItem() then
|
||||
PickupAction(22)
|
||||
ClearCursor()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
--QUEST_POI_UPDATE UPDATE_Q_ITEM
|
||||
function()
|
||||
if InCombatLockdown() ~= 1 then
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local link = select(7, GetContainerItemInfo(i, j))
|
||||
if link then
|
||||
local type = select(6, GetItemInfo(link))
|
||||
if type == "Quest" then
|
||||
PickupContainerItem(i, j)
|
||||
if CursorHasItem() then
|
||||
PickupAction(22)
|
||||
ClearCursor()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,100 +1,100 @@
|
||||
--CHAT_MSG_CHANNEL
|
||||
function(e, msg, _, _, channel)
|
||||
if channel:match("General") and (channel:match("Nazjatar") or channel:match("Mechagon")) then
|
||||
if msg:match("(KX%-T57 (%d+%.?%d*))") then msg = msg:gsub("(KX%-T57 (%d+%.?%d*))", "") end
|
||||
local x, y = msg:match("(%d+%.?%d*)[ ,/]+(%d+%.?%d*)")
|
||||
if x and y then
|
||||
local command = x .. " " .. y
|
||||
aura_env.waypoints[#aura_env.waypoints + 1] = {["x"] = x, ["y"] = y,}
|
||||
WeakAuras.ScanEvents("NEW_ID")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--EVERY FRAME
|
||||
function()
|
||||
if not aura_env.noidee then
|
||||
local function range (val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
end
|
||||
if not aura_env.idee then WeakAuras.ScanEvents("NEW_ID")
|
||||
else
|
||||
local hX, hY = aura_env.waypoints[aura_env.idee]["x"], aura_env.waypoints[aura_env.idee]["y"]
|
||||
local myMapID = C_Map.GetBestMapForUnit("player")
|
||||
local pX, pY = C_Map.GetPlayerMapPosition(myMapID, "player").x * 100, C_Map.GetPlayerMapPosition(myMapID, "player").y * 100
|
||||
local X = pX - hX
|
||||
local Y = pY - hY
|
||||
local playerFace = GetPlayerFacing() or 0
|
||||
local playerA = math.floor(playerFace * 100)
|
||||
playerA = range(playerA, 0, 630, 360) - 1
|
||||
playerA = - playerA
|
||||
playerA = playerA - 90
|
||||
if playerA < 0 then playerA = playerA + 360 end
|
||||
aura_env.hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2))) * 100
|
||||
aura_env.region.distance:SetText(math.floor(aura_env.hyp))
|
||||
aura_env.angle = math.deg(math.atan2(Y, X))
|
||||
aura_env.angle = aura_env.angle - playerA
|
||||
aura_env.angle = aura_env.angle - 180
|
||||
if aura_env.hyp < aura_env.wipeDistance then
|
||||
table.remove(aura_env.waypoints, aura_env.idee)
|
||||
aura_env.idee = nil
|
||||
WeakAuras.ScanEvents("NEW_ID")
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--NEW_ID REMOVE_ID
|
||||
function(e)
|
||||
if e == "NEW_ID" then
|
||||
if not IsInInstance() then
|
||||
local maxhyp = 100000
|
||||
local myMapID = C_Map.GetBestMapForUnit("player")
|
||||
local pX, pY = C_Map.GetPlayerMapPosition(myMapID, "player").x * 100, C_Map.GetPlayerMapPosition(myMapID, "player").y * 100
|
||||
for k,v in ipairs(aura_env.waypoints) do
|
||||
local hX, hY = aura_env.waypoints[k].x, aura_env.waypoints[k].y
|
||||
local X, Y = pX - hX, pY - hY
|
||||
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2)))
|
||||
if hyp < maxhyp then
|
||||
maxhyp = hyp
|
||||
aura_env.idee = k
|
||||
end
|
||||
end
|
||||
if not aura_env.idee then aura_env.noidee = true end
|
||||
if aura_env.idee then aura_env.noidee = nil end
|
||||
end
|
||||
elseif e == "REMOVE_ID" then
|
||||
if aura_env.idee then
|
||||
table.remove(aura_env.waypoints, aura_env.idee)
|
||||
aura_env.idee = nil
|
||||
WeakAuras.ScanEvents("NEW_ID")
|
||||
else
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ANIMATION
|
||||
function()
|
||||
if aura_env.angle then
|
||||
return - aura_env.angle
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.waypoints = {}
|
||||
if not aura_env.region.distance then
|
||||
local distance = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.distance = distance
|
||||
end
|
||||
aura_env.region.distance:ClearAllPoints()
|
||||
aura_env.region.distance:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", 16, "OUTLINE")
|
||||
aura_env.region.distance:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.distance:SetJustifyH("CENTER")
|
||||
aura_env.region.distance:SetJustifyV("CENTER")
|
||||
aura_env.region.distance:Show()
|
||||
aura_env.wipeDistance = 50
|
||||
--CHAT_MSG_CHANNEL
|
||||
function(e, msg, _, _, channel)
|
||||
if channel:match("General") and (channel:match("Nazjatar") or channel:match("Mechagon")) then
|
||||
if msg:match("(KX%-T57 (%d+%.?%d*))") then msg = msg:gsub("(KX%-T57 (%d+%.?%d*))", "") end
|
||||
local x, y = msg:match("(%d+%.?%d*)[ ,/]+(%d+%.?%d*)")
|
||||
if x and y then
|
||||
local command = x .. " " .. y
|
||||
aura_env.waypoints[#aura_env.waypoints + 1] = {["x"] = x, ["y"] = y,}
|
||||
WeakAuras.ScanEvents("NEW_ID")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--EVERY FRAME
|
||||
function()
|
||||
if not aura_env.noidee then
|
||||
local function range (val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
end
|
||||
if not aura_env.idee then WeakAuras.ScanEvents("NEW_ID")
|
||||
else
|
||||
local hX, hY = aura_env.waypoints[aura_env.idee]["x"], aura_env.waypoints[aura_env.idee]["y"]
|
||||
local myMapID = C_Map.GetBestMapForUnit("player")
|
||||
local pX, pY = C_Map.GetPlayerMapPosition(myMapID, "player").x * 100, C_Map.GetPlayerMapPosition(myMapID, "player").y * 100
|
||||
local X = pX - hX
|
||||
local Y = pY - hY
|
||||
local playerFace = GetPlayerFacing() or 0
|
||||
local playerA = math.floor(playerFace * 100)
|
||||
playerA = range(playerA, 0, 630, 360) - 1
|
||||
playerA = - playerA
|
||||
playerA = playerA - 90
|
||||
if playerA < 0 then playerA = playerA + 360 end
|
||||
aura_env.hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2))) * 100
|
||||
aura_env.region.distance:SetText(math.floor(aura_env.hyp))
|
||||
aura_env.angle = math.deg(math.atan2(Y, X))
|
||||
aura_env.angle = aura_env.angle - playerA
|
||||
aura_env.angle = aura_env.angle - 180
|
||||
if aura_env.hyp < aura_env.wipeDistance then
|
||||
table.remove(aura_env.waypoints, aura_env.idee)
|
||||
aura_env.idee = nil
|
||||
WeakAuras.ScanEvents("NEW_ID")
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--NEW_ID REMOVE_ID
|
||||
function(e)
|
||||
if e == "NEW_ID" then
|
||||
if not IsInInstance() then
|
||||
local maxhyp = 100000
|
||||
local myMapID = C_Map.GetBestMapForUnit("player")
|
||||
local pX, pY = C_Map.GetPlayerMapPosition(myMapID, "player").x * 100, C_Map.GetPlayerMapPosition(myMapID, "player").y * 100
|
||||
for k,v in ipairs(aura_env.waypoints) do
|
||||
local hX, hY = aura_env.waypoints[k].x, aura_env.waypoints[k].y
|
||||
local X, Y = pX - hX, pY - hY
|
||||
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2)))
|
||||
if hyp < maxhyp then
|
||||
maxhyp = hyp
|
||||
aura_env.idee = k
|
||||
end
|
||||
end
|
||||
if not aura_env.idee then aura_env.noidee = true end
|
||||
if aura_env.idee then aura_env.noidee = nil end
|
||||
end
|
||||
elseif e == "REMOVE_ID" then
|
||||
if aura_env.idee then
|
||||
table.remove(aura_env.waypoints, aura_env.idee)
|
||||
aura_env.idee = nil
|
||||
WeakAuras.ScanEvents("NEW_ID")
|
||||
else
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ANIMATION
|
||||
function()
|
||||
if aura_env.angle then
|
||||
return - aura_env.angle
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.waypoints = {}
|
||||
if not aura_env.region.distance then
|
||||
local distance = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.distance = distance
|
||||
end
|
||||
aura_env.region.distance:ClearAllPoints()
|
||||
aura_env.region.distance:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", 16, "OUTLINE")
|
||||
aura_env.region.distance:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.distance:SetJustifyH("CENTER")
|
||||
aura_env.region.distance:SetJustifyV("CENTER")
|
||||
aura_env.region.distance:Show()
|
||||
aura_env.wipeDistance = 50
|
||||
WeakAuras.ScanEvents("NEW_ID")
|
||||
@@ -1,4 +1,4 @@
|
||||
--PLAYER_ALIVE
|
||||
function()
|
||||
WeakAurasSaved["CustomTrash"] = ""
|
||||
--PLAYER_ALIVE
|
||||
function()
|
||||
WeakAurasSaved["CustomTrash"] = ""
|
||||
end
|
||||
@@ -1,42 +1,42 @@
|
||||
--CLEU UPDATE_TEXT
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local aura_env = aura_env
|
||||
if se == "SPELL_DAMAGE" or se == "SPELL_PERIODIC_DAMAGE" then
|
||||
local _, _, _, _, caster, _, _, _, target, _, _, sID, sName, sSchool, amount, overkill, school, resisted, blocked, absorbed, critical = ...
|
||||
if caster == UnitName("player") and critical == false then
|
||||
if not aura_env.hits then aura_env.hits = {} end
|
||||
local ID = #aura_env.hits + 1
|
||||
aura_env.hits[ID] =
|
||||
{
|
||||
["sID"] = sID,
|
||||
["sName"] = sName,
|
||||
["sSchool"] = sSchool,
|
||||
["amount"] = amount,
|
||||
["resisted"] = resisted,
|
||||
["blocked"] = blocked,
|
||||
["absorbed"] = absorbed,
|
||||
["target"] = target,
|
||||
["time"] = GetTime(),
|
||||
}
|
||||
WeakAuras.ScanEvents("UPDATE_TEXT")
|
||||
C_Timer.After(2, function() table.remove(aura_env.hits, ID); WeakAuras.ScanEvents("UPDATE_TEXT") end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE_TEXT" then
|
||||
aura_env.output = ""
|
||||
print(#aura_env.hits)
|
||||
for k,v in ipairs(aura_env.hits) do
|
||||
print(k, v.amount)
|
||||
aura_env.output = aura_env.output .. v.amount .. "\n"
|
||||
end
|
||||
print("")
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.output
|
||||
--CLEU UPDATE_TEXT
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local aura_env = aura_env
|
||||
if se == "SPELL_DAMAGE" or se == "SPELL_PERIODIC_DAMAGE" then
|
||||
local _, _, _, _, caster, _, _, _, target, _, _, sID, sName, sSchool, amount, overkill, school, resisted, blocked, absorbed, critical = ...
|
||||
if caster == UnitName("player") and critical == false then
|
||||
if not aura_env.hits then aura_env.hits = {} end
|
||||
local ID = #aura_env.hits + 1
|
||||
aura_env.hits[ID] =
|
||||
{
|
||||
["sID"] = sID,
|
||||
["sName"] = sName,
|
||||
["sSchool"] = sSchool,
|
||||
["amount"] = amount,
|
||||
["resisted"] = resisted,
|
||||
["blocked"] = blocked,
|
||||
["absorbed"] = absorbed,
|
||||
["target"] = target,
|
||||
["time"] = GetTime(),
|
||||
}
|
||||
WeakAuras.ScanEvents("UPDATE_TEXT")
|
||||
C_Timer.After(2, function() table.remove(aura_env.hits, ID); WeakAuras.ScanEvents("UPDATE_TEXT") end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE_TEXT" then
|
||||
aura_env.output = ""
|
||||
print(#aura_env.hits)
|
||||
for k,v in ipairs(aura_env.hits) do
|
||||
print(k, v.amount)
|
||||
aura_env.output = aura_env.output .. v.amount .. "\n"
|
||||
end
|
||||
print("")
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.output
|
||||
end
|
||||
@@ -1,22 +1,22 @@
|
||||
--UNIT_COMBAT
|
||||
function(_, target, event, _, amount)
|
||||
if target == "player" and event ~= "HEAL" and amount then
|
||||
aura_env.lasthit = GetTime()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--UNTRIGGER
|
||||
function()
|
||||
if aura_env.lasthit + 5 < GetTime() then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
return 5, aura_env.lasthit + 5
|
||||
end
|
||||
|
||||
--INIT
|
||||
--UNIT_COMBAT
|
||||
function(_, target, event, _, amount)
|
||||
if target == "player" and event ~= "HEAL" and amount then
|
||||
aura_env.lasthit = GetTime()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--UNTRIGGER
|
||||
function()
|
||||
if aura_env.lasthit + 5 < GetTime() then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
return 5, aura_env.lasthit + 5
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.lasthit = 0
|
||||
@@ -1,132 +1,132 @@
|
||||
--CHAT_MSG_WHISPER
|
||||
--/run SendChatMessage("hi", "WHISPER",_, UnitName("player"))
|
||||
function(e,msg,sender)
|
||||
sender = sender:gsub("-.+", "")
|
||||
msg = msg:lower()
|
||||
print(sender,msg)
|
||||
if msg == "setup party" and sender == UnitName("player") then
|
||||
aura_env.party()
|
||||
end
|
||||
if msg == "setup general" and sender == UnitName("player") then
|
||||
aura_env.general()
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.party = function()
|
||||
print("Setting party up")
|
||||
print("Check1 " .. ChatCOnfigChatSettingsLeftCheckBox1Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox1Check:GetChecked() == false then --Say
|
||||
ChatConfigChatSettingsLeftCheckBox1Check:Click()
|
||||
end
|
||||
print("Check4 " .. ChatCOnfigChatSettingsLeftCheckBox4Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox2Check:GetChecked() == false then --Emote
|
||||
ChatConfigChatSettingsLeftCheckBox2Check:Click()
|
||||
end
|
||||
print("Check5 " .. ChatCOnfigChatSettingsLeftCheckBox5Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox3Check:GetChecked() == false then --Yell
|
||||
ChatConfigChatSettingsLeftCheckBox3Check:Click()
|
||||
end
|
||||
print("Check6 " .. ChatCOnfigChatSettingsLeftCheckBox6Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox4Check:GetChecked() == true then --Guild chat
|
||||
ChatConfigChatSettingsLeftCheckBox4Check:Click()
|
||||
end
|
||||
print("Check7 " .. ChatCOnfigChatSettingsLeftCheckBox7Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox5Check:GetChecked() == true then --Officer chat
|
||||
ChatConfigChatSettingsLeftCheckBox5Check:Click()
|
||||
end
|
||||
print("Check8 " .. ChatCOnfigChatSettingsLeftCheckBox8Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox6Check:GetChecked() == true then --Guild announce
|
||||
ChatConfigChatSettingsLeftCheckBox6Check:Click()
|
||||
end
|
||||
print("Check9 " .. ChatCOnfigChatSettingsLeftCheckBox9Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox7Check:GetChecked() == true then --Achievement announce
|
||||
ChatConfigChatSettingsLeftCheckBox7Check:Click()
|
||||
end
|
||||
print("Check 10 " .. ChatCOnfigChatSettingsLeftCheckBox10Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox8Check:GetChecked() == false then --Whisper
|
||||
ChatConfigChatSettingsLeftCheckBox8Check:Click()
|
||||
end
|
||||
print("Check 11 " .. ChatCOnfigChatSettingsLeftCheckBox11Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox9Check:GetChecked() == false then --Blizzard whisper
|
||||
ChatConfigChatSettingsLeftCheckBox9Check:Click()
|
||||
end
|
||||
print("Check 12 " .. ChatCOnfigChatSettingsLeftCheckBox12Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox10Check:GetChecked() == false then --Party
|
||||
ChatConfigChatSettingsLeftCheckBox10Check:Click()
|
||||
end
|
||||
print("Check 13 " .. ChatCOnfigChatSettingsLeftCheckBox13Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox11Check:GetChecked() == false then --Party leader
|
||||
ChatConfigChatSettingsLeftCheckBox11Check:Click()
|
||||
end
|
||||
print("Check 14 " .. ChatCOnfigChatSettingsLeftCheckBox14Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox12Check:GetChecked() == false then --Raid
|
||||
ChatConfigChatSettingsLeftCheckBox12Check:Click()
|
||||
end
|
||||
print("Check 15 " .. ChatCOnfigChatSettingsLeftCheckBox15Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox13Check:GetChecked() == false then --Raid leader
|
||||
ChatConfigChatSettingsLeftCheckBox13Check:Click()
|
||||
end
|
||||
print("Check 16 " .. ChatCOnfigChatSettingsLeftCheckBox16Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox14Check:GetChecked() == false then --Raid Warning
|
||||
ChatConfigChatSettingsLeftCheckBox14Check:Click()
|
||||
end
|
||||
print("Check1 " .. ChatCOnfigChatSettingsLeftCheckBox1Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox15Check:GetChecked() == false then --Instance
|
||||
ChatConfigChatSettingsLeftCheckBox15Check:Click()
|
||||
end
|
||||
print("Check2 " .. ChatCOnfigChatSettingsLeftCheckBox2Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox16Check:GetChecked() == false then --Instance leader
|
||||
ChatConfigChatSettingsLeftCheckBox16Check:Click()
|
||||
end
|
||||
end
|
||||
aura_env.general = function()
|
||||
if ChatConfigChatSettingsLeftCheckBox1Check:GetChecked() == true then --Say
|
||||
ChatConfigChatSettingsLeftCheckBox1Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox2Check:GetChecked() == true then --Emote
|
||||
ChatConfigChatSettingsLeftCheckBox2Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox3Check:GetChecked() == true then --Yell
|
||||
ChatConfigChatSettingsLeftCheckBox3Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox4Check:GetChecked() == true then --Guild chat
|
||||
ChatConfigChatSettingsLeftCheckBox4Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox5Check:GetChecked() == true then --Officer chat
|
||||
ChatConfigChatSettingsLeftCheckBox5Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox6Check:GetChecked() == true then --Guild announce
|
||||
ChatConfigChatSettingsLeftCheckBox6Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox7Check:GetChecked() == true then --Achievement announce
|
||||
ChatConfigChatSettingsLeftCheckBox7Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox8Check:GetChecked() == true then --Whisper
|
||||
ChatConfigChatSettingsLeftCheckBox8Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox9Check:GetChecked() == true then --Blizzard whisper
|
||||
ChatConfigChatSettingsLeftCheckBox9Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox10Check:GetChecked() == true then --Party
|
||||
ChatConfigChatSettingsLeftCheckBox10Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox11Check:GetChecked() == true then --Party leader
|
||||
ChatConfigChatSettingsLeftCheckBox11Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox12Check:GetChecked() == true then --Raid
|
||||
ChatConfigChatSettingsLeftCheckBox12Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox13Check:GetChecked() == true then --Raid leader
|
||||
ChatConfigChatSettingsLeftCheckBox13Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox14Check:GetChecked() == true then --Raid Warning
|
||||
ChatConfigChatSettingsLeftCheckBox14Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox15Check:GetChecked() == true then --Instance
|
||||
ChatConfigChatSettingsLeftCheckBox15Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox16Check:GetChecked() == true then --Instance leader
|
||||
ChatConfigChatSettingsLeftCheckBox16Check:Click()
|
||||
end
|
||||
--CHAT_MSG_WHISPER
|
||||
--/run SendChatMessage("hi", "WHISPER",_, UnitName("player"))
|
||||
function(e,msg,sender)
|
||||
sender = sender:gsub("-.+", "")
|
||||
msg = msg:lower()
|
||||
print(sender,msg)
|
||||
if msg == "setup party" and sender == UnitName("player") then
|
||||
aura_env.party()
|
||||
end
|
||||
if msg == "setup general" and sender == UnitName("player") then
|
||||
aura_env.general()
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.party = function()
|
||||
print("Setting party up")
|
||||
print("Check1 " .. ChatCOnfigChatSettingsLeftCheckBox1Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox1Check:GetChecked() == false then --Say
|
||||
ChatConfigChatSettingsLeftCheckBox1Check:Click()
|
||||
end
|
||||
print("Check4 " .. ChatCOnfigChatSettingsLeftCheckBox4Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox2Check:GetChecked() == false then --Emote
|
||||
ChatConfigChatSettingsLeftCheckBox2Check:Click()
|
||||
end
|
||||
print("Check5 " .. ChatCOnfigChatSettingsLeftCheckBox5Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox3Check:GetChecked() == false then --Yell
|
||||
ChatConfigChatSettingsLeftCheckBox3Check:Click()
|
||||
end
|
||||
print("Check6 " .. ChatCOnfigChatSettingsLeftCheckBox6Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox4Check:GetChecked() == true then --Guild chat
|
||||
ChatConfigChatSettingsLeftCheckBox4Check:Click()
|
||||
end
|
||||
print("Check7 " .. ChatCOnfigChatSettingsLeftCheckBox7Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox5Check:GetChecked() == true then --Officer chat
|
||||
ChatConfigChatSettingsLeftCheckBox5Check:Click()
|
||||
end
|
||||
print("Check8 " .. ChatCOnfigChatSettingsLeftCheckBox8Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox6Check:GetChecked() == true then --Guild announce
|
||||
ChatConfigChatSettingsLeftCheckBox6Check:Click()
|
||||
end
|
||||
print("Check9 " .. ChatCOnfigChatSettingsLeftCheckBox9Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox7Check:GetChecked() == true then --Achievement announce
|
||||
ChatConfigChatSettingsLeftCheckBox7Check:Click()
|
||||
end
|
||||
print("Check 10 " .. ChatCOnfigChatSettingsLeftCheckBox10Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox8Check:GetChecked() == false then --Whisper
|
||||
ChatConfigChatSettingsLeftCheckBox8Check:Click()
|
||||
end
|
||||
print("Check 11 " .. ChatCOnfigChatSettingsLeftCheckBox11Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox9Check:GetChecked() == false then --Blizzard whisper
|
||||
ChatConfigChatSettingsLeftCheckBox9Check:Click()
|
||||
end
|
||||
print("Check 12 " .. ChatCOnfigChatSettingsLeftCheckBox12Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox10Check:GetChecked() == false then --Party
|
||||
ChatConfigChatSettingsLeftCheckBox10Check:Click()
|
||||
end
|
||||
print("Check 13 " .. ChatCOnfigChatSettingsLeftCheckBox13Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox11Check:GetChecked() == false then --Party leader
|
||||
ChatConfigChatSettingsLeftCheckBox11Check:Click()
|
||||
end
|
||||
print("Check 14 " .. ChatCOnfigChatSettingsLeftCheckBox14Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox12Check:GetChecked() == false then --Raid
|
||||
ChatConfigChatSettingsLeftCheckBox12Check:Click()
|
||||
end
|
||||
print("Check 15 " .. ChatCOnfigChatSettingsLeftCheckBox15Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox13Check:GetChecked() == false then --Raid leader
|
||||
ChatConfigChatSettingsLeftCheckBox13Check:Click()
|
||||
end
|
||||
print("Check 16 " .. ChatCOnfigChatSettingsLeftCheckBox16Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox14Check:GetChecked() == false then --Raid Warning
|
||||
ChatConfigChatSettingsLeftCheckBox14Check:Click()
|
||||
end
|
||||
print("Check1 " .. ChatCOnfigChatSettingsLeftCheckBox1Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox15Check:GetChecked() == false then --Instance
|
||||
ChatConfigChatSettingsLeftCheckBox15Check:Click()
|
||||
end
|
||||
print("Check2 " .. ChatCOnfigChatSettingsLeftCheckBox2Check:GetChecked())
|
||||
if ChatConfigChatSettingsLeftCheckBox16Check:GetChecked() == false then --Instance leader
|
||||
ChatConfigChatSettingsLeftCheckBox16Check:Click()
|
||||
end
|
||||
end
|
||||
aura_env.general = function()
|
||||
if ChatConfigChatSettingsLeftCheckBox1Check:GetChecked() == true then --Say
|
||||
ChatConfigChatSettingsLeftCheckBox1Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox2Check:GetChecked() == true then --Emote
|
||||
ChatConfigChatSettingsLeftCheckBox2Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox3Check:GetChecked() == true then --Yell
|
||||
ChatConfigChatSettingsLeftCheckBox3Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox4Check:GetChecked() == true then --Guild chat
|
||||
ChatConfigChatSettingsLeftCheckBox4Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox5Check:GetChecked() == true then --Officer chat
|
||||
ChatConfigChatSettingsLeftCheckBox5Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox6Check:GetChecked() == true then --Guild announce
|
||||
ChatConfigChatSettingsLeftCheckBox6Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox7Check:GetChecked() == true then --Achievement announce
|
||||
ChatConfigChatSettingsLeftCheckBox7Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox8Check:GetChecked() == true then --Whisper
|
||||
ChatConfigChatSettingsLeftCheckBox8Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox9Check:GetChecked() == true then --Blizzard whisper
|
||||
ChatConfigChatSettingsLeftCheckBox9Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox10Check:GetChecked() == true then --Party
|
||||
ChatConfigChatSettingsLeftCheckBox10Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox11Check:GetChecked() == true then --Party leader
|
||||
ChatConfigChatSettingsLeftCheckBox11Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox12Check:GetChecked() == true then --Raid
|
||||
ChatConfigChatSettingsLeftCheckBox12Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox13Check:GetChecked() == true then --Raid leader
|
||||
ChatConfigChatSettingsLeftCheckBox13Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox14Check:GetChecked() == true then --Raid Warning
|
||||
ChatConfigChatSettingsLeftCheckBox14Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox15Check:GetChecked() == true then --Instance
|
||||
ChatConfigChatSettingsLeftCheckBox15Check:Click()
|
||||
end
|
||||
if ChatConfigChatSettingsLeftCheckBox16Check:GetChecked() == true then --Instance leader
|
||||
ChatConfigChatSettingsLeftCheckBox16Check:Click()
|
||||
end
|
||||
end
|
||||
@@ -1,110 +1,110 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SWING_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
local bloq = select(17, ...)
|
||||
if bloq then
|
||||
aura_env.dmgbloq = aura_env.dmgbloq + bloq
|
||||
aura_env.numbloq = aura_env.numbloq + 1
|
||||
aura_env.region.blocks:SetText(aura_env.numbloq)
|
||||
aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq))
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
local bloq = select(20, ...)
|
||||
if bloq then
|
||||
aura_env.dmgbloq = aura_env.dmgbloq + bloq
|
||||
aura_env.numbloq = aura_env.numbloq + 1
|
||||
aura_env.region.blocks:SetText(aura_env.numbloq)
|
||||
aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq))
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_AURA_APPLIED" then
|
||||
local dest = select(6, ...)
|
||||
if dest == UnitName("player") then
|
||||
local name = select(14, ...)
|
||||
if name == "Shield Block" or name == "Last Stand" then
|
||||
aura_env.numbloq = 0
|
||||
aura_env.dmgbloq = 0
|
||||
aura_env.region.blocks:SetText(aura_env.numbloq)
|
||||
aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.numbloq = 0
|
||||
aura_env.dmgbloq = 0
|
||||
aura_env.color = function(damag)
|
||||
local damagcolor = "|cFFFFFFFF"
|
||||
if damag <= 0.25 * UnitHealth("player") then damagcolor = "|cFFFF0000"
|
||||
elseif damag > 0.25 * UnitHealth("player") and damag <= 0.5 * UnitHealth("player") then damagcolor = "|cFFFF8000"
|
||||
elseif damag > 0.5 * UnitHealth("player") and damag <= 0.75 * UnitHealth("player") then damagcolor = "|cFF00FF00"
|
||||
elseif damag > 0.75 * UnitHealth("player") and damag <= UnitHealth("player") then damagcolor = "|cFF00FFFF"
|
||||
elseif damag > UnitHealth("player") and damag <= 1.33 * UnitHealth("player") then damagcolor = "|cFFFF00FF"
|
||||
elseif damag > 1.33 * UnitHealth("player") and damag <= 1.66 * UnitHealth("player") then damagcolor = "|cFFFFFF00"
|
||||
elseif damag > 1.66 * UnitHealth("player") then damagcolor = "|c" end
|
||||
return damagcolor
|
||||
end
|
||||
local fontsize = 32
|
||||
if not aura_env.region.blocks then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.blocks = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.blocks:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", fontsize, "OUTLINE")
|
||||
aura_env.region.blocks:SetTextColor(1,1,1,1)
|
||||
aura_env.region.blocks:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.blocks:SetJustifyH("LEFT")
|
||||
aura_env.region.blocks:SetText("0")
|
||||
aura_env.region.blocks:Show()
|
||||
|
||||
if not aura_env.region.damag then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.damag = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.damag:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", 16, "OUTLINE")
|
||||
aura_env.region.damag:SetTextColor(1,1,1,1)
|
||||
aura_env.region.damag:SetPoint("CENTER", aura_env.region, "CENTER", 0, -32)
|
||||
aura_env.region.damag:SetJustifyH("LEFT")
|
||||
aura_env.region.damag:SetText("0")
|
||||
aura_env.region.damag:Show()
|
||||
|
||||
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.auraID = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return i
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SWING_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
local bloq = select(17, ...)
|
||||
if bloq then
|
||||
aura_env.dmgbloq = aura_env.dmgbloq + bloq
|
||||
aura_env.numbloq = aura_env.numbloq + 1
|
||||
aura_env.region.blocks:SetText(aura_env.numbloq)
|
||||
aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq))
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_DAMAGE" then
|
||||
local dest = select(10, ...)
|
||||
if dest == UnitName("player") then
|
||||
local bloq = select(20, ...)
|
||||
if bloq then
|
||||
aura_env.dmgbloq = aura_env.dmgbloq + bloq
|
||||
aura_env.numbloq = aura_env.numbloq + 1
|
||||
aura_env.region.blocks:SetText(aura_env.numbloq)
|
||||
aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq))
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_AURA_APPLIED" then
|
||||
local dest = select(6, ...)
|
||||
if dest == UnitName("player") then
|
||||
local name = select(14, ...)
|
||||
if name == "Shield Block" or name == "Last Stand" then
|
||||
aura_env.numbloq = 0
|
||||
aura_env.dmgbloq = 0
|
||||
aura_env.region.blocks:SetText(aura_env.numbloq)
|
||||
aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.numbloq = 0
|
||||
aura_env.dmgbloq = 0
|
||||
aura_env.color = function(damag)
|
||||
local damagcolor = "|cFFFFFFFF"
|
||||
if damag <= 0.25 * UnitHealth("player") then damagcolor = "|cFFFF0000"
|
||||
elseif damag > 0.25 * UnitHealth("player") and damag <= 0.5 * UnitHealth("player") then damagcolor = "|cFFFF8000"
|
||||
elseif damag > 0.5 * UnitHealth("player") and damag <= 0.75 * UnitHealth("player") then damagcolor = "|cFF00FF00"
|
||||
elseif damag > 0.75 * UnitHealth("player") and damag <= UnitHealth("player") then damagcolor = "|cFF00FFFF"
|
||||
elseif damag > UnitHealth("player") and damag <= 1.33 * UnitHealth("player") then damagcolor = "|cFFFF00FF"
|
||||
elseif damag > 1.33 * UnitHealth("player") and damag <= 1.66 * UnitHealth("player") then damagcolor = "|cFFFFFF00"
|
||||
elseif damag > 1.66 * UnitHealth("player") then damagcolor = "|c" end
|
||||
return damagcolor
|
||||
end
|
||||
local fontsize = 32
|
||||
if not aura_env.region.blocks then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.blocks = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.blocks:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", fontsize, "OUTLINE")
|
||||
aura_env.region.blocks:SetTextColor(1,1,1,1)
|
||||
aura_env.region.blocks:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.blocks:SetJustifyH("LEFT")
|
||||
aura_env.region.blocks:SetText("0")
|
||||
aura_env.region.blocks:Show()
|
||||
|
||||
if not aura_env.region.damag then
|
||||
local text = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.damag = text
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.damag:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", 16, "OUTLINE")
|
||||
aura_env.region.damag:SetTextColor(1,1,1,1)
|
||||
aura_env.region.damag:SetPoint("CENTER", aura_env.region, "CENTER", 0, -32)
|
||||
aura_env.region.damag:SetJustifyH("LEFT")
|
||||
aura_env.region.damag:SetText("0")
|
||||
aura_env.region.damag:Show()
|
||||
|
||||
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.auraID = function(spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return i
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,54 +1,54 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UPDATE REMOVE PLAYER_ALIVE
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
if se == "UNIT_DIED" then
|
||||
local name = select(9, ...)
|
||||
if name:match(aura_env.farmanimal) then
|
||||
local date = date()
|
||||
local h, m, s = date:match("%w+ %w+ %d* (%d*)%:(%d*)%:(%d*)") or 0, 0, 0
|
||||
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal][#WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] + 1] = {["h"] = h, ["m"] = m, ["s"] = s}
|
||||
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count = WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count + 1
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE" then
|
||||
return true
|
||||
elseif e == "REMOVE" then
|
||||
for i = 1, #WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] do
|
||||
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal][i] = nil
|
||||
end
|
||||
return true
|
||||
elseif e == "PLAYER_ALIVE" and IsInInstance() == false then
|
||||
ResetInstances()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local output = #WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] .. " " .. WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count .. " " .. WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count * aura_env.prob .. "%\n"
|
||||
local date = date()
|
||||
local h, m, s = date:match("%w+ %w+ %d* (%d*)%:(%d*)%:(%d*)") or 0, 0, 0
|
||||
for k,v in ipairs(WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal]) do
|
||||
output = output .. v.h .. ":" .. v.m .. ":" .. v.s .. " -" .. aura_env.round((s - v.s + (m - v.m) * 60 + (h - v.h) * 3600) / 60, 0) .. "m" .. "\n"
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.farmanimal = "Altairus"
|
||||
aura_env.prob = 0.8
|
||||
if not WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] then WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] = {}; WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count = 0 end
|
||||
aura_env.ticker = C_Timer.NewTicker(10, function() WeakAuras.ScanEvents("UPDATE") end)
|
||||
if WeakAuras.IsOptionsOpen() then
|
||||
aura_env.ticker:Cancel()
|
||||
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
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UPDATE REMOVE PLAYER_ALIVE
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
if se == "UNIT_DIED" then
|
||||
local name = select(9, ...)
|
||||
if name:match(aura_env.farmanimal) then
|
||||
local date = date()
|
||||
local h, m, s = date:match("%w+ %w+ %d* (%d*)%:(%d*)%:(%d*)") or 0, 0, 0
|
||||
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal][#WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] + 1] = {["h"] = h, ["m"] = m, ["s"] = s}
|
||||
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count = WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count + 1
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE" then
|
||||
return true
|
||||
elseif e == "REMOVE" then
|
||||
for i = 1, #WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] do
|
||||
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal][i] = nil
|
||||
end
|
||||
return true
|
||||
elseif e == "PLAYER_ALIVE" and IsInInstance() == false then
|
||||
ResetInstances()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local output = #WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] .. " " .. WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count .. " " .. WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count * aura_env.prob .. "%\n"
|
||||
local date = date()
|
||||
local h, m, s = date:match("%w+ %w+ %d* (%d*)%:(%d*)%:(%d*)") or 0, 0, 0
|
||||
for k,v in ipairs(WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal]) do
|
||||
output = output .. v.h .. ":" .. v.m .. ":" .. v.s .. " -" .. aura_env.round((s - v.s + (m - v.m) * 60 + (h - v.h) * 3600) / 60, 0) .. "m" .. "\n"
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.farmanimal = "Altairus"
|
||||
aura_env.prob = 0.8
|
||||
if not WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] then WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] = {}; WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count = 0 end
|
||||
aura_env.ticker = C_Timer.NewTicker(10, function() WeakAuras.ScanEvents("UPDATE") end)
|
||||
if WeakAuras.IsOptionsOpen() then
|
||||
aura_env.ticker:Cancel()
|
||||
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
|
||||
@@ -1,77 +1,77 @@
|
||||
--EVERY FRAME
|
||||
function()
|
||||
local crit, haste, mastery = aura_env.round(GetCritChance(), 2), aura_env.round(GetHaste(), 2), aura_env.round(GetMastery(), 2)
|
||||
aura_env.region.crit:SetText(crit); aura_env.region.haste:SetText(haste); aura_env.region.mastery:SetText(mastery)
|
||||
if crit >= 15 and crit < 20 then aura_env.region.crit:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1)
|
||||
elseif crit >= 20 and crit < 25 then aura_env.region.crit:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1)
|
||||
elseif crit >= 25 and crit < 30 then aura_env.region.crit:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1)
|
||||
elseif crit >= 30 and crit < 35 then aura_env.region.crit:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1)
|
||||
elseif crit >= 35 and crit < 40 then aura_env.region.crit:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1)
|
||||
elseif crit >= 40 then aura_env.region.crit:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1)
|
||||
end
|
||||
if haste >= 10 and haste < 20 then aura_env.region.haste:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1)
|
||||
elseif haste >= 20 and haste < 30 then aura_env.region.haste:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1)
|
||||
elseif haste >= 30 and haste < 40 then aura_env.region.haste:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1)
|
||||
elseif haste >= 40 and haste < 50 then aura_env.region.haste:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1)
|
||||
elseif haste >= 50 and haste < 60 then aura_env.region.haste:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1)
|
||||
elseif haste >= 60 then aura_env.region.haste:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1)
|
||||
end
|
||||
if mastery >= 15 and mastery < 20 then aura_env.region.mastery:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1)
|
||||
elseif mastery >= 20 and mastery < 25 then aura_env.region.mastery:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1)
|
||||
elseif mastery >= 25 and mastery < 35 then aura_env.region.mastery:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1)
|
||||
elseif mastery >= 35 and mastery < 40 then aura_env.region.mastery:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1)
|
||||
elseif mastery >= 40 and mastery < 45 then aura_env.region.mastery:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1)
|
||||
elseif mastery >= 45 then aura_env.region.mastery:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1)
|
||||
end
|
||||
return "Crit\nHaste\nMastery"
|
||||
end
|
||||
|
||||
--INIT
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
if not aura_env.region.crit then
|
||||
local crit = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.crit = crit
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.crit:SetFont(font, size, flags)
|
||||
aura_env.region.crit:SetTextColor(1,1,1,1)
|
||||
aura_env.region.crit:SetPoint("RIGHT", aura_env.region, "CENTER", 96, size)
|
||||
aura_env.region.crit:SetJustifyH("RIGHT")
|
||||
aura_env.region.crit:SetText("11111111")
|
||||
aura_env.region.crit:Show()
|
||||
if not aura_env.region.haste then
|
||||
local haste = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.haste = haste
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.haste:SetFont(font, size, flags)
|
||||
aura_env.region.haste:SetTextColor(1,1,1,1)
|
||||
aura_env.region.haste:SetPoint("RIGHT", aura_env.region, "CENTER", 96, 0)
|
||||
aura_env.region.haste:SetJustifyH("RIGHT")
|
||||
aura_env.region.haste:SetText("22222222")
|
||||
aura_env.region.haste:Show()
|
||||
if not aura_env.region.mastery then
|
||||
local mastery = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.mastery = mastery
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.mastery:SetFont(font, size, flags)
|
||||
aura_env.region.mastery:SetTextColor(1,1,1,1)
|
||||
aura_env.region.mastery:SetPoint("RIGHT", aura_env.region, "CENTER", 96, - size)
|
||||
aura_env.region.mastery:SetJustifyH("RIGHT")
|
||||
aura_env.region.mastery:SetText("33333333")
|
||||
aura_env.region.mastery:Show()
|
||||
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.c11, aura_env.c12, aura_env.c13 = 1, 0, 0
|
||||
aura_env.c21, aura_env.c22, aura_env.c23 = 1, 0.5, 0
|
||||
aura_env.c31, aura_env.c32, aura_env.c33 = 0, 1, 0
|
||||
aura_env.c41, aura_env.c42, aura_env.c43 = 0, 1, 1
|
||||
aura_env.c51, aura_env.c52, aura_env.c53 = 1, 0, 1
|
||||
--EVERY FRAME
|
||||
function()
|
||||
local crit, haste, mastery = aura_env.round(GetCritChance(), 2), aura_env.round(GetHaste(), 2), aura_env.round(GetMastery(), 2)
|
||||
aura_env.region.crit:SetText(crit); aura_env.region.haste:SetText(haste); aura_env.region.mastery:SetText(mastery)
|
||||
if crit >= 15 and crit < 20 then aura_env.region.crit:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1)
|
||||
elseif crit >= 20 and crit < 25 then aura_env.region.crit:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1)
|
||||
elseif crit >= 25 and crit < 30 then aura_env.region.crit:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1)
|
||||
elseif crit >= 30 and crit < 35 then aura_env.region.crit:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1)
|
||||
elseif crit >= 35 and crit < 40 then aura_env.region.crit:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1)
|
||||
elseif crit >= 40 then aura_env.region.crit:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1)
|
||||
end
|
||||
if haste >= 10 and haste < 20 then aura_env.region.haste:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1)
|
||||
elseif haste >= 20 and haste < 30 then aura_env.region.haste:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1)
|
||||
elseif haste >= 30 and haste < 40 then aura_env.region.haste:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1)
|
||||
elseif haste >= 40 and haste < 50 then aura_env.region.haste:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1)
|
||||
elseif haste >= 50 and haste < 60 then aura_env.region.haste:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1)
|
||||
elseif haste >= 60 then aura_env.region.haste:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1)
|
||||
end
|
||||
if mastery >= 15 and mastery < 20 then aura_env.region.mastery:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1)
|
||||
elseif mastery >= 20 and mastery < 25 then aura_env.region.mastery:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1)
|
||||
elseif mastery >= 25 and mastery < 35 then aura_env.region.mastery:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1)
|
||||
elseif mastery >= 35 and mastery < 40 then aura_env.region.mastery:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1)
|
||||
elseif mastery >= 40 and mastery < 45 then aura_env.region.mastery:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1)
|
||||
elseif mastery >= 45 then aura_env.region.mastery:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1)
|
||||
end
|
||||
return "Crit\nHaste\nMastery"
|
||||
end
|
||||
|
||||
--INIT
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
if not aura_env.region.crit then
|
||||
local crit = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.crit = crit
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.crit:SetFont(font, size, flags)
|
||||
aura_env.region.crit:SetTextColor(1,1,1,1)
|
||||
aura_env.region.crit:SetPoint("RIGHT", aura_env.region, "CENTER", 96, size)
|
||||
aura_env.region.crit:SetJustifyH("RIGHT")
|
||||
aura_env.region.crit:SetText("11111111")
|
||||
aura_env.region.crit:Show()
|
||||
if not aura_env.region.haste then
|
||||
local haste = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.haste = haste
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.haste:SetFont(font, size, flags)
|
||||
aura_env.region.haste:SetTextColor(1,1,1,1)
|
||||
aura_env.region.haste:SetPoint("RIGHT", aura_env.region, "CENTER", 96, 0)
|
||||
aura_env.region.haste:SetJustifyH("RIGHT")
|
||||
aura_env.region.haste:SetText("22222222")
|
||||
aura_env.region.haste:Show()
|
||||
if not aura_env.region.mastery then
|
||||
local mastery = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.mastery = mastery
|
||||
print("ok!")
|
||||
end
|
||||
aura_env.region.mastery:SetFont(font, size, flags)
|
||||
aura_env.region.mastery:SetTextColor(1,1,1,1)
|
||||
aura_env.region.mastery:SetPoint("RIGHT", aura_env.region, "CENTER", 96, - size)
|
||||
aura_env.region.mastery:SetJustifyH("RIGHT")
|
||||
aura_env.region.mastery:SetText("33333333")
|
||||
aura_env.region.mastery:Show()
|
||||
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.c11, aura_env.c12, aura_env.c13 = 1, 0, 0
|
||||
aura_env.c21, aura_env.c22, aura_env.c23 = 1, 0.5, 0
|
||||
aura_env.c31, aura_env.c32, aura_env.c33 = 0, 1, 0
|
||||
aura_env.c41, aura_env.c42, aura_env.c43 = 0, 1, 1
|
||||
aura_env.c51, aura_env.c52, aura_env.c53 = 1, 0, 1
|
||||
aura_env.c61, aura_env.c62, aura_env.c63 = 1, 1, 0
|
||||
@@ -1,160 +1,160 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED RESET GROUP_ROSTER_UPDATE
|
||||
function(...)
|
||||
local e = select(1, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local caster = select(6, ...)
|
||||
if UnitName(caster) then
|
||||
if UnitInParty(caster) or UnitName(caster) == UnitName("player") then
|
||||
local spell = select(14, ...)
|
||||
if aura_env.spells[spell] then
|
||||
caster = caster:gsub("%-.+", "")
|
||||
caster = caster:gsub(" ", "")
|
||||
if not aura_env.stuns[caster] then aura_env.stuns[caster] = 1 else aura_env.stuns[caster] = aura_env.stuns[caster] + 1 end
|
||||
local output1, output2 = "", ""
|
||||
for k,v in pairs(aura_env.stuns) do
|
||||
local class = UnitClass(k) or ""
|
||||
output1 = output1 .. aura_env.classColor(class) .. k .. "|r\n"
|
||||
output2 = output2 .. aura_env.classColor(class) .. v .. "|r\n"
|
||||
end
|
||||
aura_env.region.text2:SetText(output1)
|
||||
aura_env.region.text3:SetText(output2)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "GROUP_ROSTER_UPDATE" then
|
||||
aura_env.stuns = nil
|
||||
aura_env.stuns = {}
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text3:SetText("")
|
||||
elseif e == "RESET" then
|
||||
aura_env.stuns = nil
|
||||
aura_env.stuns = {}
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text3:SetText("")
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
aura_env.region.text2:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.text2:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0)
|
||||
aura_env.region.text2:SetJustifyH("LEFT")
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
|
||||
if not aura_env.region.text3 then
|
||||
local text3 = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text3 = text3
|
||||
end
|
||||
aura_env.region.text3:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.text3:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", 100, 0)
|
||||
aura_env.region.text3:SetJustifyH("LEFT")
|
||||
aura_env.region.text3:SetText("")
|
||||
aura_env.region.text3:Show()
|
||||
aura_env.stuns = {}
|
||||
aura_env.spells =
|
||||
{
|
||||
--DK
|
||||
["Asphyxiate"] = 1,
|
||||
["Gnaw"] = 1,
|
||||
["Monstrous Blow"] = 1,
|
||||
["Blinding Sleet"] = 1,
|
||||
["Death Grip"] = 1,
|
||||
["Gorefiend's Grasp"] = 1,
|
||||
["Mind Freeze"] = 1,
|
||||
["Shambling Rush"] = 1,
|
||||
|
||||
--DH
|
||||
["Chaos Nova"] = 1,
|
||||
["Fel Eruption"] = 1,
|
||||
["Sigil of Misery"] = 1,
|
||||
["Sigil of Chains"] = 1,
|
||||
["Disrupt"] = 1,
|
||||
|
||||
--Druid
|
||||
["Maim"] = 1,
|
||||
["Mighty Bash"] = 1,
|
||||
["Rake"] = 1,
|
||||
["Typhoon"] = 1,
|
||||
["Ursol's Vortex"] = 1,
|
||||
["Skull Bash"] = 1,
|
||||
|
||||
--Hunter
|
||||
["Intimidation"] = 1,
|
||||
["Bursting Shot"] = 1,
|
||||
["Muzzle"] = 1,
|
||||
["Counter Shot"] = 1,
|
||||
|
||||
--Monk
|
||||
["Leg Sweep"] = 1,
|
||||
["Song of Chi-ji"] = 1,
|
||||
["Ring of Peace"] = 1,
|
||||
["Spear Hand Strike"] = 1,
|
||||
|
||||
--Mage
|
||||
["Dragon's Breath"] = 1,
|
||||
["Blast Wave"] = 1,
|
||||
["Supernova"] = 1,
|
||||
|
||||
--Paladin
|
||||
["Hammer of Justice"] = 1,
|
||||
["Blinding Light"] = 1,
|
||||
["Avenger's Shield"] = 1,
|
||||
["Rebuke"] = 1,
|
||||
|
||||
--Priest
|
||||
["Holy Word: Chastise"] = 1,
|
||||
["Psychic Horror"] = 1,
|
||||
["Mind Bomb"] = 1,
|
||||
["Psychic Scream"] = 1,
|
||||
["Silence"] = 1,
|
||||
|
||||
--Rogue
|
||||
["Between the Eyes"] = 1,
|
||||
["Cheap Shot"] = 1,
|
||||
["Kidney Shot"] = 1,
|
||||
["Blind"] = 1,
|
||||
["Kick"] = 1,
|
||||
|
||||
--Shaman
|
||||
["Capacitor Totem"] = 1,
|
||||
["Pulverize"] = 1,
|
||||
["Thunderstorm"] = 1,
|
||||
["Wind Shear"] = 1,
|
||||
|
||||
--Warlock
|
||||
["Axe Toss"] = 1,
|
||||
["Shadowfury"] = 1,
|
||||
["Summon Infernal"] = 1,
|
||||
["Seduction"] = 1,
|
||||
["Spell Lock"] = 1,
|
||||
|
||||
--Warrior
|
||||
["Shockwave"] = 1,
|
||||
["Storm Bolt"] = 1,
|
||||
["Intimidating Shout"] = 1,
|
||||
["Pummel"] = 1,
|
||||
}
|
||||
aura_env.classColor = function(class)
|
||||
if class == "Death Knight" then return "|cFFC41F3B" elseif
|
||||
class == "Demon Hunter" then return "|cFFA330C9" elseif
|
||||
class == "Druid" then return "|cFFFF7D0A" elseif
|
||||
class == "Hunter" then return "|cFFABD473" elseif
|
||||
class == "Mage" then return "|cFF40C7EB" elseif
|
||||
class == "Monk" then return "|cFF00FF96" elseif
|
||||
class == "Paladin" then return "|cFFF58CBA" elseif
|
||||
class == "Priest" then return "|cFFFFFFFF" elseif
|
||||
class == "Rogue" then return "|cFFFFF569" elseif
|
||||
class == "Shaman" then return "|cFF0070DE" elseif
|
||||
class == "Warlock" then return "|cFF8787ED" elseif
|
||||
class == "Warrior" then return "|cFFC79C6E" else
|
||||
return "|cFFFFFFFF" end
|
||||
--COMBAT_LOG_EVENT_UNFILTERED RESET GROUP_ROSTER_UPDATE
|
||||
function(...)
|
||||
local e = select(1, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local caster = select(6, ...)
|
||||
if UnitName(caster) then
|
||||
if UnitInParty(caster) or UnitName(caster) == UnitName("player") then
|
||||
local spell = select(14, ...)
|
||||
if aura_env.spells[spell] then
|
||||
caster = caster:gsub("%-.+", "")
|
||||
caster = caster:gsub(" ", "")
|
||||
if not aura_env.stuns[caster] then aura_env.stuns[caster] = 1 else aura_env.stuns[caster] = aura_env.stuns[caster] + 1 end
|
||||
local output1, output2 = "", ""
|
||||
for k,v in pairs(aura_env.stuns) do
|
||||
local class = UnitClass(k) or ""
|
||||
output1 = output1 .. aura_env.classColor(class) .. k .. "|r\n"
|
||||
output2 = output2 .. aura_env.classColor(class) .. v .. "|r\n"
|
||||
end
|
||||
aura_env.region.text2:SetText(output1)
|
||||
aura_env.region.text3:SetText(output2)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "GROUP_ROSTER_UPDATE" then
|
||||
aura_env.stuns = nil
|
||||
aura_env.stuns = {}
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text3:SetText("")
|
||||
elseif e == "RESET" then
|
||||
aura_env.stuns = nil
|
||||
aura_env.stuns = {}
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text3:SetText("")
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
aura_env.region.text2:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.text2:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0)
|
||||
aura_env.region.text2:SetJustifyH("LEFT")
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
|
||||
if not aura_env.region.text3 then
|
||||
local text3 = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text3 = text3
|
||||
end
|
||||
aura_env.region.text3:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.text3:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", 100, 0)
|
||||
aura_env.region.text3:SetJustifyH("LEFT")
|
||||
aura_env.region.text3:SetText("")
|
||||
aura_env.region.text3:Show()
|
||||
aura_env.stuns = {}
|
||||
aura_env.spells =
|
||||
{
|
||||
--DK
|
||||
["Asphyxiate"] = 1,
|
||||
["Gnaw"] = 1,
|
||||
["Monstrous Blow"] = 1,
|
||||
["Blinding Sleet"] = 1,
|
||||
["Death Grip"] = 1,
|
||||
["Gorefiend's Grasp"] = 1,
|
||||
["Mind Freeze"] = 1,
|
||||
["Shambling Rush"] = 1,
|
||||
|
||||
--DH
|
||||
["Chaos Nova"] = 1,
|
||||
["Fel Eruption"] = 1,
|
||||
["Sigil of Misery"] = 1,
|
||||
["Sigil of Chains"] = 1,
|
||||
["Disrupt"] = 1,
|
||||
|
||||
--Druid
|
||||
["Maim"] = 1,
|
||||
["Mighty Bash"] = 1,
|
||||
["Rake"] = 1,
|
||||
["Typhoon"] = 1,
|
||||
["Ursol's Vortex"] = 1,
|
||||
["Skull Bash"] = 1,
|
||||
|
||||
--Hunter
|
||||
["Intimidation"] = 1,
|
||||
["Bursting Shot"] = 1,
|
||||
["Muzzle"] = 1,
|
||||
["Counter Shot"] = 1,
|
||||
|
||||
--Monk
|
||||
["Leg Sweep"] = 1,
|
||||
["Song of Chi-ji"] = 1,
|
||||
["Ring of Peace"] = 1,
|
||||
["Spear Hand Strike"] = 1,
|
||||
|
||||
--Mage
|
||||
["Dragon's Breath"] = 1,
|
||||
["Blast Wave"] = 1,
|
||||
["Supernova"] = 1,
|
||||
|
||||
--Paladin
|
||||
["Hammer of Justice"] = 1,
|
||||
["Blinding Light"] = 1,
|
||||
["Avenger's Shield"] = 1,
|
||||
["Rebuke"] = 1,
|
||||
|
||||
--Priest
|
||||
["Holy Word: Chastise"] = 1,
|
||||
["Psychic Horror"] = 1,
|
||||
["Mind Bomb"] = 1,
|
||||
["Psychic Scream"] = 1,
|
||||
["Silence"] = 1,
|
||||
|
||||
--Rogue
|
||||
["Between the Eyes"] = 1,
|
||||
["Cheap Shot"] = 1,
|
||||
["Kidney Shot"] = 1,
|
||||
["Blind"] = 1,
|
||||
["Kick"] = 1,
|
||||
|
||||
--Shaman
|
||||
["Capacitor Totem"] = 1,
|
||||
["Pulverize"] = 1,
|
||||
["Thunderstorm"] = 1,
|
||||
["Wind Shear"] = 1,
|
||||
|
||||
--Warlock
|
||||
["Axe Toss"] = 1,
|
||||
["Shadowfury"] = 1,
|
||||
["Summon Infernal"] = 1,
|
||||
["Seduction"] = 1,
|
||||
["Spell Lock"] = 1,
|
||||
|
||||
--Warrior
|
||||
["Shockwave"] = 1,
|
||||
["Storm Bolt"] = 1,
|
||||
["Intimidating Shout"] = 1,
|
||||
["Pummel"] = 1,
|
||||
}
|
||||
aura_env.classColor = function(class)
|
||||
if class == "Death Knight" then return "|cFFC41F3B" elseif
|
||||
class == "Demon Hunter" then return "|cFFA330C9" elseif
|
||||
class == "Druid" then return "|cFFFF7D0A" elseif
|
||||
class == "Hunter" then return "|cFFABD473" elseif
|
||||
class == "Mage" then return "|cFF40C7EB" elseif
|
||||
class == "Monk" then return "|cFF00FF96" elseif
|
||||
class == "Paladin" then return "|cFFF58CBA" elseif
|
||||
class == "Priest" then return "|cFFFFFFFF" elseif
|
||||
class == "Rogue" then return "|cFFFFF569" elseif
|
||||
class == "Shaman" then return "|cFF0070DE" elseif
|
||||
class == "Warlock" then return "|cFF8787ED" elseif
|
||||
class == "Warrior" then return "|cFFC79C6E" else
|
||||
return "|cFFFFFFFF" end
|
||||
end
|
||||
@@ -1,137 +1,137 @@
|
||||
--CLEU
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local spell = select(14, ...)
|
||||
if aura_env.spells[spell] then
|
||||
local caster = select(6, ...)
|
||||
caster = caster:gsub("%-.+", "")
|
||||
caster = caster:gsub(" ", "")
|
||||
if #aura_env.stuns == 5 then
|
||||
table.remove(aura_env.stuns, 1)
|
||||
table.insert(aura_env.stuns, caster .. " - " .. spell)
|
||||
else
|
||||
table.insert(aura_env.stuns, caster .. " - " .. spell)
|
||||
end
|
||||
local output = ""
|
||||
for k,v in ipairs(aura_env.stuns) do
|
||||
local name = v:match("(.-) ")
|
||||
local class = UnitClass(name) or ""
|
||||
output = output .. aura_env.classColor(class) .. v .. "|r\n"
|
||||
end
|
||||
aura_env.region.text2:SetText(output)
|
||||
aura_env.region.text2:Show()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
aura_env.region.text2:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.text2:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0)
|
||||
aura_env.region.text2:SetJustifyH("CENTER")
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
aura_env.stuns = {}
|
||||
aura_env.spells =
|
||||
{
|
||||
--DK
|
||||
["Asphyxiate"] = 1,
|
||||
["Gnaw"] = 1,
|
||||
["Monstrous Blow"] = 1,
|
||||
["Blinding Sleet"] = 1,
|
||||
["Death Grip"] = 1,
|
||||
["Gorefiend's Grasp"] = 1,
|
||||
["Mind Freeze"] = 1,
|
||||
["Shambling Rush"] = 1,
|
||||
|
||||
--DH
|
||||
["Chaos Nova"] = 1,
|
||||
["Fel Eruption"] = 1,
|
||||
["Sigil of Misery"] = 1,
|
||||
["Sigil of Chains"] = 1,
|
||||
["Disrupt"] = 1,
|
||||
|
||||
--Druid
|
||||
["Maim"] = 1,
|
||||
["Mighty Bash"] = 1,
|
||||
["Rake"] = 1,
|
||||
["Typhoon"] = 1,
|
||||
["Ursol's Vortex"] = 1,
|
||||
["Skull Bash"] = 1,
|
||||
|
||||
--Hunter
|
||||
["Intimidation"] = 1,
|
||||
["Bursting Shot"] = 1,
|
||||
["Muzzle"] = 1,
|
||||
["Counter Shot"] = 1,
|
||||
|
||||
--Monk
|
||||
["Leg Sweep"] = 1,
|
||||
["Song of Chi-ji"] = 1,
|
||||
["Ring of Peace"] = 1,
|
||||
["Spear Hand Strike"] = 1,
|
||||
|
||||
--Mage
|
||||
["Dragon's Breath"] = 1,
|
||||
["Blast Wave"] = 1,
|
||||
["Supernova"] = 1,
|
||||
|
||||
--Paladin
|
||||
["Hammer of Justice"] = 1,
|
||||
["Blinding Light"] = 1,
|
||||
["Avenger's Shield"] = 1,
|
||||
["Rebuke"] = 1,
|
||||
|
||||
--Priest
|
||||
["Holy Word: Chastise"] = 1,
|
||||
["Psychic Horror"] = 1,
|
||||
["Mind Bomb"] = 1,
|
||||
["Psychic Scream"] = 1,
|
||||
["Silence"] = 1,
|
||||
|
||||
--Rogue
|
||||
["Between the Eyes"] = 1,
|
||||
["Cheap Shot"] = 1,
|
||||
["Kidney Shot"] = 1,
|
||||
["Blind"] = 1,
|
||||
["Kick"] = 1,
|
||||
|
||||
--Shaman
|
||||
["Capacitor Totem"] = 1,
|
||||
["Pulverize"] = 1,
|
||||
["Thunderstorm"] = 1,
|
||||
["Wind Shear"] = 1,
|
||||
|
||||
--Warlock
|
||||
["Axe Toss"] = 1,
|
||||
["Shadowfury"] = 1,
|
||||
["Summon Infernal"] = 1,
|
||||
["Seduction"] = 1,
|
||||
["Spell Lock"] = 1,
|
||||
|
||||
--Warrior
|
||||
["Shockwave"] = 1,
|
||||
["Storm Bolt"] = 1,
|
||||
["Intimidating Shout"] = 1,
|
||||
["Pummel"] = 1,
|
||||
}
|
||||
aura_env.classColor = function(class)
|
||||
if class == "Death Knight" then return "|cFFC41F3B" elseif
|
||||
class == "Demon Hunter" then return "|cFFA330C9" elseif
|
||||
class == "Druid" then return "|cFFFF7D0A" elseif
|
||||
class == "Hunter" then return "|cFFABD473" elseif
|
||||
class == "Mage" then return "|cFF40C7EB" elseif
|
||||
class == "Monk" then return "|cFF00FF96" elseif
|
||||
class == "Paladin" then return "|cFFF58CBA" elseif
|
||||
class == "Priest" then return "|cFFFFFFFF" elseif
|
||||
class == "Rogue" then return "|cFFFFF569" elseif
|
||||
class == "Shaman" then return "|cFF0070DE" elseif
|
||||
class == "Warlock" then return "|cFF8787ED" elseif
|
||||
class == "Warrior" then return "|cFFC79C6E" else
|
||||
return "|cFFFFFFFF" end
|
||||
--CLEU
|
||||
function(...)
|
||||
local se = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local spell = select(14, ...)
|
||||
if aura_env.spells[spell] then
|
||||
local caster = select(6, ...)
|
||||
caster = caster:gsub("%-.+", "")
|
||||
caster = caster:gsub(" ", "")
|
||||
if #aura_env.stuns == 5 then
|
||||
table.remove(aura_env.stuns, 1)
|
||||
table.insert(aura_env.stuns, caster .. " - " .. spell)
|
||||
else
|
||||
table.insert(aura_env.stuns, caster .. " - " .. spell)
|
||||
end
|
||||
local output = ""
|
||||
for k,v in ipairs(aura_env.stuns) do
|
||||
local name = v:match("(.-) ")
|
||||
local class = UnitClass(name) or ""
|
||||
output = output .. aura_env.classColor(class) .. v .. "|r\n"
|
||||
end
|
||||
aura_env.region.text2:SetText(output)
|
||||
aura_env.region.text2:Show()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, "OVERLAY")
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
aura_env.region.text2:SetFont(aura_env.region.text:GetFont())
|
||||
aura_env.region.text2:SetTextColor(1,1,1,1)
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0)
|
||||
aura_env.region.text2:SetJustifyH("CENTER")
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
aura_env.stuns = {}
|
||||
aura_env.spells =
|
||||
{
|
||||
--DK
|
||||
["Asphyxiate"] = 1,
|
||||
["Gnaw"] = 1,
|
||||
["Monstrous Blow"] = 1,
|
||||
["Blinding Sleet"] = 1,
|
||||
["Death Grip"] = 1,
|
||||
["Gorefiend's Grasp"] = 1,
|
||||
["Mind Freeze"] = 1,
|
||||
["Shambling Rush"] = 1,
|
||||
|
||||
--DH
|
||||
["Chaos Nova"] = 1,
|
||||
["Fel Eruption"] = 1,
|
||||
["Sigil of Misery"] = 1,
|
||||
["Sigil of Chains"] = 1,
|
||||
["Disrupt"] = 1,
|
||||
|
||||
--Druid
|
||||
["Maim"] = 1,
|
||||
["Mighty Bash"] = 1,
|
||||
["Rake"] = 1,
|
||||
["Typhoon"] = 1,
|
||||
["Ursol's Vortex"] = 1,
|
||||
["Skull Bash"] = 1,
|
||||
|
||||
--Hunter
|
||||
["Intimidation"] = 1,
|
||||
["Bursting Shot"] = 1,
|
||||
["Muzzle"] = 1,
|
||||
["Counter Shot"] = 1,
|
||||
|
||||
--Monk
|
||||
["Leg Sweep"] = 1,
|
||||
["Song of Chi-ji"] = 1,
|
||||
["Ring of Peace"] = 1,
|
||||
["Spear Hand Strike"] = 1,
|
||||
|
||||
--Mage
|
||||
["Dragon's Breath"] = 1,
|
||||
["Blast Wave"] = 1,
|
||||
["Supernova"] = 1,
|
||||
|
||||
--Paladin
|
||||
["Hammer of Justice"] = 1,
|
||||
["Blinding Light"] = 1,
|
||||
["Avenger's Shield"] = 1,
|
||||
["Rebuke"] = 1,
|
||||
|
||||
--Priest
|
||||
["Holy Word: Chastise"] = 1,
|
||||
["Psychic Horror"] = 1,
|
||||
["Mind Bomb"] = 1,
|
||||
["Psychic Scream"] = 1,
|
||||
["Silence"] = 1,
|
||||
|
||||
--Rogue
|
||||
["Between the Eyes"] = 1,
|
||||
["Cheap Shot"] = 1,
|
||||
["Kidney Shot"] = 1,
|
||||
["Blind"] = 1,
|
||||
["Kick"] = 1,
|
||||
|
||||
--Shaman
|
||||
["Capacitor Totem"] = 1,
|
||||
["Pulverize"] = 1,
|
||||
["Thunderstorm"] = 1,
|
||||
["Wind Shear"] = 1,
|
||||
|
||||
--Warlock
|
||||
["Axe Toss"] = 1,
|
||||
["Shadowfury"] = 1,
|
||||
["Summon Infernal"] = 1,
|
||||
["Seduction"] = 1,
|
||||
["Spell Lock"] = 1,
|
||||
|
||||
--Warrior
|
||||
["Shockwave"] = 1,
|
||||
["Storm Bolt"] = 1,
|
||||
["Intimidating Shout"] = 1,
|
||||
["Pummel"] = 1,
|
||||
}
|
||||
aura_env.classColor = function(class)
|
||||
if class == "Death Knight" then return "|cFFC41F3B" elseif
|
||||
class == "Demon Hunter" then return "|cFFA330C9" elseif
|
||||
class == "Druid" then return "|cFFFF7D0A" elseif
|
||||
class == "Hunter" then return "|cFFABD473" elseif
|
||||
class == "Mage" then return "|cFF40C7EB" elseif
|
||||
class == "Monk" then return "|cFF00FF96" elseif
|
||||
class == "Paladin" then return "|cFFF58CBA" elseif
|
||||
class == "Priest" then return "|cFFFFFFFF" elseif
|
||||
class == "Rogue" then return "|cFFFFF569" elseif
|
||||
class == "Shaman" then return "|cFF0070DE" elseif
|
||||
class == "Warlock" then return "|cFF8787ED" elseif
|
||||
class == "Warrior" then return "|cFFC79C6E" else
|
||||
return "|cFFFFFFFF" end
|
||||
end
|
||||
@@ -1,106 +1,106 @@
|
||||
--UNIT_HEALTH NAME_PLATE_UNIT_REMOVED NAME_PLATE_UNIT_ADDED UNIT_THREAT_LIST_UPDATE PLAYER_TARGET_CHANGED
|
||||
function(allstates, e, u)
|
||||
if e == "PLAYER_TARGET_CHANGED" then
|
||||
return true
|
||||
elseif e == "UNIT_HEALTH" or e == "UNIT_THREAT_LIST_UPDATE" then
|
||||
if u then
|
||||
print(UnitDetailedThreatSituation("player", u))
|
||||
if UnitExists(u) and u:match("nameplate") and UnitDetailedThreatSituation("player", u) then
|
||||
local threat = select(5, UnitDetailedThreatSituation("player", u))
|
||||
local tank = UnitDetailedThreatSituation("player", u)
|
||||
local hp = UnitHealth(u)
|
||||
local maxhp = UnitHealthMax(u)
|
||||
local php = aura_env.round((hp / maxhp) * 100, 1)
|
||||
local name = UnitName(u)
|
||||
local target = false
|
||||
if UnitIsUnit(u, "target") then target = true end
|
||||
allstates[u] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
name = name,
|
||||
unit = u,
|
||||
value = hp,
|
||||
total = maxhp,
|
||||
index = php,
|
||||
shp = aura_env.shorten(hp),
|
||||
tank = tank,
|
||||
target = target,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
if allstates[u] then allstates[u].changed = true; allstates[u].show = false; return true end
|
||||
elseif e == "NAME_PLATE_UNIT_ADDED" then
|
||||
if not allstates[u] then
|
||||
if u then
|
||||
if UnitExists(u) and UnitDetailedThreatSituation("player", u) then
|
||||
local threat = select(5, UnitDetailedThreatSituation("player", u))
|
||||
local tank = UnitDetailedThreatSituation("player", u)
|
||||
local hp = UnitHealth(u)
|
||||
local maxhp = UnitHealthMax(u)
|
||||
local php = aura_env.round((hp / maxhp) * 100, 1)
|
||||
local name = UnitName(u)
|
||||
local target = false
|
||||
if UnitIsUnit(u, "target") then target = true end
|
||||
allstates[u] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
name = name,
|
||||
unit = u,
|
||||
value = hp,
|
||||
total = maxhp,
|
||||
index = php,
|
||||
shp = aura_env.shorten(hp),
|
||||
tank = tank,
|
||||
target = target,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ADDITIONAL INFO
|
||||
{
|
||||
tank = "bool",
|
||||
target = "bool",
|
||||
index = "number",
|
||||
}
|
||||
|
||||
--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
|
||||
--UNIT_HEALTH NAME_PLATE_UNIT_REMOVED NAME_PLATE_UNIT_ADDED UNIT_THREAT_LIST_UPDATE PLAYER_TARGET_CHANGED
|
||||
function(allstates, e, u)
|
||||
if e == "PLAYER_TARGET_CHANGED" then
|
||||
return true
|
||||
elseif e == "UNIT_HEALTH" or e == "UNIT_THREAT_LIST_UPDATE" then
|
||||
if u then
|
||||
print(UnitDetailedThreatSituation("player", u))
|
||||
if UnitExists(u) and u:match("nameplate") and UnitDetailedThreatSituation("player", u) then
|
||||
local threat = select(5, UnitDetailedThreatSituation("player", u))
|
||||
local tank = UnitDetailedThreatSituation("player", u)
|
||||
local hp = UnitHealth(u)
|
||||
local maxhp = UnitHealthMax(u)
|
||||
local php = aura_env.round((hp / maxhp) * 100, 1)
|
||||
local name = UnitName(u)
|
||||
local target = false
|
||||
if UnitIsUnit(u, "target") then target = true end
|
||||
allstates[u] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
name = name,
|
||||
unit = u,
|
||||
value = hp,
|
||||
total = maxhp,
|
||||
index = php,
|
||||
shp = aura_env.shorten(hp),
|
||||
tank = tank,
|
||||
target = target,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
if allstates[u] then allstates[u].changed = true; allstates[u].show = false; return true end
|
||||
elseif e == "NAME_PLATE_UNIT_ADDED" then
|
||||
if not allstates[u] then
|
||||
if u then
|
||||
if UnitExists(u) and UnitDetailedThreatSituation("player", u) then
|
||||
local threat = select(5, UnitDetailedThreatSituation("player", u))
|
||||
local tank = UnitDetailedThreatSituation("player", u)
|
||||
local hp = UnitHealth(u)
|
||||
local maxhp = UnitHealthMax(u)
|
||||
local php = aura_env.round((hp / maxhp) * 100, 1)
|
||||
local name = UnitName(u)
|
||||
local target = false
|
||||
if UnitIsUnit(u, "target") then target = true end
|
||||
allstates[u] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
name = name,
|
||||
unit = u,
|
||||
value = hp,
|
||||
total = maxhp,
|
||||
index = php,
|
||||
shp = aura_env.shorten(hp),
|
||||
tank = tank,
|
||||
target = target,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ADDITIONAL INFO
|
||||
{
|
||||
tank = "bool",
|
||||
target = "bool",
|
||||
index = "number",
|
||||
}
|
||||
|
||||
--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
|
||||
@@ -1,121 +1,121 @@
|
||||
--TSU
|
||||
--UNIT_HEALTH NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(allstates)
|
||||
for _,v in pairs(allstates) do
|
||||
v.show = false
|
||||
v.changed = true
|
||||
end
|
||||
|
||||
for i = 1, 40 do
|
||||
local unit = "nameplate" .. i
|
||||
if UnitExists(unit) then
|
||||
if UnitIsPlayer(unit) then
|
||||
print("3", unit)
|
||||
if UnitIsEnemy("player", unit) then
|
||||
print("4", unit)
|
||||
local hp = UnitHealth(unit)
|
||||
local maxHp = UnitHealthMax(unit)
|
||||
local hppp = aura_env.round(hp / maxHp * 100, 2)
|
||||
local shortHP = aura_env.shorten(hp)
|
||||
local shortmaxHP = aura_env.shorten(maxHp)
|
||||
local name = UnitName(unit)
|
||||
local class = UnitClass(unit)
|
||||
print(hp, maxHp, hppp, shortHP, shortmaxHP, name, class)
|
||||
allstates[unit] =
|
||||
{
|
||||
changed = true,
|
||||
show = true,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
value = hp,
|
||||
total = maxHp,
|
||||
index = hppp,
|
||||
name = name,
|
||||
hppp = hppp,
|
||||
shortHP = shortHP,
|
||||
shortmaxHP = shortmaxHP,
|
||||
class = class,
|
||||
}
|
||||
end
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
return true
|
||||
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
|
||||
|
||||
--ANIMATION
|
||||
function()
|
||||
if aura_env.state then
|
||||
-- print(aura_env.state.class)
|
||||
return aura_env.classColor(aura_env.state.class)
|
||||
end
|
||||
--TSU
|
||||
--UNIT_HEALTH NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||
function(allstates)
|
||||
for _,v in pairs(allstates) do
|
||||
v.show = false
|
||||
v.changed = true
|
||||
end
|
||||
|
||||
for i = 1, 40 do
|
||||
local unit = "nameplate" .. i
|
||||
if UnitExists(unit) then
|
||||
if UnitIsPlayer(unit) then
|
||||
print("3", unit)
|
||||
if UnitIsEnemy("player", unit) then
|
||||
print("4", unit)
|
||||
local hp = UnitHealth(unit)
|
||||
local maxHp = UnitHealthMax(unit)
|
||||
local hppp = aura_env.round(hp / maxHp * 100, 2)
|
||||
local shortHP = aura_env.shorten(hp)
|
||||
local shortmaxHP = aura_env.shorten(maxHp)
|
||||
local name = UnitName(unit)
|
||||
local class = UnitClass(unit)
|
||||
print(hp, maxHp, hppp, shortHP, shortmaxHP, name, class)
|
||||
allstates[unit] =
|
||||
{
|
||||
changed = true,
|
||||
show = true,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
value = hp,
|
||||
total = maxHp,
|
||||
index = hppp,
|
||||
name = name,
|
||||
hppp = hppp,
|
||||
shortHP = shortHP,
|
||||
shortmaxHP = shortmaxHP,
|
||||
class = class,
|
||||
}
|
||||
end
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
return true
|
||||
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
|
||||
|
||||
--ANIMATION
|
||||
function()
|
||||
if aura_env.statee then
|
||||
-- print(aura_env.state.class)
|
||||
return aura_env.classColor(aura_env.statee.class)
|
||||
end
|
||||
end
|
||||
@@ -1,58 +1,58 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED REMOVE_UNIT
|
||||
function(allstates, e, unit)
|
||||
if e == "NAME_PLATE_UNIT_ADDED" and unit then
|
||||
if UnitIsPlayer(unit) then
|
||||
if UnitIsEnemy("player", unit) then
|
||||
local _, _, class = UnitClass(unit)
|
||||
allstates[unit] =
|
||||
{
|
||||
changed = true,
|
||||
show = true,
|
||||
unit = unit,
|
||||
class = class,
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" and unit then
|
||||
if allstates[unit] then
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
allstates[unit].show = false
|
||||
allstates[unit].changed = true
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
return true
|
||||
end
|
||||
elseif e == "REMOVE_UNIT" then
|
||||
if allstates[unit] then
|
||||
allstates[unit].show = false
|
||||
allstates[unit].changed = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ON SHOW
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit)
|
||||
local aura_env = aura_env
|
||||
local unit = aura_env.state.unit
|
||||
LCG.PixelGlow_Start(nameplate, {aura_env.classColor(aura_env.state.class)}, nil, 0, 8, 4, 0, -4)
|
||||
C_Timer.After(4, function() WeakAuras.ScanEvents("REMOVE_UNIT", unit); LCG.PixelGlow_Stop(nameplate) end)
|
||||
|
||||
--INIT
|
||||
aura_env.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43, 1 elseif
|
||||
class == 2 then return 0.96, 0.55, 0.73, 1 elseif
|
||||
class == 3 then return 0.67, 0.83, 0.45, 1 elseif
|
||||
class == 4 then return 1, 0.96, 0.41, 1 elseif
|
||||
class == 5 then return 1, 1, 1, 1 elseif
|
||||
class == 6 then return 0.77, 0.12, 0.23, 1 elseif
|
||||
class == 7 then return 0, 0.44, 0.87, 1 elseif
|
||||
class == 8 then return 0.25, 0.78, 0.92, 1 elseif
|
||||
class == 9 then return 0.53, 0.53, 0.93, 1 elseif
|
||||
class == 10 then return 0, 1, 0.59, 1 elseif
|
||||
class == 11 then return 1, 0.49, 0.04, 1 elseif
|
||||
class == 12 then return 0.64, 0.19, 0.79, 1 else
|
||||
return 1, 1, 1, 1 end
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED REMOVE_UNIT
|
||||
function(allstates, e, unit)
|
||||
if e == "NAME_PLATE_UNIT_ADDED" and unit then
|
||||
if UnitIsPlayer(unit) then
|
||||
if UnitIsEnemy("player", unit) then
|
||||
local _, _, class = UnitClass(unit)
|
||||
allstates[unit] =
|
||||
{
|
||||
changed = true,
|
||||
show = true,
|
||||
unit = unit,
|
||||
class = class,
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" and unit then
|
||||
if allstates[unit] then
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
allstates[unit].show = false
|
||||
allstates[unit].changed = true
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
|
||||
LCG.PixelGlow_Stop(nameplate)
|
||||
return true
|
||||
end
|
||||
elseif e == "REMOVE_UNIT" then
|
||||
if allstates[unit] then
|
||||
allstates[unit].show = false
|
||||
allstates[unit].changed = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ON SHOW
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(aura_env.statee.unit)
|
||||
local aura_env = aura_env
|
||||
local unit = aura_env.statee.unit
|
||||
LCG.PixelGlow_Start(nameplate, {aura_env.classColor(aura_env.statee.class)}, nil, 0, 8, 4, 0, -4)
|
||||
C_Timer.After(4, function() WeakAuras.ScanEvents("REMOVE_UNIT", unit); LCG.PixelGlow_Stop(nameplate) end)
|
||||
|
||||
--INIT
|
||||
aura_env.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43, 1 elseif
|
||||
class == 2 then return 0.96, 0.55, 0.73, 1 elseif
|
||||
class == 3 then return 0.67, 0.83, 0.45, 1 elseif
|
||||
class == 4 then return 1, 0.96, 0.41, 1 elseif
|
||||
class == 5 then return 1, 1, 1, 1 elseif
|
||||
class == 6 then return 0.77, 0.12, 0.23, 1 elseif
|
||||
class == 7 then return 0, 0.44, 0.87, 1 elseif
|
||||
class == 8 then return 0.25, 0.78, 0.92, 1 elseif
|
||||
class == 9 then return 0.53, 0.53, 0.93, 1 elseif
|
||||
class == 10 then return 0, 1, 0.59, 1 elseif
|
||||
class == 11 then return 1, 0.49, 0.04, 1 elseif
|
||||
class == 12 then return 0.64, 0.19, 0.79, 1 else
|
||||
return 1, 1, 1, 1 end
|
||||
end
|
||||
@@ -1,64 +1,64 @@
|
||||
--BAG_UPDATE UPDATE
|
||||
function(allstates, e, id)
|
||||
if e == "BAG_UPDATE" then
|
||||
if id then
|
||||
for i = 1, GetContainerNumSlots(id) do
|
||||
local iid = GetContainerItemID(id, i)
|
||||
if aura_env.herbIDs[iid] then
|
||||
local texture = select(1, GetContainerItemInfo(id, i))
|
||||
local amount = GetItemCount(iid, false)
|
||||
local bank = GetItemCount(iid, true) - amount
|
||||
allstates[iid] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
amount = amount,
|
||||
bank = bank,
|
||||
index = amount,
|
||||
icon = texture,
|
||||
itemId = iid,
|
||||
resort = true,
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE" then
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local iid = GetContainerItemID(i, j)
|
||||
if aura_env.herbIDs[iid] then
|
||||
local texture = select(1, GetContainerItemInfo(i, j))
|
||||
local amount = GetItemCount(iid, false)
|
||||
local bank = GetItemCount(iid, true) - amount
|
||||
allstates[iid] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
amount = amount,
|
||||
bank = bank,
|
||||
index = amount,
|
||||
icon = texture,
|
||||
itemId = iid,
|
||||
resort = true,
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.herbIDs =
|
||||
{
|
||||
[168487] = "Zin'anthid",
|
||||
[152511] = "Sea Stalk",
|
||||
[152505] = "Riverbud",
|
||||
[152506] = "Star Moss",
|
||||
[152507] = "Akunda's Bite",
|
||||
[152508] = "Winter's Kiss",
|
||||
[152509] = "Siren's Pollen",
|
||||
[152510] = "Anchor Weed",
|
||||
}
|
||||
--BAG_UPDATE UPDATE
|
||||
function(allstates, e, id)
|
||||
if e == "BAG_UPDATE" then
|
||||
if id then
|
||||
for i = 1, GetContainerNumSlots(id) do
|
||||
local iid = GetContainerItemID(id, i)
|
||||
if aura_env.herbIDs[iid] then
|
||||
local texture = select(1, GetContainerItemInfo(id, i))
|
||||
local amount = GetItemCount(iid, false)
|
||||
local bank = GetItemCount(iid, true) - amount
|
||||
allstates[iid] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
amount = amount,
|
||||
bank = bank,
|
||||
index = amount,
|
||||
icon = texture,
|
||||
itemId = iid,
|
||||
resort = true,
|
||||
}
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE" then
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local iid = GetContainerItemID(i, j)
|
||||
if aura_env.herbIDs[iid] then
|
||||
local texture = select(1, GetContainerItemInfo(i, j))
|
||||
local amount = GetItemCount(iid, false)
|
||||
local bank = GetItemCount(iid, true) - amount
|
||||
allstates[iid] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
amount = amount,
|
||||
bank = bank,
|
||||
index = amount,
|
||||
icon = texture,
|
||||
itemId = iid,
|
||||
resort = true,
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.herbIDs =
|
||||
{
|
||||
[168487] = "Zin'anthid",
|
||||
[152511] = "Sea Stalk",
|
||||
[152505] = "Riverbud",
|
||||
[152506] = "Star Moss",
|
||||
[152507] = "Akunda's Bite",
|
||||
[152508] = "Winter's Kiss",
|
||||
[152509] = "Siren's Pollen",
|
||||
[152510] = "Anchor Weed",
|
||||
}
|
||||
WeakAuras.ScanEvents("UPDATE")
|
||||
@@ -1,371 +1,371 @@
|
||||
--REMOVE_ITEM_SHOW ADD_ITEM_SHOW
|
||||
function(allstates, e, what, howmuch, looted)
|
||||
if e == "ADD_ITEM_SHOW" then
|
||||
if what then
|
||||
--Get info about item
|
||||
local icon = 0
|
||||
local name = GetItemInfo(what)
|
||||
--Save icon to databases
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] then icon = select(10, GetItemInfo(name)) else icon = WeakAurasSaved.CustomTrash.IconDatabase[name] end
|
||||
if name and icon and not WeakAurasSaved.CustomTrash.IconDatabase[name] then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
--Get ID for tooltip
|
||||
local indexid = #allstates + 1
|
||||
local ID
|
||||
if WeakAurasSaved.CustomTrash.IDDatabase[name] then ID = WeakAurasSaved.CustomTrash.IDDatabase[name] end
|
||||
allstates[indexid] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
index = GetTime(),
|
||||
resort = true,
|
||||
icon = icon,
|
||||
name = what,
|
||||
amount = howmuch,
|
||||
looted = looted,
|
||||
}
|
||||
if ID then
|
||||
allstates[indexid].itemId = ID
|
||||
end
|
||||
C_Timer.After(5, function() WeakAuras.ScanEvents("REMOVE_ITEM_SHOW", indexid) end)
|
||||
return true
|
||||
end
|
||||
elseif e == "REMOVE_ITEM_SHOW" then
|
||||
if allstates[what] then
|
||||
allstates[what].show = false
|
||||
allstates[what].changed = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ON SHOW
|
||||
if aura_env.state.looted == true then
|
||||
if not aura_env.region.texture then
|
||||
local texture = aura_env.region:CreateTexture(nil, aura_env.region)
|
||||
aura_env.region.texture = texture
|
||||
end
|
||||
aura_env.region.texture:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\ok-icon.tga")
|
||||
aura_env.region.texture:ClearAllPoints()
|
||||
aura_env.region.texture:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.texture:Show()
|
||||
end
|
||||
|
||||
--ON HIDE
|
||||
if aura_env.region.texture then aura_env.region.texture:Hide() end
|
||||
|
||||
--INIT
|
||||
aura_env.skills =
|
||||
{
|
||||
--Warrior
|
||||
[1] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Paladin
|
||||
[2] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Hunter
|
||||
[3] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Rogue
|
||||
[4] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Priest
|
||||
[5] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Death Knight
|
||||
[6] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Shaman
|
||||
[7] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Mage
|
||||
[8] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Warlock
|
||||
[9] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Monk
|
||||
[10] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Druid
|
||||
[11] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Demon Hunter
|
||||
[12] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--REMOVE_ITEM_SHOW ADD_ITEM_SHOW
|
||||
function(allstates, e, what, howmuch, looted)
|
||||
if e == "ADD_ITEM_SHOW" then
|
||||
if what then
|
||||
--Get info about item
|
||||
local icon = 0
|
||||
local name = GetItemInfo(what)
|
||||
--Save icon to databases
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] then icon = select(10, GetItemInfo(name)) else icon = WeakAurasSaved.CustomTrash.IconDatabase[name] end
|
||||
if name and icon and not WeakAurasSaved.CustomTrash.IconDatabase[name] then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
--Get ID for tooltip
|
||||
local indexid = #allstates + 1
|
||||
local ID
|
||||
if WeakAurasSaved.CustomTrash.IDDatabase[name] then ID = WeakAurasSaved.CustomTrash.IDDatabase[name] end
|
||||
allstates[indexid] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
index = GetTime(),
|
||||
resort = true,
|
||||
icon = icon,
|
||||
name = what,
|
||||
amount = howmuch,
|
||||
looted = looted,
|
||||
}
|
||||
if ID then
|
||||
allstates[indexid].itemId = ID
|
||||
end
|
||||
C_Timer.After(5, function() WeakAuras.ScanEvents("REMOVE_ITEM_SHOW", indexid) end)
|
||||
return true
|
||||
end
|
||||
elseif e == "REMOVE_ITEM_SHOW" then
|
||||
if allstates[what] then
|
||||
allstates[what].show = false
|
||||
allstates[what].changed = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--ON SHOW
|
||||
if aura_env.statee.looted == true then
|
||||
if not aura_env.region.texture then
|
||||
local texture = aura_env.region:CreateTexture(nil, aura_env.region)
|
||||
aura_env.region.texture = texture
|
||||
end
|
||||
aura_env.region.texture:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\ok-icon.tga")
|
||||
aura_env.region.texture:ClearAllPoints()
|
||||
aura_env.region.texture:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.region.texture:Show()
|
||||
end
|
||||
|
||||
--ON HIDE
|
||||
if aura_env.region.texture then aura_env.region.texture:Hide() end
|
||||
|
||||
--INIT
|
||||
aura_env.skills =
|
||||
{
|
||||
--Warrior
|
||||
[1] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Paladin
|
||||
[2] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Hunter
|
||||
[3] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 1,
|
||||
["Guns"] = 1,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 1,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Rogue
|
||||
[4] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Priest
|
||||
[5] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Death Knight
|
||||
[6] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 1,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 1,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 1,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Shaman
|
||||
[7] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 1,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Mage
|
||||
[8] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Warlock
|
||||
[9] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 1,
|
||||
["Leather"] = 0,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 0,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 1,
|
||||
},
|
||||
--Monk
|
||||
[10] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 1,
|
||||
["Shields"] = 1,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Druid
|
||||
[11] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 0,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 1,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 1,
|
||||
["One-Handed Swords"] = 0,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 0,
|
||||
["Staves"] = 1,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 1,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
--Demon Hunter
|
||||
[12] =
|
||||
{
|
||||
--Armor Skills
|
||||
["Cloth"] = 0,
|
||||
["Leather"] = 1,
|
||||
["Mail"] = 0,
|
||||
["Plate"] = 0,
|
||||
["Shields"] = 0,
|
||||
--Weapon Skills
|
||||
["One-Handed Axes"] = 1,
|
||||
["Two-Handed Axes"] = 0,
|
||||
["Bows"] = 0,
|
||||
["Guns"] = 0,
|
||||
["One-Handed Maces"] = 0,
|
||||
["Two-Handed Maces"] = 0,
|
||||
["Polearms"] = 0,
|
||||
["One-Handed Swords"] = 1,
|
||||
["Two-Handed Swords"] = 0,
|
||||
["Warglaives"] = 1,
|
||||
["Staves"] = 0,
|
||||
["Fist Weapons"] = 1,
|
||||
["Daggers"] = 0,
|
||||
["Crossbows"] = 0,
|
||||
["Wands"] = 0,
|
||||
},
|
||||
}
|
||||
@@ -1,58 +1,58 @@
|
||||
--CHAT_MSG_LOOT REMOVE_ITEM ADD_ITEM
|
||||
function(allstates, e, msg, howmuch)
|
||||
if e == "CHAT_MSG_LOOT" then
|
||||
if msg then
|
||||
local who = msg:match("%w+")
|
||||
if who == "You" then
|
||||
local howmuch = msg:match("(x%d+).$")
|
||||
local what
|
||||
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
|
||||
what = itemLink
|
||||
end
|
||||
--WeakAuras.ScanEvents("ADD_ITEM", what, howmuch)
|
||||
C_Timer.After(0.05, function() WeakAuras.ScanEvents("ADD_ITEM", what, howmuch) end)
|
||||
end
|
||||
end
|
||||
elseif e == "ADD_ITEM" then
|
||||
local what = msg
|
||||
if what then
|
||||
local rarity = select(3, GetItemInfo(what))
|
||||
local icon = 0
|
||||
local name = GetItemInfo(what)
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] then icon = select(10, GetItemInfo(name)) else icon = WeakAurasSaved.CustomTrash.IconDatabase[name] end
|
||||
if name and icon and not WeakAurasSaved.CustomTrash.IconDatabase[name] then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
local color = "ffffffff"
|
||||
if rarity then
|
||||
color = select(4, GetItemQualityColor(rarity))
|
||||
end
|
||||
color = "|c" .. color
|
||||
local indexid = #allstates + 1
|
||||
local ID
|
||||
if WeakAurasSaved.CustomTrash.IDDatabase[name] then ID = WeakAurasSaved.CustomTrash.IDDatabase[name] end
|
||||
allstates[indexid] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
expirationTime = GetTime() + 1,
|
||||
index = GetTime(),
|
||||
autoHide = true,
|
||||
resort = true,
|
||||
icon = icon,
|
||||
name = what,
|
||||
color = color,
|
||||
amount = howmuch,
|
||||
}
|
||||
if ID then
|
||||
allstates[indexid].itemId = ID
|
||||
end
|
||||
C_Timer.After(1, function() WeakAuras.ScanEvents("REMOVE_ITEM", indexid) end)
|
||||
return true
|
||||
end
|
||||
elseif e == "REMOVE_ITEM" then
|
||||
if allstates[msg] then
|
||||
allstates[msg].show = false
|
||||
allstates[msg].changed = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
--CHAT_MSG_LOOT REMOVE_ITEM ADD_ITEM
|
||||
function(allstates, e, msg, howmuch)
|
||||
if e == "CHAT_MSG_LOOT" then
|
||||
if msg then
|
||||
local who = msg:match("%w+")
|
||||
if who == "You" then
|
||||
local howmuch = msg:match("(x%d+).$")
|
||||
local what
|
||||
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
|
||||
what = itemLink
|
||||
end
|
||||
--WeakAuras.ScanEvents("ADD_ITEM", what, howmuch)
|
||||
C_Timer.After(0.05, function() WeakAuras.ScanEvents("ADD_ITEM", what, howmuch) end)
|
||||
end
|
||||
end
|
||||
elseif e == "ADD_ITEM" then
|
||||
local what = msg
|
||||
if what then
|
||||
local rarity = select(3, GetItemInfo(what))
|
||||
local icon = 0
|
||||
local name = GetItemInfo(what)
|
||||
if not WeakAurasSaved.CustomTrash.IconDatabase[name] then icon = select(10, GetItemInfo(name)) else icon = WeakAurasSaved.CustomTrash.IconDatabase[name] end
|
||||
if name and icon and not WeakAurasSaved.CustomTrash.IconDatabase[name] then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
|
||||
local color = "ffffffff"
|
||||
if rarity then
|
||||
color = select(4, GetItemQualityColor(rarity))
|
||||
end
|
||||
color = "|c" .. color
|
||||
local indexid = #allstates + 1
|
||||
local ID
|
||||
if WeakAurasSaved.CustomTrash.IDDatabase[name] then ID = WeakAurasSaved.CustomTrash.IDDatabase[name] end
|
||||
allstates[indexid] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
expirationTime = GetTime() + 1,
|
||||
index = GetTime(),
|
||||
autoHide = true,
|
||||
resort = true,
|
||||
icon = icon,
|
||||
name = what,
|
||||
color = color,
|
||||
amount = howmuch,
|
||||
}
|
||||
if ID then
|
||||
allstates[indexid].itemId = ID
|
||||
end
|
||||
C_Timer.After(1, function() WeakAuras.ScanEvents("REMOVE_ITEM", indexid) end)
|
||||
return true
|
||||
end
|
||||
elseif e == "REMOVE_ITEM" then
|
||||
if allstates[msg] then
|
||||
allstates[msg].show = false
|
||||
allstates[msg].changed = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,69 +1,69 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED GROUP_ROSTER_UPDATE UNTRIGGER
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then --CLEU
|
||||
if not aura_env.tank then aura_env.tank = "" end
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED" then
|
||||
local type = select(15, ...)
|
||||
if type == "DEBUFF" then
|
||||
local caster = select(5, ...)
|
||||
local target = select(9, ...)
|
||||
local name = select(13, ...)
|
||||
--If selected debuff is cast on other tank, get other tank from other trigger
|
||||
if (target == aura_env.tank or target == UnitName("player")) and aura_env.auras[name] then
|
||||
--Get stacks duration and expiry time for duration control and trigger
|
||||
local stacks, dur = select(3, aura_env.unitDebuffC(target, name)), select(5, aura_env.unitDebuffC(target, name))
|
||||
if stacks > aura_env.auras[name] then
|
||||
--If I have too many stacks and I am tanking then -- other taunts
|
||||
if target == UnitName("player") and select(1, UnitDetailedThreatSituation("player", "target")) then
|
||||
aura_env.returnName = "DEBIL TAUNT"
|
||||
aura_env.region:Color(0.3715, 0.6285, 0, 1)
|
||||
--If other tank has too many stacks and other tank is tanking then -- I taunt
|
||||
elseif target == aura_env.tank and select(1, UnitDetailedThreatSituation(target, "target")) then
|
||||
aura_env.returnName = "TAUNT DEBIL"
|
||||
aura_env.region:Color(0.5660, 0.1588, 0.2752, 1)
|
||||
end
|
||||
if aura_env.timer then aura_env.timer:Cancel() end
|
||||
aura_env.timer = C_Timer.NewTimer(dur, function() WeakAuras.ScanEvents("UNTRIGGER") end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "GROUP_ROSTER_UPDATE" then --Find other tank
|
||||
if IsInRaid() then
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
if UnitGroupRolesAssigned("raid" .. i) == "TANK" and UnitName("raid" .. i) ~= UnitName("player") then
|
||||
aura_env.tank = UnitName("raid" .. i)
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "UNTRIGGER" then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
--NAME INFO
|
||||
function()
|
||||
return aura_env.returnName
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.UnitDebuffC = function(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.auras =
|
||||
{
|
||||
["Rimefrost"] = 5,
|
||||
["Septic Taint"] = 5,
|
||||
|
||||
--COMBAT_LOG_EVENT_UNFILTERED GROUP_ROSTER_UPDATE UNTRIGGER
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then --CLEU
|
||||
if not aura_env.tank then aura_env.tank = "" end
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED" then
|
||||
local type = select(15, ...)
|
||||
if type == "DEBUFF" then
|
||||
local caster = select(5, ...)
|
||||
local target = select(9, ...)
|
||||
local name = select(13, ...)
|
||||
--If selected debuff is cast on other tank, get other tank from other trigger
|
||||
if (target == aura_env.tank or target == UnitName("player")) and aura_env.auras[name] then
|
||||
--Get stacks duration and expiry time for duration control and trigger
|
||||
local stacks, dur = select(3, aura_env.unitDebuffC(target, name)), select(5, aura_env.unitDebuffC(target, name))
|
||||
if stacks > aura_env.auras[name] then
|
||||
--If I have too many stacks and I am tanking then -- other taunts
|
||||
if target == UnitName("player") and select(1, UnitDetailedThreatSituation("player", "target")) then
|
||||
aura_env.returnName = "DEBIL TAUNT"
|
||||
aura_env.region:Color(0.3715, 0.6285, 0, 1)
|
||||
--If other tank has too many stacks and other tank is tanking then -- I taunt
|
||||
elseif target == aura_env.tank and select(1, UnitDetailedThreatSituation(target, "target")) then
|
||||
aura_env.returnName = "TAUNT DEBIL"
|
||||
aura_env.region:Color(0.5660, 0.1588, 0.2752, 1)
|
||||
end
|
||||
if aura_env.timer then aura_env.timer:Cancel() end
|
||||
aura_env.timer = C_Timer.NewTimer(dur, function() WeakAuras.ScanEvents("UNTRIGGER") end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "GROUP_ROSTER_UPDATE" then --Find other tank
|
||||
if IsInRaid() then
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
if UnitGroupRolesAssigned("raid" .. i) == "TANK" and UnitName("raid" .. i) ~= UnitName("player") then
|
||||
aura_env.tank = UnitName("raid" .. i)
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "UNTRIGGER" then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
--NAME INFO
|
||||
function()
|
||||
return aura_env.returnName
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.UnitDebuffC = function(unit, spell)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.auras =
|
||||
{
|
||||
["Rimefrost"] = 5,
|
||||
["Septic Taint"] = 5,
|
||||
|
||||
}
|
||||
@@ -1,33 +1,33 @@
|
||||
--UNIT_AURA
|
||||
function(_,unit)
|
||||
if UnitGroupRolesAssigned(unit) == "TANK" and UnitName(unit) ~= UnitName("player") then
|
||||
local tank = UnitDetailedThreatSituation(unit, "boss1")
|
||||
if not tank then
|
||||
for k,v in pairs(aura_env.debuffs) do
|
||||
if aura_env.UnitDebuffC(k, unit) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.debuffs =
|
||||
{
|
||||
["Sacred Blade"] = 1
|
||||
}
|
||||
aura_env.UnitDebuffC = function(spell, unit)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
--UNIT_AURA
|
||||
function(_,unit)
|
||||
if UnitGroupRolesAssigned(unit) == "TANK" and UnitName(unit) ~= UnitName("player") then
|
||||
local tank = UnitDetailedThreatSituation(unit, "boss1")
|
||||
if not tank then
|
||||
for k,v in pairs(aura_env.debuffs) do
|
||||
if aura_env.UnitDebuffC(k, unit) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.debuffs =
|
||||
{
|
||||
["Sacred Blade"] = 1
|
||||
}
|
||||
aura_env.UnitDebuffC = function(spell, unit)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,62 +1,62 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UPDATE_TAUNT_GOD
|
||||
function(...)
|
||||
local e = select(1, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local spellName = select(14, ...)
|
||||
if (spellName == "Taunt"
|
||||
or spellName == "Provoke"
|
||||
or spellName == "Dark Command"
|
||||
or spellName == "Torment"
|
||||
or spellName == "Hand of Reckoning"
|
||||
or spellName == "Growl")
|
||||
and subEvent == "SPELL_CAST_SUCCESS" then
|
||||
local target = select(10, ...)
|
||||
local source = select(6, ...)
|
||||
local subEvent = select(3, ...)
|
||||
aura_env.spellName = spellName
|
||||
aura_env.caster = source
|
||||
aura_env.target = target
|
||||
aura_env.cast_time = GetTime()
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("UPDATE_TAUNT_GOD") end)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE_TAUNT_GOD" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.caster then
|
||||
local source_class = UnitClass(aura_env.caster)
|
||||
local source_class_color = "|cFFFFFFFF"
|
||||
local time_color = "|cFFFFFFFF"
|
||||
local target_color = "|cFFFFFFFF"
|
||||
if aura_env.spellName == "Taunt"
|
||||
or aura_env.spellName == "Provoke"
|
||||
or aura_env.spellName == "Hand of Reckoning"
|
||||
or aura_env.spellName == "Dark Command"
|
||||
or aura_env.spellName == "Torment"
|
||||
or aura_env.spellName == "Growl"
|
||||
then cooldown_time = aura_env.cast_time + 8 else cooldown_time = 0 end
|
||||
if (cooldown_time / GetTime()) < 1 then time_color = "|cFF00FF00" else time_color = "|cFFFF0000" end
|
||||
if source_class == "Death Knight" then source_class_color = "|cFFC41F3B"
|
||||
elseif source_class == "Demon Hunter" then source_class_color = "|cFFA330C9"
|
||||
elseif source_class == "Druid" then source_class_color = "|cFFFF7D0A"
|
||||
elseif source_class == "Hunter" then source_class_color = "|cFFABD473"
|
||||
elseif source_class == "Mage" then source_class_color = "|cFF40C7EB"
|
||||
elseif source_class == "Monk" then source_class_color = "|cFF00FF96"
|
||||
elseif source_class == "Paladin" then source_class_color = "|cFFF58CBA"
|
||||
elseif source_class == "Priest" then source_class_color = "|cFFFFFFFF"
|
||||
elseif source_class == "Rogue" then source_class_color = "|cFFFFF569"
|
||||
elseif source_class == "Shaman" then source_class_color = "|cFF0070DE"
|
||||
elseif source_class == "Warlock" then source_class_color = "|cFF8787ED"
|
||||
elseif source_class == "Warrior" then source_class_color = "|cFFC79C6E" end
|
||||
if aura_env.target == UnitName("target") then target_color = "|cFF00FF00" else target_color = "|cFFFF0000" end
|
||||
return source_class_color .. aura_env.caster .. "\n" .. target_color .. aura_env.target .. "\n" .. source_class_color .. aura_env.spellName .. "\n" .. time_color .. math.floor(GetTime() - aura_env.cast_time)
|
||||
end
|
||||
end
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UPDATE_TAUNT_GOD
|
||||
function(...)
|
||||
local e = select(1, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local spellName = select(14, ...)
|
||||
if (spellName == "Taunt"
|
||||
or spellName == "Provoke"
|
||||
or spellName == "Dark Command"
|
||||
or spellName == "Torment"
|
||||
or spellName == "Hand of Reckoning"
|
||||
or spellName == "Growl")
|
||||
and subEvent == "SPELL_CAST_SUCCESS" then
|
||||
local target = select(10, ...)
|
||||
local source = select(6, ...)
|
||||
local subEvent = select(3, ...)
|
||||
aura_env.spellName = spellName
|
||||
aura_env.caster = source
|
||||
aura_env.target = target
|
||||
aura_env.cast_time = GetTime()
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("UPDATE_TAUNT_GOD") end)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE_TAUNT_GOD" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.caster then
|
||||
local source_class = UnitClass(aura_env.caster)
|
||||
local source_class_color = "|cFFFFFFFF"
|
||||
local time_color = "|cFFFFFFFF"
|
||||
local target_color = "|cFFFFFFFF"
|
||||
if aura_env.spellName == "Taunt"
|
||||
or aura_env.spellName == "Provoke"
|
||||
or aura_env.spellName == "Hand of Reckoning"
|
||||
or aura_env.spellName == "Dark Command"
|
||||
or aura_env.spellName == "Torment"
|
||||
or aura_env.spellName == "Growl"
|
||||
then cooldown_time = aura_env.cast_time + 8 else cooldown_time = 0 end
|
||||
if (cooldown_time / GetTime()) < 1 then time_color = "|cFF00FF00" else time_color = "|cFFFF0000" end
|
||||
if source_class == "Death Knight" then source_class_color = "|cFFC41F3B"
|
||||
elseif source_class == "Demon Hunter" then source_class_color = "|cFFA330C9"
|
||||
elseif source_class == "Druid" then source_class_color = "|cFFFF7D0A"
|
||||
elseif source_class == "Hunter" then source_class_color = "|cFFABD473"
|
||||
elseif source_class == "Mage" then source_class_color = "|cFF40C7EB"
|
||||
elseif source_class == "Monk" then source_class_color = "|cFF00FF96"
|
||||
elseif source_class == "Paladin" then source_class_color = "|cFFF58CBA"
|
||||
elseif source_class == "Priest" then source_class_color = "|cFFFFFFFF"
|
||||
elseif source_class == "Rogue" then source_class_color = "|cFFFFF569"
|
||||
elseif source_class == "Shaman" then source_class_color = "|cFF0070DE"
|
||||
elseif source_class == "Warlock" then source_class_color = "|cFF8787ED"
|
||||
elseif source_class == "Warrior" then source_class_color = "|cFFC79C6E" end
|
||||
if aura_env.target == UnitName("target") then target_color = "|cFF00FF00" else target_color = "|cFFFF0000" end
|
||||
return source_class_color .. aura_env.caster .. "\n" .. target_color .. aura_env.target .. "\n" .. source_class_color .. aura_env.spellName .. "\n" .. time_color .. math.floor(GetTime() - aura_env.cast_time)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
--UNIT_AURA COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED
|
||||
function(e, unit, ...)
|
||||
if e == "UNIT_AURA" then
|
||||
if UnitExists(unit) then
|
||||
if aura_env.UnitDebuffC(aura_env.debuff, unit) and not aura_env.auras[UnitGUID(unit)] and select(7, aura_env.UnitDebuffC(aura_env.debuff, unit)) == "player" then
|
||||
aura_env.auras[UnitGUID(unit)] = 1
|
||||
aura_env.count = aura_env.count + 1
|
||||
return true
|
||||
elseif not aura_env.UnitDebuffC(aura_env.debuff, unit) and aura_env.auras[UnitGUID(unit)] then
|
||||
aura_env.auras[UnitGUID(unit)] = nil
|
||||
aura_env.count = aura_env.count - 1
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(1, ...)
|
||||
if se == "UNIT_DIED" then
|
||||
local GUID = select(7, ...)
|
||||
if aura_env.auras[GUID] then
|
||||
aura_env.auras[GUID] = nil
|
||||
aura_env.count = aura_env.count - 1
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then
|
||||
for k,v in pairs(aura_env.auras) do
|
||||
k = nil
|
||||
v = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--UNTRIGGER
|
||||
function()
|
||||
if aura_env.count == 0 then return true end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.count > 0 then return aura_env.count else return "" end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.debuff = "Dagger in the Back"
|
||||
aura_env.count = 0
|
||||
aura_env.auras = {}
|
||||
aura_env.UnitDebuffC = function(spell, unit)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
--UNIT_AURA COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED
|
||||
function(e, unit, ...)
|
||||
if e == "UNIT_AURA" then
|
||||
if UnitExists(unit) then
|
||||
if aura_env.UnitDebuffC(aura_env.debuff, unit) and not aura_env.auras[UnitGUID(unit)] and select(7, aura_env.UnitDebuffC(aura_env.debuff, unit)) == "player" then
|
||||
aura_env.auras[UnitGUID(unit)] = 1
|
||||
aura_env.count = aura_env.count + 1
|
||||
return true
|
||||
elseif not aura_env.UnitDebuffC(aura_env.debuff, unit) and aura_env.auras[UnitGUID(unit)] then
|
||||
aura_env.auras[UnitGUID(unit)] = nil
|
||||
aura_env.count = aura_env.count - 1
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(1, ...)
|
||||
if se == "UNIT_DIED" then
|
||||
local GUID = select(7, ...)
|
||||
if aura_env.auras[GUID] then
|
||||
aura_env.auras[GUID] = nil
|
||||
aura_env.count = aura_env.count - 1
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then
|
||||
for k,v in pairs(aura_env.auras) do
|
||||
k = nil
|
||||
v = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--UNTRIGGER
|
||||
function()
|
||||
if aura_env.count == 0 then return true end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.count > 0 then return aura_env.count else return "" end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.debuff = "Dagger in the Back"
|
||||
aura_env.count = 0
|
||||
aura_env.auras = {}
|
||||
aura_env.UnitDebuffC = function(spell, unit)
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name then
|
||||
if name == spell then
|
||||
return UnitDebuff(unit, i)
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,33 +1,33 @@
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED PLAYER_REGEN_DISABLED PLAYER_TARGET_CHANGED
|
||||
function(e, u)
|
||||
--local mname = "Armored Vaultbot"
|
||||
local mname = "Sickly Saurid"
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(u)
|
||||
if name == mname then
|
||||
PlaySoundFile("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Sounds\\sonar.ogg", "master")
|
||||
aura_env.ticker = C_Timer.NewTicker(1, function() PlaySoundFile("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Sounds\\sonar.ogg", "master"); end)
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
|
||||
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(u)
|
||||
if name == mname then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
end
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
|
||||
LCG.PixelGlow_Stop()
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_DISABLED" and aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
elseif e == "PLAYER_TARGET_CHANGED" and aura_env.ticker then
|
||||
if UnitName("target") == mname then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
end
|
||||
end
|
||||
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED PLAYER_REGEN_DISABLED PLAYER_TARGET_CHANGED
|
||||
function(e, u)
|
||||
--local mname = "Armored Vaultbot"
|
||||
local mname = "Sickly Saurid"
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
if e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name = UnitName(u)
|
||||
if name == mname then
|
||||
PlaySoundFile("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Sounds\\sonar.ogg", "master")
|
||||
aura_env.ticker = C_Timer.NewTicker(1, function() PlaySoundFile("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Sounds\\sonar.ogg", "master"); end)
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
|
||||
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
|
||||
end
|
||||
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
||||
local name = UnitName(u)
|
||||
if name == mname then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
end
|
||||
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
|
||||
LCG.PixelGlow_Stop()
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_DISABLED" and aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
elseif e == "PLAYER_TARGET_CHANGED" and aura_env.ticker then
|
||||
if UnitName("target") == mname then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,72 +1,72 @@
|
||||
local baseUrl = "https://www.wowhead.com/"
|
||||
local keybind = "CTRL-C"
|
||||
local popupText = "Wowhead %s Link\n" .. keybind .. " to copy"
|
||||
|
||||
local typeAttributeMap = {
|
||||
quest = {"id", "questId", "questID"},
|
||||
item = {info = {"id"}}
|
||||
}
|
||||
|
||||
|
||||
local function ShowUrlPopup(id, type)
|
||||
if not (id or type) then return end
|
||||
local url = baseUrl .. type .. "=" .. id
|
||||
StaticPopup_Show("WowheadQuestLinkUrl", type:sub(1, 1):upper() .. type:sub(2), _, url)
|
||||
end
|
||||
|
||||
|
||||
local function getIdAndType(focus)
|
||||
local function loop(focus, keys)
|
||||
if not focus then return end
|
||||
for key, value in pairs(keys) do
|
||||
if type(value) == "table" then
|
||||
return loop(focus[key], value)
|
||||
end
|
||||
local id = focus[value]
|
||||
if id then
|
||||
return id
|
||||
end
|
||||
end
|
||||
end
|
||||
if not focus then return end
|
||||
for type, keys in pairs(typeAttributeMap) do
|
||||
local id = loop(focus, keys)
|
||||
if id then
|
||||
return id, type
|
||||
end
|
||||
end
|
||||
return getIdAndType(focus:GetParent())
|
||||
end
|
||||
|
||||
|
||||
local function run()
|
||||
local focus = GetMouseFocus()
|
||||
local id, type = getIdAndType(focus)
|
||||
ShowUrlPopup(id, type)
|
||||
end
|
||||
|
||||
|
||||
StaticPopupDialogs["WowheadQuestLinkUrl"] = {
|
||||
text = popupText,
|
||||
button1 = "Close",
|
||||
OnShow = function(self, data)
|
||||
local function HidePopup(self) self:GetParent():Hide() end
|
||||
self.editBox:SetScript("OnEscapePressed", HidePopup)
|
||||
self.editBox:SetScript("OnEnterPressed", HidePopup)
|
||||
self.editBox:SetMaxLetters(0)
|
||||
self.editBox:SetText(data)
|
||||
self.editBox:HighlightText(0, self.editBox:GetNumLetters())
|
||||
end,
|
||||
hasEditBox = true,
|
||||
editBoxWidth = 233,
|
||||
timeout = 0,
|
||||
whileDead = true,
|
||||
hideOnEscape = true,
|
||||
preferredIndex = 3,
|
||||
}
|
||||
|
||||
|
||||
local btn = CreateFrame("BUTTON", "KeybindBtn")
|
||||
SetBindingClick(keybind, btn:GetName())
|
||||
btn:SetScript("OnClick", run)
|
||||
|
||||
local baseUrl = "https://www.wowhead.com/"
|
||||
local keybind = "CTRL-C"
|
||||
local popupText = "Wowhead %s Link\n" .. keybind .. " to copy"
|
||||
|
||||
local typeAttributeMap = {
|
||||
quest = {"id", "questId", "questID"},
|
||||
item = {info = {"id"}}
|
||||
}
|
||||
|
||||
|
||||
local function ShowUrlPopup(id, type)
|
||||
if not (id or type) then return end
|
||||
local url = baseUrl .. type .. "=" .. id
|
||||
StaticPopup_Show("WowheadQuestLinkUrl", type:sub(1, 1):upper() .. type:sub(2), _, url)
|
||||
end
|
||||
|
||||
|
||||
local function getIdAndType(focus)
|
||||
local function loop(focus, keys)
|
||||
if not focus then return end
|
||||
for key, value in pairs(keys) do
|
||||
if type(value) == "table" then
|
||||
return loop(focus[key], value)
|
||||
end
|
||||
local id = focus[value]
|
||||
if id then
|
||||
return id
|
||||
end
|
||||
end
|
||||
end
|
||||
if not focus then return end
|
||||
for type, keys in pairs(typeAttributeMap) do
|
||||
local id = loop(focus, keys)
|
||||
if id then
|
||||
return id, type
|
||||
end
|
||||
end
|
||||
return getIdAndType(focus:GetParent())
|
||||
end
|
||||
|
||||
|
||||
local function run()
|
||||
local focus = GetMouseFocus()
|
||||
local id, type = getIdAndType(focus)
|
||||
ShowUrlPopup(id, type)
|
||||
end
|
||||
|
||||
|
||||
StaticPopupDialogs["WowheadQuestLinkUrl"] = {
|
||||
text = popupText,
|
||||
button1 = "Close",
|
||||
OnShow = function(self, data)
|
||||
local function HidePopup(self) self:GetParent():Hide() end
|
||||
self.editBox:SetScript("OnEscapePressed", HidePopup)
|
||||
self.editBox:SetScript("OnEnterPressed", HidePopup)
|
||||
self.editBox:SetMaxLetters(0)
|
||||
self.editBox:SetText(data)
|
||||
self.editBox:HighlightText(0, self.editBox:GetNumLetters())
|
||||
end,
|
||||
hasEditBox = true,
|
||||
editBoxWidth = 233,
|
||||
timeout = 0,
|
||||
whileDead = true,
|
||||
hideOnEscape = true,
|
||||
preferredIndex = 3,
|
||||
}
|
||||
|
||||
|
||||
local btn = CreateFrame("BUTTON", "KeybindBtn")
|
||||
SetBindingClick(keybind, btn:GetName())
|
||||
btn:SetScript("OnClick", run)
|
||||
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
function(event,addonName)
|
||||
if event == "ADDON_LOADED" and addonName == "Blizzard_Communities" then
|
||||
--create overlay
|
||||
local f = CreateFrame("Button",nil,UIParent)
|
||||
f:SetFrameStrata("HIGH")
|
||||
f.tex = f:CreateTexture(nil, "BACKGROUND")
|
||||
f.tex:SetAllPoints()
|
||||
f.tex:SetColorTexture(0.1,0.1,0.1,1)
|
||||
f.text = f:CreateFontString()
|
||||
f.text:SetFontObject("GameFontNormalMed3")
|
||||
f.text:SetText("Chat Hidden. Click to show")
|
||||
f.text:SetTextColor(1, 1, 1, 1)
|
||||
f.text:SetJustifyH("CENTER")
|
||||
f.text:SetJustifyV("CENTER")
|
||||
f.text:SetHeight(20)
|
||||
f.text:SetPoint("CENTER",f,"CENTER",0,0)
|
||||
f:EnableMouse(true)
|
||||
f:RegisterForClicks("AnyUp")
|
||||
f:SetScript("OnClick",function(...)
|
||||
f:Hide()
|
||||
end)
|
||||
--toggle
|
||||
local function toggleOverlay()
|
||||
if CommunitiesFrame:GetDisplayMode() == COMMUNITIES_FRAME_DISPLAY_MODES.CHAT then
|
||||
f:SetAllPoints(CommunitiesFrame.Chat.InsetFrame)
|
||||
f:Show()
|
||||
elseif CommunitiesFrame:GetDisplayMode() == COMMUNITIES_FRAME_DISPLAY_MODES.MINIMIZED then
|
||||
f:SetAllPoints(CommunitiesFrameInset)
|
||||
f:Show()
|
||||
else
|
||||
f:Hide()
|
||||
end
|
||||
end
|
||||
local function hideOverlay()
|
||||
f:Hide()
|
||||
end
|
||||
toggleOverlay() --run once
|
||||
|
||||
--hook
|
||||
hooksecurefunc(CommunitiesFrame,"SetDisplayMode", toggleOverlay)
|
||||
hooksecurefunc(CommunitiesFrame,"Show",toggleOverlay)
|
||||
hooksecurefunc(CommunitiesFrame,"Hide",hideOverlay)
|
||||
hooksecurefunc(CommunitiesFrame,"OnClubSelected", toggleOverlay)
|
||||
end
|
||||
function(event,addonName)
|
||||
if event == "ADDON_LOADED" and addonName == "Blizzard_Communities" then
|
||||
--create overlay
|
||||
local f = CreateFrame("Button",nil,UIParent)
|
||||
f:SetFrameStrata("HIGH")
|
||||
f.tex = f:CreateTexture(nil, "BACKGROUND")
|
||||
f.tex:SetAllPoints()
|
||||
f.tex:SetColorTexture(0.1,0.1,0.1,1)
|
||||
f.text = f:CreateFontString()
|
||||
f.text:SetFontObject("GameFontNormalMed3")
|
||||
f.text:SetText("Chat Hidden. Click to show")
|
||||
f.text:SetTextColor(1, 1, 1, 1)
|
||||
f.text:SetJustifyH("CENTER")
|
||||
f.text:SetJustifyV("CENTER")
|
||||
f.text:SetHeight(20)
|
||||
f.text:SetPoint("CENTER",f,"CENTER",0,0)
|
||||
f:EnableMouse(true)
|
||||
f:RegisterForClicks("AnyUp")
|
||||
f:SetScript("OnClick",function(...)
|
||||
f:Hide()
|
||||
end)
|
||||
--toggle
|
||||
local function toggleOverlay()
|
||||
if CommunitiesFrame:GetDisplayMode() == COMMUNITIES_FRAME_DISPLAY_MODES.CHAT then
|
||||
f:SetAllPoints(CommunitiesFrame.Chat.InsetFrame)
|
||||
f:Show()
|
||||
elseif CommunitiesFrame:GetDisplayMode() == COMMUNITIES_FRAME_DISPLAY_MODES.MINIMIZED then
|
||||
f:SetAllPoints(CommunitiesFrameInset)
|
||||
f:Show()
|
||||
else
|
||||
f:Hide()
|
||||
end
|
||||
end
|
||||
local function hideOverlay()
|
||||
f:Hide()
|
||||
end
|
||||
toggleOverlay() --run once
|
||||
|
||||
--hook
|
||||
hooksecurefunc(CommunitiesFrame,"SetDisplayMode", toggleOverlay)
|
||||
hooksecurefunc(CommunitiesFrame,"Show",toggleOverlay)
|
||||
hooksecurefunc(CommunitiesFrame,"Hide",hideOverlay)
|
||||
hooksecurefunc(CommunitiesFrame,"OnClubSelected", toggleOverlay)
|
||||
end
|
||||
end
|
||||
@@ -1,45 +1,45 @@
|
||||
--START DEPOSIT GUILDBANKFRAME_CLOSED
|
||||
function(e)
|
||||
local interval = 0.5
|
||||
local item = "U'taka"
|
||||
if e == "START" then
|
||||
for t = 1, GetNumGuildBankTabs() do
|
||||
for s = 1, 98 do
|
||||
local l = GetGuildBankItemLink(t, s)
|
||||
if l then
|
||||
local name = GetItemInfo(l)
|
||||
if name:match(item) then
|
||||
SetCurrentGuildBankTab(t)
|
||||
aura_env.tab = t
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if not aura_env.tab then print("NO FISH FOUND CUNT") else
|
||||
local s = 1
|
||||
local aura_env = aura_env
|
||||
aura_env.ticker = C_Timer.NewTicker(interval, function()
|
||||
print(aura_env.tab, s)
|
||||
AutoStoreGuildBankItem(aura_env.tab, s)
|
||||
s = s + 1
|
||||
end)
|
||||
end
|
||||
elseif e == "DEPOSIT" then
|
||||
local b = 0
|
||||
local s = 1
|
||||
local bs = 1
|
||||
local stage = 1
|
||||
local aura_env = aura_env
|
||||
aura_env.ticker = C_Timer.NewTicker(interval, function()
|
||||
if stage == 1 then SplitContainerItem(b, s, 1); print(stage); stage = stage + 1
|
||||
elseif stage == 2 then PickupGuildBankItem(6, bs); print(stage); stage = stage + 1
|
||||
elseif stage == 3 then PickupContainerItem(b, s); print(stage); stage = stage + 1
|
||||
elseif stage == 4 then PickupGuildBankItem(6, bs); print(stage); stage = stage + 1
|
||||
elseif stage == 5 then s = s + 1; bs = bs + 1; stage = 1 end
|
||||
if s >= GetContainerNumSlots(b) then s = 1; b = b + 1 end
|
||||
end)
|
||||
elseif e == "GUILDBANKFRAME_CLOSED" then
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
end
|
||||
--START DEPOSIT GUILDBANKFRAME_CLOSED
|
||||
function(e)
|
||||
local interval = 0.5
|
||||
local item = "U'taka"
|
||||
if e == "START" then
|
||||
for t = 1, GetNumGuildBankTabs() do
|
||||
for s = 1, 98 do
|
||||
local l = GetGuildBankItemLink(t, s)
|
||||
if l then
|
||||
local name = GetItemInfo(l)
|
||||
if name:match(item) then
|
||||
SetCurrentGuildBankTab(t)
|
||||
aura_env.tab = t
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if not aura_env.tab then print("NO FISH FOUND CUNT") else
|
||||
local s = 1
|
||||
local aura_env = aura_env
|
||||
aura_env.ticker = C_Timer.NewTicker(interval, function()
|
||||
print(aura_env.tab, s)
|
||||
AutoStoreGuildBankItem(aura_env.tab, s)
|
||||
s = s + 1
|
||||
end)
|
||||
end
|
||||
elseif e == "DEPOSIT" then
|
||||
local b = 0
|
||||
local s = 1
|
||||
local bs = 1
|
||||
local stage = 1
|
||||
local aura_env = aura_env
|
||||
aura_env.ticker = C_Timer.NewTicker(interval, function()
|
||||
if stage == 1 then SplitContainerItem(b, s, 1); print(stage); stage = stage + 1
|
||||
elseif stage == 2 then PickupGuildBankItem(6, bs); print(stage); stage = stage + 1
|
||||
elseif stage == 3 then PickupContainerItem(b, s); print(stage); stage = stage + 1
|
||||
elseif stage == 4 then PickupGuildBankItem(6, bs); print(stage); stage = stage + 1
|
||||
elseif stage == 5 then s = s + 1; bs = bs + 1; stage = 1 end
|
||||
if s >= GetContainerNumSlots(b) then s = 1; b = b + 1 end
|
||||
end)
|
||||
elseif e == "GUILDBANKFRAME_CLOSED" then
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
end
|
||||
end
|
||||
@@ -1,7 +1,7 @@
|
||||
--UPDATE_RAGE
|
||||
function(e, ...)
|
||||
if e == "UPDATE_RAGE" then
|
||||
local hs = IsCurrentSpell("Cleave")
|
||||
if hs == true then return true else return false end
|
||||
end
|
||||
--UPDATE_RAGE
|
||||
function(e, ...)
|
||||
if e == "UPDATE_RAGE" then
|
||||
local hs = IsCurrentSpell("Cleave")
|
||||
if hs == true then return true else return false end
|
||||
end
|
||||
end
|
||||
@@ -1,36 +1,36 @@
|
||||
--UPDATE_RAGE
|
||||
function(e, ...)
|
||||
if e == "UPDATE_RAGE" then
|
||||
return true
|
||||
elseif e == "PLAYER_REGEN_DISABLED" then
|
||||
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.05, function() WeakAuras.ScanEvents("UPDATE_RAGE") end) end
|
||||
end
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
local rage, maxrage = UnitPower("player"), UnitPowerMax("player")
|
||||
WeakAurasSaved.CustomTrash.CustomRage = rage
|
||||
return rage, maxrage, 1
|
||||
end
|
||||
|
||||
--DURATION2
|
||||
--Other aura
|
||||
function()
|
||||
local hs = IsCurrentSpell("Heroic Strike")
|
||||
local cleave = IsCurrentSpell("Cleave")
|
||||
if hs then return WeakAurasSaved.CustomTrash.CustomRage - 15, UnitPowerMax("player"), 1 elseif cleave then return WeakAurasSaved.CustomTrash.CustomRage - 20, UnitPowerMax("player"), 1 else return WeakAurasSaved.CustomTrash.CustomRage, UnitPowerMax("player"), 1 end
|
||||
end
|
||||
|
||||
--TEXT
|
||||
function()
|
||||
return WeakAurasSaved.CustomTrash.CustomRage
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if WeakAuras.IsOptionsOpen() and aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
else
|
||||
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.05, function() WeakAuras.ScanEvents("UPDATE_RAGE") end) end
|
||||
--UPDATE_RAGE
|
||||
function(e, ...)
|
||||
if e == "UPDATE_RAGE" then
|
||||
return true
|
||||
elseif e == "PLAYER_REGEN_DISABLED" then
|
||||
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.05, function() WeakAuras.ScanEvents("UPDATE_RAGE") end) end
|
||||
end
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
local rage, maxrage = UnitPower("player"), UnitPowerMax("player")
|
||||
WeakAurasSaved.CustomTrash.CustomRage = rage
|
||||
return rage, maxrage, 1
|
||||
end
|
||||
|
||||
--DURATION2
|
||||
--Other aura
|
||||
function()
|
||||
local hs = IsCurrentSpell("Heroic Strike")
|
||||
local cleave = IsCurrentSpell("Cleave")
|
||||
if hs then return WeakAurasSaved.CustomTrash.CustomRage - 15, UnitPowerMax("player"), 1 elseif cleave then return WeakAurasSaved.CustomTrash.CustomRage - 20, UnitPowerMax("player"), 1 else return WeakAurasSaved.CustomTrash.CustomRage, UnitPowerMax("player"), 1 end
|
||||
end
|
||||
|
||||
--TEXT
|
||||
function()
|
||||
return WeakAurasSaved.CustomTrash.CustomRage
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if WeakAuras.IsOptionsOpen() and aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
else
|
||||
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.05, function() WeakAuras.ScanEvents("UPDATE_RAGE") end) end
|
||||
end
|
||||
@@ -1,199 +1,199 @@
|
||||
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED UPDATE
|
||||
-- look for auras every frame
|
||||
-- or maybe look for combatlog ?
|
||||
-- get time when each aura is applied/expires
|
||||
-- calculate uptime based on the log ?
|
||||
-- alternatively sample each frame and add up # of frames aura was active and # of frames combat was ongoing
|
||||
-- bad solution though
|
||||
function(e)
|
||||
if e == "PLAYER_REGEN_DISABLED" then
|
||||
local aura_env = aura_env
|
||||
aura_env.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("UPDATE") end)
|
||||
aura_env.startCombat = debugprofilestop()
|
||||
aura_env.buffs = {}
|
||||
aura_env.debuffs = {}
|
||||
return true
|
||||
elseif e == "PLAYER_REGEN_ENABLED" then
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
elseif e == "UPDATE" then return true end
|
||||
end
|
||||
|
||||
--CLEU
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(e)
|
||||
if not aura_env.buffs then aura_env.buffs = {} end
|
||||
if not aura_env.debuffs then aura_env.debuffs = {} end
|
||||
|
||||
local timestamp, subEvent, _, _, caster, _, _, _, target = CombatLogGetCurrentEventInfo()
|
||||
-- print(CombatLogGetCurrentEventInfo())
|
||||
|
||||
-- if "buff" is selected in the menu and
|
||||
-- there has been an aura applied or removed and
|
||||
-- the aura has been cast by the player on the player then
|
||||
-- do fancy data stuff pls
|
||||
if InCombatLockdown() ~= false then
|
||||
local targetUnit = "boss1"
|
||||
if UnitExists(targetUnit) == false then targetUnit = "target" end
|
||||
if (aura_env.config.menu == 1 or aura_env.config.menu == 3) and (subEvent == "SPELL_AURA_REMOVED" or subEvent == "SPELL_AURA_APPLIED") and (caster == target and caster == UnitName("player")) then
|
||||
local spell = select(12, CombatLogGetCurrentEventInfo())
|
||||
print("SPell", spell)
|
||||
if not aura_env.buffs[spell] then
|
||||
aura_env.buffs[spell] = {
|
||||
["timeActive"] = 0,
|
||||
["timeInactive"] = 0,
|
||||
["active"] = false,
|
||||
["lastSwitch"] = debugprofilestop(),
|
||||
}
|
||||
-- print("OPA; NEW SPELL")
|
||||
end
|
||||
if subEvent == "SPELL_AURA_APPLIED" and aura_env.buffs[spell] then
|
||||
aura_env.buffs[spell].active = true
|
||||
aura_env.buffs[spell].timeInactive = aura_env.buffs[spell].timeInactive + debugprofilestop() - aura_env.buffs[spell].lastSwitch
|
||||
aura_env.buffs[spell].lastSwitch = debugprofilestop()
|
||||
elseif subEvent == "SPELL_AURA_REMOVED" and aura_env.buffs[spell] then
|
||||
aura_env.buffs[spell].active = false
|
||||
aura_env.buffs[spell].timeActive = aura_env.buffs[spell].timeActive + debugprofilestop() - aura_env.buffs[spell].lastSwitch
|
||||
aura_env.buffs[spell].lastSwitch = debugprofilestop()
|
||||
end
|
||||
elseif (aura_env.config.menu == 2 or aura_env.config.menu == 3) and (subEvent == "SPELL_AURA_REMOVED" or subEvent == "SPELL_AURA_APPLIED") and (caster == UnitName("player") and target == UnitName(targetUnit)) then
|
||||
local spell = select(12, CombatLogGetCurrentEventInfo())
|
||||
if not aura_env.debuffs[spell] then
|
||||
aura_env.debuffs[spell] = {
|
||||
["timeActive"] = 0,
|
||||
["timeInactive"] = 0,
|
||||
["active"] = false,
|
||||
["lastSwitch"] = debugprofilestop(),
|
||||
}
|
||||
-- print("OPA; NEW SPELL")
|
||||
end
|
||||
if subEvent == "SPELL_AURA_APPLIED" and aura_env.debuffs[spell] then
|
||||
aura_env.debuffs[spell].active = true
|
||||
aura_env.debuffs[spell].timeInactive = aura_env.debuffs[spell].timeInactive + debugprofilestop() - aura_env.debuffs[spell].lastSwitch
|
||||
aura_env.debuffs[spell].lastSwitch = debugprofilestop()
|
||||
elseif subEvent == "SPELL_AURA_REMOVED" and aura_env.debuffs[spell] then
|
||||
aura_env.debuffs[spell].active = false
|
||||
aura_env.debuffs[spell].timeActive = aura_env.debuffs[spell].timeActive + debugprofilestop() - aura_env.debuffs[spell].lastSwitch
|
||||
aura_env.debuffs[spell].lastSwitch = debugprofilestop()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- debug print pls
|
||||
for k,v in pairs(aura_env.buffs) do
|
||||
-- print(k,v)
|
||||
if type(v) == "table" then
|
||||
for k2,v2 in pairs(v) do
|
||||
-- print(k2,v2)
|
||||
if type(v2) == "table" then
|
||||
for k3,v3 in pairs(v2) do
|
||||
-- print(k3,v3)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
aura_env.combatTime = (debugprofilestop() - aura_env.startCombat) / 1000
|
||||
local output = aura_env.formatTime(aura_env.combatTime) .. "\n"
|
||||
aura_env.getColor(1)
|
||||
for k,v in pairs(aura_env.buffs) do
|
||||
|
||||
-- DEBUG
|
||||
-- print(k)
|
||||
-- for k2,v2 in pairs(v) do
|
||||
-- print(k2, v2)
|
||||
-- end
|
||||
-- print("DEBUG TIME", debugprofilestop())
|
||||
-- print("END" .. "\n")
|
||||
|
||||
local totalActiveTime = 0
|
||||
if v.active == true then
|
||||
totalActiveTime = totalActiveTime + debugprofilestop() - v.lastSwitch + v.timeActive
|
||||
else
|
||||
totalActiveTime = totalActiveTime + v.timeActive
|
||||
end
|
||||
|
||||
output = string.format("%s %s%20s %10s %10s\n", output, aura_env.getColor(1), GetSpellInfo(k), aura_env.formatTime(totalActiveTime / 1000), string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100))
|
||||
-- output = output .. aura_env.getColor(1) .. GetSpellInfo(k) .. " " .. aura_env.formatTime(totalActiveTime / 1000) .. " " .. string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100) .. "\n"
|
||||
end
|
||||
|
||||
for k,v in pairs(aura_env.debuffs) do
|
||||
|
||||
-- DEBUG
|
||||
-- print(k)
|
||||
for k2,v2 in pairs(v) do
|
||||
-- print(k2, v2)
|
||||
end
|
||||
-- print("DEBUG TIME", debugprofilestop())
|
||||
-- print("END" .. "\n")
|
||||
|
||||
local totalActiveTime = 0
|
||||
if v.active == true then
|
||||
totalActiveTime = totalActiveTime + debugprofilestop() - v.lastSwitch + v.timeActive
|
||||
else
|
||||
totalActiveTime = totalActiveTime + v.timeActive
|
||||
end
|
||||
output = output .. aura_env.getColor(2)
|
||||
if k == 233490 or (k >= 233496 and k <= 233499) then
|
||||
if k == 233490 then
|
||||
output = output .. GetSpellInfo(k) .. " 1"
|
||||
elseif k >= 233496 and k <= 233499 then
|
||||
output = output .. GetSpellInfo(k) .. " " .. (k % 233496) + 2
|
||||
end
|
||||
else
|
||||
output = output .. GetSpellInfo(k)
|
||||
end
|
||||
output = output .. " " .. aura_env.formatTime(totalActiveTime / 1000) .. " " .. string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100) .. "\n"
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.buffs = {}
|
||||
aura_env.debuffs = {}
|
||||
aura_env.combatTime = 0
|
||||
aura_env.startCombat = 0
|
||||
|
||||
aura_env.formatTime = function(time)
|
||||
local res, m, s = tonumber(string.format("%d", time)), 0, 0
|
||||
while res >= 60 do
|
||||
m = m + 1
|
||||
res = res - 60
|
||||
end
|
||||
s = res
|
||||
if s < 10 then
|
||||
s = string.format("0%d", s)
|
||||
end
|
||||
if type(s) ~= "string" then tostring(s) end
|
||||
return string.format("%d:%s", m, s)
|
||||
end
|
||||
|
||||
aura_env.getColor = function(mode)
|
||||
-- ff78cb00
|
||||
local output = "\124c"
|
||||
local colors = {}
|
||||
if mode == 1 then
|
||||
colors = {aura_env.config.bcolor[4], aura_env.config.bcolor[1], aura_env.config.bcolor[2], aura_env.config.bcolor[3]}
|
||||
elseif mode == 2 then
|
||||
colors = {aura_env.config.dcolor[4], aura_env.config.dcolor[1], aura_env.config.dcolor[2], aura_env.config.dcolor[3]}
|
||||
end
|
||||
local a, r, g, b = "00", "00", "00", "00"
|
||||
|
||||
a = string.format("%x", colors[1] * 255)
|
||||
r = string.format("%x", colors[2] * 255)
|
||||
g = string.format("%x", colors[3] * 255)
|
||||
b = string.format("%x", colors[4] * 255)
|
||||
|
||||
|
||||
if string.len(a) == 1 then a = "0" .. a end
|
||||
if string.len(r) == 1 then r = "0" .. r end
|
||||
if string.len(g) == 1 then g = "0" .. g end
|
||||
if string.len(b) == 1 then b = "0" .. b end
|
||||
|
||||
output = output .. a .. r .. g .. b
|
||||
return output
|
||||
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED UPDATE
|
||||
-- look for auras every frame
|
||||
-- or maybe look for combatlog ?
|
||||
-- get time when each aura is applied/expires
|
||||
-- calculate uptime based on the log ?
|
||||
-- alternatively sample each frame and add up # of frames aura was active and # of frames combat was ongoing
|
||||
-- bad solution though
|
||||
function(e)
|
||||
if e == "PLAYER_REGEN_DISABLED" then
|
||||
local aura_env = aura_env
|
||||
aura_env.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("UPDATE") end)
|
||||
aura_env.startCombat = debugprofilestop()
|
||||
aura_env.buffs = {}
|
||||
aura_env.debuffs = {}
|
||||
return true
|
||||
elseif e == "PLAYER_REGEN_ENABLED" then
|
||||
if aura_env.ticker then aura_env.ticker:Cancel() end
|
||||
elseif e == "UPDATE" then return true end
|
||||
end
|
||||
|
||||
--CLEU
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(e)
|
||||
if not aura_env.buffs then aura_env.buffs = {} end
|
||||
if not aura_env.debuffs then aura_env.debuffs = {} end
|
||||
|
||||
local timestamp, subEvent, _, _, caster, _, _, _, target = CombatLogGetCurrentEventInfo()
|
||||
-- print(CombatLogGetCurrentEventInfo())
|
||||
|
||||
-- if "buff" is selected in the menu and
|
||||
-- there has been an aura applied or removed and
|
||||
-- the aura has been cast by the player on the player then
|
||||
-- do fancy data stuff pls
|
||||
if InCombatLockdown() ~= false then
|
||||
local targetUnit = "boss1"
|
||||
if UnitExists(targetUnit) == false then targetUnit = "target" end
|
||||
if (aura_env.config.menu == 1 or aura_env.config.menu == 3) and (subEvent == "SPELL_AURA_REMOVED" or subEvent == "SPELL_AURA_APPLIED") and (caster == target and caster == UnitName("player")) then
|
||||
local spell = select(12, CombatLogGetCurrentEventInfo())
|
||||
print("SPell", spell)
|
||||
if not aura_env.buffs[spell] then
|
||||
aura_env.buffs[spell] = {
|
||||
["timeActive"] = 0,
|
||||
["timeInactive"] = 0,
|
||||
["active"] = false,
|
||||
["lastSwitch"] = debugprofilestop(),
|
||||
}
|
||||
-- print("OPA; NEW SPELL")
|
||||
end
|
||||
if subEvent == "SPELL_AURA_APPLIED" and aura_env.buffs[spell] then
|
||||
aura_env.buffs[spell].active = true
|
||||
aura_env.buffs[spell].timeInactive = aura_env.buffs[spell].timeInactive + debugprofilestop() - aura_env.buffs[spell].lastSwitch
|
||||
aura_env.buffs[spell].lastSwitch = debugprofilestop()
|
||||
elseif subEvent == "SPELL_AURA_REMOVED" and aura_env.buffs[spell] then
|
||||
aura_env.buffs[spell].active = false
|
||||
aura_env.buffs[spell].timeActive = aura_env.buffs[spell].timeActive + debugprofilestop() - aura_env.buffs[spell].lastSwitch
|
||||
aura_env.buffs[spell].lastSwitch = debugprofilestop()
|
||||
end
|
||||
elseif (aura_env.config.menu == 2 or aura_env.config.menu == 3) and (subEvent == "SPELL_AURA_REMOVED" or subEvent == "SPELL_AURA_APPLIED") and (caster == UnitName("player") and target == UnitName(targetUnit)) then
|
||||
local spell = select(12, CombatLogGetCurrentEventInfo())
|
||||
if not aura_env.debuffs[spell] then
|
||||
aura_env.debuffs[spell] = {
|
||||
["timeActive"] = 0,
|
||||
["timeInactive"] = 0,
|
||||
["active"] = false,
|
||||
["lastSwitch"] = debugprofilestop(),
|
||||
}
|
||||
-- print("OPA; NEW SPELL")
|
||||
end
|
||||
if subEvent == "SPELL_AURA_APPLIED" and aura_env.debuffs[spell] then
|
||||
aura_env.debuffs[spell].active = true
|
||||
aura_env.debuffs[spell].timeInactive = aura_env.debuffs[spell].timeInactive + debugprofilestop() - aura_env.debuffs[spell].lastSwitch
|
||||
aura_env.debuffs[spell].lastSwitch = debugprofilestop()
|
||||
elseif subEvent == "SPELL_AURA_REMOVED" and aura_env.debuffs[spell] then
|
||||
aura_env.debuffs[spell].active = false
|
||||
aura_env.debuffs[spell].timeActive = aura_env.debuffs[spell].timeActive + debugprofilestop() - aura_env.debuffs[spell].lastSwitch
|
||||
aura_env.debuffs[spell].lastSwitch = debugprofilestop()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- debug print pls
|
||||
for k,v in pairs(aura_env.buffs) do
|
||||
-- print(k,v)
|
||||
if type(v) == "table" then
|
||||
for k2,v2 in pairs(v) do
|
||||
-- print(k2,v2)
|
||||
if type(v2) == "table" then
|
||||
for k3,v3 in pairs(v2) do
|
||||
-- print(k3,v3)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
aura_env.combatTime = (debugprofilestop() - aura_env.startCombat) / 1000
|
||||
local output = aura_env.formatTime(aura_env.combatTime) .. "\n"
|
||||
aura_env.getColor(1)
|
||||
for k,v in pairs(aura_env.buffs) do
|
||||
|
||||
-- DEBUG
|
||||
-- print(k)
|
||||
-- for k2,v2 in pairs(v) do
|
||||
-- print(k2, v2)
|
||||
-- end
|
||||
-- print("DEBUG TIME", debugprofilestop())
|
||||
-- print("END" .. "\n")
|
||||
|
||||
local totalActiveTime = 0
|
||||
if v.active == true then
|
||||
totalActiveTime = totalActiveTime + debugprofilestop() - v.lastSwitch + v.timeActive
|
||||
else
|
||||
totalActiveTime = totalActiveTime + v.timeActive
|
||||
end
|
||||
|
||||
output = string.format("%s %s%20s %10s %10s\n", output, aura_env.getColor(1), GetSpellInfo(k), aura_env.formatTime(totalActiveTime / 1000), string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100))
|
||||
-- output = output .. aura_env.getColor(1) .. GetSpellInfo(k) .. " " .. aura_env.formatTime(totalActiveTime / 1000) .. " " .. string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100) .. "\n"
|
||||
end
|
||||
|
||||
for k,v in pairs(aura_env.debuffs) do
|
||||
|
||||
-- DEBUG
|
||||
-- print(k)
|
||||
for k2,v2 in pairs(v) do
|
||||
-- print(k2, v2)
|
||||
end
|
||||
-- print("DEBUG TIME", debugprofilestop())
|
||||
-- print("END" .. "\n")
|
||||
|
||||
local totalActiveTime = 0
|
||||
if v.active == true then
|
||||
totalActiveTime = totalActiveTime + debugprofilestop() - v.lastSwitch + v.timeActive
|
||||
else
|
||||
totalActiveTime = totalActiveTime + v.timeActive
|
||||
end
|
||||
output = output .. aura_env.getColor(2)
|
||||
if k == 233490 or (k >= 233496 and k <= 233499) then
|
||||
if k == 233490 then
|
||||
output = output .. GetSpellInfo(k) .. " 1"
|
||||
elseif k >= 233496 and k <= 233499 then
|
||||
output = output .. GetSpellInfo(k) .. " " .. (k % 233496) + 2
|
||||
end
|
||||
else
|
||||
output = output .. GetSpellInfo(k)
|
||||
end
|
||||
output = output .. " " .. aura_env.formatTime(totalActiveTime / 1000) .. " " .. string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100) .. "\n"
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.buffs = {}
|
||||
aura_env.debuffs = {}
|
||||
aura_env.combatTime = 0
|
||||
aura_env.startCombat = 0
|
||||
|
||||
aura_env.formatTime = function(time)
|
||||
local res, m, s = tonumber(string.format("%d", time)), 0, 0
|
||||
while res >= 60 do
|
||||
m = m + 1
|
||||
res = res - 60
|
||||
end
|
||||
s = res
|
||||
if s < 10 then
|
||||
s = string.format("0%d", s)
|
||||
end
|
||||
if type(s) ~= "string" then tostring(s) end
|
||||
return string.format("%d:%s", m, s)
|
||||
end
|
||||
|
||||
aura_env.getColor = function(mode)
|
||||
-- ff78cb00
|
||||
local output = "\124c"
|
||||
local colors = {}
|
||||
if mode == 1 then
|
||||
colors = {aura_env.config.bcolor[4], aura_env.config.bcolor[1], aura_env.config.bcolor[2], aura_env.config.bcolor[3]}
|
||||
elseif mode == 2 then
|
||||
colors = {aura_env.config.dcolor[4], aura_env.config.dcolor[1], aura_env.config.dcolor[2], aura_env.config.dcolor[3]}
|
||||
end
|
||||
local a, r, g, b = "00", "00", "00", "00"
|
||||
|
||||
a = string.format("%x", colors[1] * 255)
|
||||
r = string.format("%x", colors[2] * 255)
|
||||
g = string.format("%x", colors[3] * 255)
|
||||
b = string.format("%x", colors[4] * 255)
|
||||
|
||||
|
||||
if string.len(a) == 1 then a = "0" .. a end
|
||||
if string.len(r) == 1 then r = "0" .. r end
|
||||
if string.len(g) == 1 then g = "0" .. g end
|
||||
if string.len(b) == 1 then b = "0" .. b end
|
||||
|
||||
output = output .. a .. r .. g .. b
|
||||
return output
|
||||
end
|
||||
@@ -1,127 +1,127 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED ADD_BUFF REMOVE_BUFF
|
||||
--https://pastebin.com/4xyHRftN
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED" or se == "SPELL_AURA_REMOVED" then
|
||||
aura_env.scanBuffs()
|
||||
end
|
||||
elseif e == "ADD_BUFF" then
|
||||
local msg = select(1, ...)
|
||||
local arg = select(2, ...)
|
||||
if msg then
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] = {["active"] = false}
|
||||
if arg then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg].group = arg
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Groups[arg] then WeakAurasSaved.CustomTrash.BuffButtons.Groups[arg] = {["active"] = 0, ["shown"] = true} end
|
||||
end
|
||||
print(msg, "added")
|
||||
else
|
||||
print(msg, "already exists")
|
||||
end
|
||||
end
|
||||
aura_env.scanBuffs()
|
||||
elseif e == "REMOVE_BUFF" then
|
||||
local msg = select(1, ...)
|
||||
if msg and WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] = nil
|
||||
print(msg, "removed")
|
||||
else
|
||||
print(msg, WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg])
|
||||
print("Cannot remove", msg)
|
||||
end
|
||||
aura_env.scanBuffs()
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons then WeakAurasSaved.CustomTrash.BuffButtons = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs then WeakAurasSaved.CustomTrash.BuffButtons.Buffs = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons then WeakAurasSaved.CustomTrash.BuffButtons.Buttons = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Groups then WeakAurasSaved.CustomTrash.BuffButtons.Groups = {} end
|
||||
aura_env.buttons = 0
|
||||
|
||||
aura_env.scanBuffs = function()
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do
|
||||
v.active = false
|
||||
end
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
print(name)
|
||||
if WeakAurasSaved.CustomTrash.BuffButtons.Buffs[name] then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[name].active = true
|
||||
end
|
||||
if not name then break end
|
||||
end
|
||||
aura_env.refreshButtons()
|
||||
end
|
||||
|
||||
aura_env.resortButtons = function()
|
||||
aura_env.buttons = 0
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buttons) do
|
||||
if v:IsShown() == true then
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs[k] then
|
||||
v:Hide()
|
||||
else
|
||||
v:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.buttons * aura_env.config.size, 0)
|
||||
aura_env.buttons = aura_env.buttons + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
aura_env.refreshButtons = function()
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k] or not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k][0] then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetAttribute("type", "macro")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:RegisterForClicks("LeftButtonDown")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Show()
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.buttons * aura_env.config.size, 0)
|
||||
end
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetAttribute("macrotext", format("/use %s", k))
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetSize(aura_env.config.size, aura_env.config.size)
|
||||
end
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do
|
||||
if v.active == false then
|
||||
local texture = GetItemIcon(k) or GetSpellTexture(k)
|
||||
if not GetSpellTexture(k) then
|
||||
local count = GetItemCount(k)
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text then WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text = WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:CreateFontString("ItemCount", "ARTWORK") end
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetFont("Fonts\\FRIZQT__.TTF", aura_env.config.size / 2, "OUTLINE, MONOCHROME")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetPoint("CENTER", WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k], "CENTER")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetText(count)
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:Show()
|
||||
end
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetNormalTexture(texture)
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Show()
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k])
|
||||
else
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Hide()
|
||||
end
|
||||
end
|
||||
aura_env.resortButtons()
|
||||
end
|
||||
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buttons) do
|
||||
if k[0] then
|
||||
print(k,v)
|
||||
v:SetSize(aura_env.config.size, aura_env.config.size)
|
||||
ActionButton_HideOverlayGlow(k)
|
||||
end
|
||||
end
|
||||
aura_env.scanBuffs()
|
||||
|
||||
|
||||
--INIT
|
||||
local xsize, ysize = aura_env.region:GetSize()
|
||||
if not aura_env.button then aura_env.button = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate") end
|
||||
if aura_env.button then
|
||||
aura_env.button:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.button:SetSize(xsize, ysize)
|
||||
aura_env.button:SetAttribute("type", "macro")
|
||||
aura_env.button:RegisterForClicks("LeftButtonDown")
|
||||
aura_env.button:SetAttribute("macrotext", format("/use %s", aura_env.id))
|
||||
--COMBAT_LOG_EVENT_UNFILTERED ADD_BUFF REMOVE_BUFF
|
||||
--https://pastebin.com/4xyHRftN
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED" or se == "SPELL_AURA_REMOVED" then
|
||||
aura_env.scanBuffs()
|
||||
end
|
||||
elseif e == "ADD_BUFF" then
|
||||
local msg = select(1, ...)
|
||||
local arg = select(2, ...)
|
||||
if msg then
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] = {["active"] = false}
|
||||
if arg then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg].group = arg
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Groups[arg] then WeakAurasSaved.CustomTrash.BuffButtons.Groups[arg] = {["active"] = 0, ["shown"] = true} end
|
||||
end
|
||||
print(msg, "added")
|
||||
else
|
||||
print(msg, "already exists")
|
||||
end
|
||||
end
|
||||
aura_env.scanBuffs()
|
||||
elseif e == "REMOVE_BUFF" then
|
||||
local msg = select(1, ...)
|
||||
if msg and WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] = nil
|
||||
print(msg, "removed")
|
||||
else
|
||||
print(msg, WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg])
|
||||
print("Cannot remove", msg)
|
||||
end
|
||||
aura_env.scanBuffs()
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons then WeakAurasSaved.CustomTrash.BuffButtons = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs then WeakAurasSaved.CustomTrash.BuffButtons.Buffs = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons then WeakAurasSaved.CustomTrash.BuffButtons.Buttons = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Groups then WeakAurasSaved.CustomTrash.BuffButtons.Groups = {} end
|
||||
aura_env.buttons = 0
|
||||
|
||||
aura_env.scanBuffs = function()
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do
|
||||
v.active = false
|
||||
end
|
||||
for i = 1, 40 do
|
||||
local name = UnitBuff("player", i)
|
||||
print(name)
|
||||
if WeakAurasSaved.CustomTrash.BuffButtons.Buffs[name] then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[name].active = true
|
||||
end
|
||||
if not name then break end
|
||||
end
|
||||
aura_env.refreshButtons()
|
||||
end
|
||||
|
||||
aura_env.resortButtons = function()
|
||||
aura_env.buttons = 0
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buttons) do
|
||||
if v:IsShown() == true then
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs[k] then
|
||||
v:Hide()
|
||||
else
|
||||
v:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.buttons * aura_env.config.size, 0)
|
||||
aura_env.buttons = aura_env.buttons + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
aura_env.refreshButtons = function()
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k] or not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k][0] then
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetAttribute("type", "macro")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:RegisterForClicks("LeftButtonDown")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Show()
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.buttons * aura_env.config.size, 0)
|
||||
end
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetAttribute("macrotext", format("/use %s", k))
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetSize(aura_env.config.size, aura_env.config.size)
|
||||
end
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do
|
||||
if v.active == false then
|
||||
local texture = GetItemIcon(k) or GetSpellTexture(k)
|
||||
if not GetSpellTexture(k) then
|
||||
local count = GetItemCount(k)
|
||||
if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text then WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text = WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:CreateFontString("ItemCount", "ARTWORK") end
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetFont("Fonts\\FRIZQT__.TTF", aura_env.config.size / 2, "OUTLINE, MONOCHROME")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetPoint("CENTER", WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k], "CENTER")
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetText(count)
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:Show()
|
||||
end
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetNormalTexture(texture)
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Show()
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k])
|
||||
else
|
||||
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Hide()
|
||||
end
|
||||
end
|
||||
aura_env.resortButtons()
|
||||
end
|
||||
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buttons) do
|
||||
if k[0] then
|
||||
print(k,v)
|
||||
v:SetSize(aura_env.config.size, aura_env.config.size)
|
||||
ActionButton_HideOverlayGlow(k)
|
||||
end
|
||||
end
|
||||
aura_env.scanBuffs()
|
||||
|
||||
|
||||
--INIT
|
||||
local xsize, ysize = aura_env.region:GetSize()
|
||||
if not aura_env.button then aura_env.button = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate") end
|
||||
if aura_env.button then
|
||||
aura_env.button:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
aura_env.button:SetSize(xsize, ysize)
|
||||
aura_env.button:SetAttribute("type", "macro")
|
||||
aura_env.button:RegisterForClicks("LeftButtonDown")
|
||||
aura_env.button:SetAttribute("macrotext", format("/use %s", aura_env.id))
|
||||
end
|
||||
@@ -1,357 +1,357 @@
|
||||
--CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED
|
||||
function(e, ...)
|
||||
if aura_env.config.tsuenable == false then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.damagepercentage = 0
|
||||
local unit = "target"
|
||||
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
|
||||
local bossmax = UnitHealthMax(unit)
|
||||
if aura_env.config.pdmg == true then
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, UnitDebuff(unit, i))
|
||||
local stacks = select(3, UnitDebuff(unit, i))
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage + damage
|
||||
if caster == "player" then aura_env.owndebuff.damage = damage; aura_env.owndebuff.stacks = stacks end
|
||||
end
|
||||
elseif not name then break end
|
||||
end
|
||||
else
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff(unit, i))
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
aura_env.totaldebuff.damage = text:match("inflict (%d+%,?%d*)")
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub("%,", "")
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub(" ", "")
|
||||
aura_env.totaldebuff.damage = tonumber(aura_env.totaldebuff.damage)
|
||||
end
|
||||
break
|
||||
elseif not name then break end
|
||||
end
|
||||
end
|
||||
aura_env.damagepercentage = aura_env.round(((aura_env.totaldebuff.damage / bossmax) * 100), 2)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--TSU
|
||||
--CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED
|
||||
function(allstates, e, ...)
|
||||
if aura_env.config.tsuenable == true then
|
||||
if InCombatLockdown() == true then
|
||||
--Base setup
|
||||
local unit = "target"
|
||||
if not aura_env.data then aura_env.data = {} end
|
||||
local crit = false
|
||||
local function update_allstates(data, unit)
|
||||
local maxdmg, maxstack = 0, 0
|
||||
local totaldmg, totalstack = 0, 0
|
||||
--Get max and total damage
|
||||
for k,v in pairs(data) do
|
||||
if v.d > maxdmg then
|
||||
maxdmg = v.d
|
||||
end
|
||||
if v.s > maxstack then
|
||||
maxstack = v.s
|
||||
end
|
||||
totaldmg = totaldmg + v.d
|
||||
totalstack = totalstack + v.s
|
||||
end
|
||||
--Get damage in boss %
|
||||
local perc = 0
|
||||
local pp = 0
|
||||
local islow = false
|
||||
if UnitExists(unit) then
|
||||
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
|
||||
pp = hp/maxhp
|
||||
if pp < 0.3 then islow = true end
|
||||
perc = aura_env.round(((totaldmg / maxhp) * 100), 2)
|
||||
end
|
||||
--Store all members in allstates
|
||||
for k,v in pairs(data) do
|
||||
allstates[k] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
caster = k,
|
||||
class = v.c,
|
||||
value = v.d,
|
||||
total = maxdmg,
|
||||
index = v.d,
|
||||
stacks = v.s,
|
||||
crit = v.cr,
|
||||
}
|
||||
end
|
||||
--Total bar control
|
||||
if UnitExists(unit) then
|
||||
allstates[1] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
caster = "Total",
|
||||
class = 5, --priest; White
|
||||
value = totaldmg,
|
||||
total = totaldmg,
|
||||
index = totaldmg + 1,
|
||||
stacks = totalstack,
|
||||
percent = perc,
|
||||
}
|
||||
if islow == true then
|
||||
allstates[1].class = 15
|
||||
end
|
||||
end
|
||||
end
|
||||
--Debug and options
|
||||
local command = UnitDebuff; if aura_env.config.debug == true then command = aura_env.UnitDebuffC end
|
||||
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
|
||||
--Trying to store info of debuff into data table from <unit>, looking for damage, stacks and caster, also included debug
|
||||
if UnitExists(unit) then
|
||||
if e == "PLAYER_TARGET_CHANGED" or e == "PLAYER_FOCUS_CHANGED" then
|
||||
for k,v in pairs(allstates) do
|
||||
v.show = false
|
||||
v.changed = true
|
||||
end
|
||||
aura_env.data = {}
|
||||
if UnitExists(unit) then
|
||||
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
|
||||
for i = 1, 100 do
|
||||
local name = command(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, command(unit, i))
|
||||
caster = UnitName(caster)
|
||||
local stacks = select(3, command(unit, i))
|
||||
if aura_env.config.debug == false then
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
aura_env.data[caster] = {
|
||||
["d"] = damage,
|
||||
["s"] = stacks,
|
||||
["c"] = select(3, UnitClass(caster)),
|
||||
}
|
||||
end
|
||||
else
|
||||
local damage = i * 523427
|
||||
aura_env.data[caster] = {
|
||||
["d"] = damage,
|
||||
["s"] = stacks,
|
||||
["c"] = select(4, command(unit, i)),
|
||||
}
|
||||
end
|
||||
elseif not name then
|
||||
break
|
||||
end
|
||||
end
|
||||
update_allstates(aura_env.data, unit)
|
||||
end
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
|
||||
--Looking for debuff info upon applying new stack, to update data table
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" then
|
||||
for i = 1, 100 do
|
||||
local name = command(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, command(unit, i))
|
||||
caster = UnitName(caster)
|
||||
local stacks = select(3, command(unit, i))
|
||||
if aura_env.config.debug == false then
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
aura_env.data[caster] = {
|
||||
["d"] = damage,
|
||||
["s"] = stacks,
|
||||
["c"] = select(3, UnitClass(caster)),
|
||||
}
|
||||
end
|
||||
else
|
||||
local damage = i * 12312
|
||||
aura_env.data[caster] = {
|
||||
["d"] = damage,
|
||||
["s"] = stacks,
|
||||
["c"] = select(4, command(unit, i)),
|
||||
}
|
||||
end
|
||||
elseif not name then
|
||||
break
|
||||
end
|
||||
update_allstates(aura_env.data, unit)
|
||||
end
|
||||
--Looking for damage done by debuff at 30% and storing into data as new damage
|
||||
elseif se == "SPELL_DAMAGE" and select(13, ...) == "Conductive Ink" then
|
||||
local caster = select(5, ...)
|
||||
local hit = select(15, ...)
|
||||
local crit = select(21, ...)
|
||||
if aura_env.data[caster] then
|
||||
aura_env.data[caster].d = hit
|
||||
aura_env.data[caster].cr = crit
|
||||
update_allstates(aura_env.data, unit)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--CUSTOM TRIGGER
|
||||
function(t)
|
||||
if aura_env.config.tsuenable == false then return t[1] and t[2] elseif aura_env.config.tsuenable == true then return t[3] and t[2] end
|
||||
end
|
||||
|
||||
--COLOR ANIMATION
|
||||
function()
|
||||
if aura_env.state then
|
||||
return aura_env.classColor(aura_env.state.class)
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.config.tsuenable == false then
|
||||
if aura_env.config.pdmg == true then
|
||||
if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
|
||||
if aura_env.config.stext == true then aura_env.region.text3:SetText("Player stacks\nPlayer damage\nTotal stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
|
||||
else
|
||||
if aura_env.config.sh == true then aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
|
||||
if aura_env.config.stext == true then aura_env.region.text3:SetText("Total stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
|
||||
end
|
||||
else
|
||||
if aura_env.state.caster == "Total" then
|
||||
return aura_env.shorten(aura_env.state.value) .. " - " .. aura_env.state.stacks .. " - " .. aura_env.state.percent .. "%"
|
||||
else
|
||||
if aura_env.state.crit == true then
|
||||
return aura_env.state.stacks .. " - " .. aura_env.shorten(aura_env.state.value) .. "(C)"
|
||||
else
|
||||
return aura_env.state.stacks .. " - " .. aura_env.shorten(aura_env.state.value)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate")
|
||||
aura_env.myTooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
|
||||
if aura_env.config.tsuenable == false then
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0)
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
|
||||
if not aura_env.region.text3 then
|
||||
local text3 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text3 = text3
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text3:SetFont(font, size, flags)
|
||||
aura_env.region.text3:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", - aura_env.config.x, 0)
|
||||
aura_env.region.text3:SetText("")
|
||||
aura_env.region.text3:Show()
|
||||
aura_env.region.bar:Hide()
|
||||
end
|
||||
|
||||
if aura_env.config.tsuenable == true and aura_env.region.text2 then aura_env.region.text2:Hide() end
|
||||
if aura_env.config.tsuenable == true and aura_env.region.text3 then aura_env.region.text3:Hide() end
|
||||
if aura_env.config.tsuenable == true and aura_env.region.bar then aura_env.region.bar:Show() 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.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.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43
|
||||
elseif class == 2 then return 0.96, 0.55, 0.73
|
||||
elseif class == 3 then return 0.67, 0.83, 0.45
|
||||
elseif class == 4 then return 1, 0.96, 0.41, 1
|
||||
elseif class == 5 then return 1, 1, 1
|
||||
elseif class == 6 then return 0.77, 0.12, 0.23
|
||||
elseif class == 7 then return 0, 0.44, 0.87
|
||||
elseif class == 8 then return 0.25, 0.78, 0.92
|
||||
elseif class == 9 then return 0.53, 0.53, 0.93
|
||||
elseif class == 10 then return 0, 1, 0.59
|
||||
elseif class == 11 then return 1, 0.49, 0.04
|
||||
elseif class == 12 then return 0.64, 0.19, 0.79
|
||||
elseif class == 15 then return 0, 1, 0
|
||||
else return 1, 1, 1 end
|
||||
end
|
||||
--TESTING
|
||||
--Conductive Ink 1500960 1 Magic 120 119774.845 player false false 302565 false false true false 1
|
||||
aura_env.UnitDebuffC = function(unit, i)
|
||||
if i == 1 then return "Conductive Ink", 1500960, 1, 2, 120, 119774.845, "Pinko"
|
||||
elseif i == 1 then return "Conductive Ink", 1500960, 3, 4, 120, 119774.845, "Billy"
|
||||
elseif i == 2 then return "Conductive Ink", 1500960, 7, 7, 120, 119774.845, "Mary"
|
||||
elseif i == 3 then return "Conductive Ink", 1500960, 35, 11, 120, 119774.845, "Anna"
|
||||
elseif i == 4 then return "Conductive Ink", 1500960, 8, 6, 120, 119774.845, "John"
|
||||
elseif i == 5 then return "Conductive Ink", 1500960, 72, 2, 120, 119774.845, "Frank"
|
||||
elseif i == 6 then return "Conductive Ink", 1500960, 25, 7, 120, 119774.845, "Emma"
|
||||
elseif i == 7 then return "Conductive Ink", 1500960, 45, 8, 120, 119774.845, "Sophia"
|
||||
elseif i == 8 then return "Conductive Ink", 1500960, 37, 5, 120, 119774.845, "Henry"
|
||||
elseif i == 9 then return "Conductive Ink", 1500960, 4, 3, 120, 119774.845, "Ethan"
|
||||
elseif i == 10 then return "Conductive Ink", 1500960, 1, 1, 120, 119774.845, "Michael"
|
||||
end
|
||||
--CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED
|
||||
function(e, ...)
|
||||
if aura_env.config.tsuenable == false then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.damagepercentage = 0
|
||||
local unit = "target"
|
||||
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
|
||||
local bossmax = UnitHealthMax(unit)
|
||||
if aura_env.config.pdmg == true then
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, UnitDebuff(unit, i))
|
||||
local stacks = select(3, UnitDebuff(unit, i))
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage + damage
|
||||
if caster == "player" then aura_env.owndebuff.damage = damage; aura_env.owndebuff.stacks = stacks end
|
||||
end
|
||||
elseif not name then break end
|
||||
end
|
||||
else
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff(unit, i))
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
aura_env.totaldebuff.damage = text:match("inflict (%d+%,?%d*)")
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub("%,", "")
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub(" ", "")
|
||||
aura_env.totaldebuff.damage = tonumber(aura_env.totaldebuff.damage)
|
||||
end
|
||||
break
|
||||
elseif not name then break end
|
||||
end
|
||||
end
|
||||
aura_env.damagepercentage = aura_env.round(((aura_env.totaldebuff.damage / bossmax) * 100), 2)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--TSU
|
||||
--CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED
|
||||
function(allstates, e, ...)
|
||||
if aura_env.config.tsuenable == true then
|
||||
if InCombatLockdown() == true then
|
||||
--Base setup
|
||||
local unit = "target"
|
||||
if not aura_env.data then aura_env.data = {} end
|
||||
local crit = false
|
||||
local function update_allstates(data, unit)
|
||||
local maxdmg, maxstack = 0, 0
|
||||
local totaldmg, totalstack = 0, 0
|
||||
--Get max and total damage
|
||||
for k,v in pairs(data) do
|
||||
if v.d > maxdmg then
|
||||
maxdmg = v.d
|
||||
end
|
||||
if v.s > maxstack then
|
||||
maxstack = v.s
|
||||
end
|
||||
totaldmg = totaldmg + v.d
|
||||
totalstack = totalstack + v.s
|
||||
end
|
||||
--Get damage in boss %
|
||||
local perc = 0
|
||||
local pp = 0
|
||||
local islow = false
|
||||
if UnitExists(unit) then
|
||||
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
|
||||
pp = hp/maxhp
|
||||
if pp < 0.3 then islow = true end
|
||||
perc = aura_env.round(((totaldmg / maxhp) * 100), 2)
|
||||
end
|
||||
--Store all members in allstates
|
||||
for k,v in pairs(data) do
|
||||
allstates[k] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
caster = k,
|
||||
class = v.c,
|
||||
value = v.d,
|
||||
total = maxdmg,
|
||||
index = v.d,
|
||||
stacks = v.s,
|
||||
crit = v.cr,
|
||||
}
|
||||
end
|
||||
--Total bar control
|
||||
if UnitExists(unit) then
|
||||
allstates[1] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
resort = true,
|
||||
progressType = "static",
|
||||
caster = "Total",
|
||||
class = 5, --priest; White
|
||||
value = totaldmg,
|
||||
total = totaldmg,
|
||||
index = totaldmg + 1,
|
||||
stacks = totalstack,
|
||||
percent = perc,
|
||||
}
|
||||
if islow == true then
|
||||
allstates[1].class = 15
|
||||
end
|
||||
end
|
||||
end
|
||||
--Debug and options
|
||||
local command = UnitDebuff; if aura_env.config.debug == true then command = aura_env.UnitDebuffC end
|
||||
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
|
||||
--Trying to store info of debuff into data table from <unit>, looking for damage, stacks and caster, also included debug
|
||||
if UnitExists(unit) then
|
||||
if e == "PLAYER_TARGET_CHANGED" or e == "PLAYER_FOCUS_CHANGED" then
|
||||
for k,v in pairs(allstates) do
|
||||
v.show = false
|
||||
v.changed = true
|
||||
end
|
||||
aura_env.data = {}
|
||||
if UnitExists(unit) then
|
||||
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
|
||||
for i = 1, 100 do
|
||||
local name = command(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, command(unit, i))
|
||||
caster = UnitName(caster)
|
||||
local stacks = select(3, command(unit, i))
|
||||
if aura_env.config.debug == false then
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
aura_env.data[caster] = {
|
||||
["d"] = damage,
|
||||
["s"] = stacks,
|
||||
["c"] = select(3, UnitClass(caster)),
|
||||
}
|
||||
end
|
||||
else
|
||||
local damage = i * 523427
|
||||
aura_env.data[caster] = {
|
||||
["d"] = damage,
|
||||
["s"] = stacks,
|
||||
["c"] = select(4, command(unit, i)),
|
||||
}
|
||||
end
|
||||
elseif not name then
|
||||
break
|
||||
end
|
||||
end
|
||||
update_allstates(aura_env.data, unit)
|
||||
end
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
|
||||
--Looking for debuff info upon applying new stack, to update data table
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" then
|
||||
for i = 1, 100 do
|
||||
local name = command(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, command(unit, i))
|
||||
caster = UnitName(caster)
|
||||
local stacks = select(3, command(unit, i))
|
||||
if aura_env.config.debug == false then
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
aura_env.data[caster] = {
|
||||
["d"] = damage,
|
||||
["s"] = stacks,
|
||||
["c"] = select(3, UnitClass(caster)),
|
||||
}
|
||||
end
|
||||
else
|
||||
local damage = i * 12312
|
||||
aura_env.data[caster] = {
|
||||
["d"] = damage,
|
||||
["s"] = stacks,
|
||||
["c"] = select(4, command(unit, i)),
|
||||
}
|
||||
end
|
||||
elseif not name then
|
||||
break
|
||||
end
|
||||
update_allstates(aura_env.data, unit)
|
||||
end
|
||||
--Looking for damage done by debuff at 30% and storing into data as new damage
|
||||
elseif se == "SPELL_DAMAGE" and select(13, ...) == "Conductive Ink" then
|
||||
local caster = select(5, ...)
|
||||
local hit = select(15, ...)
|
||||
local crit = select(21, ...)
|
||||
if aura_env.data[caster] then
|
||||
aura_env.data[caster].d = hit
|
||||
aura_env.data[caster].cr = crit
|
||||
update_allstates(aura_env.data, unit)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--CUSTOM TRIGGER
|
||||
function(t)
|
||||
if aura_env.config.tsuenable == false then return t[1] and t[2] elseif aura_env.config.tsuenable == true then return t[3] and t[2] end
|
||||
end
|
||||
|
||||
--COLOR ANIMATION
|
||||
function()
|
||||
if aura_env.statee then
|
||||
return aura_env.classColor(aura_env.statee.class)
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.config.tsuenable == false then
|
||||
if aura_env.config.pdmg == true then
|
||||
if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
|
||||
if aura_env.config.stext == true then aura_env.region.text3:SetText("Player stacks\nPlayer damage\nTotal stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
|
||||
else
|
||||
if aura_env.config.sh == true then aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
|
||||
if aura_env.config.stext == true then aura_env.region.text3:SetText("Total stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
|
||||
end
|
||||
else
|
||||
if aura_env.statee.caster == "Total" then
|
||||
return aura_env.shorten(aura_env.statee.value) .. " - " .. aura_env.statee.stacks .. " - " .. aura_env.statee.percent .. "%"
|
||||
else
|
||||
if aura_env.statee.crit == true then
|
||||
return aura_env.statee.stacks .. " - " .. aura_env.shorten(aura_env.statee.value) .. "(C)"
|
||||
else
|
||||
return aura_env.statee.stacks .. " - " .. aura_env.shorten(aura_env.statee.value)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate")
|
||||
aura_env.myTooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
|
||||
if aura_env.config.tsuenable == false then
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0)
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
|
||||
if not aura_env.region.text3 then
|
||||
local text3 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text3 = text3
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text3:SetFont(font, size, flags)
|
||||
aura_env.region.text3:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", - aura_env.config.x, 0)
|
||||
aura_env.region.text3:SetText("")
|
||||
aura_env.region.text3:Show()
|
||||
aura_env.region.bar:Hide()
|
||||
end
|
||||
|
||||
if aura_env.config.tsuenable == true and aura_env.region.text2 then aura_env.region.text2:Hide() end
|
||||
if aura_env.config.tsuenable == true and aura_env.region.text3 then aura_env.region.text3:Hide() end
|
||||
if aura_env.config.tsuenable == true and aura_env.region.bar then aura_env.region.bar:Show() 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.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.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43
|
||||
elseif class == 2 then return 0.96, 0.55, 0.73
|
||||
elseif class == 3 then return 0.67, 0.83, 0.45
|
||||
elseif class == 4 then return 1, 0.96, 0.41, 1
|
||||
elseif class == 5 then return 1, 1, 1
|
||||
elseif class == 6 then return 0.77, 0.12, 0.23
|
||||
elseif class == 7 then return 0, 0.44, 0.87
|
||||
elseif class == 8 then return 0.25, 0.78, 0.92
|
||||
elseif class == 9 then return 0.53, 0.53, 0.93
|
||||
elseif class == 10 then return 0, 1, 0.59
|
||||
elseif class == 11 then return 1, 0.49, 0.04
|
||||
elseif class == 12 then return 0.64, 0.19, 0.79
|
||||
elseif class == 15 then return 0, 1, 0
|
||||
else return 1, 1, 1 end
|
||||
end
|
||||
--TESTING
|
||||
--Conductive Ink 1500960 1 Magic 120 119774.845 player false false 302565 false false true false 1
|
||||
aura_env.UnitDebuffC = function(unit, i)
|
||||
if i == 1 then return "Conductive Ink", 1500960, 1, 2, 120, 119774.845, "Pinko"
|
||||
elseif i == 1 then return "Conductive Ink", 1500960, 3, 4, 120, 119774.845, "Billy"
|
||||
elseif i == 2 then return "Conductive Ink", 1500960, 7, 7, 120, 119774.845, "Mary"
|
||||
elseif i == 3 then return "Conductive Ink", 1500960, 35, 11, 120, 119774.845, "Anna"
|
||||
elseif i == 4 then return "Conductive Ink", 1500960, 8, 6, 120, 119774.845, "John"
|
||||
elseif i == 5 then return "Conductive Ink", 1500960, 72, 2, 120, 119774.845, "Frank"
|
||||
elseif i == 6 then return "Conductive Ink", 1500960, 25, 7, 120, 119774.845, "Emma"
|
||||
elseif i == 7 then return "Conductive Ink", 1500960, 45, 8, 120, 119774.845, "Sophia"
|
||||
elseif i == 8 then return "Conductive Ink", 1500960, 37, 5, 120, 119774.845, "Henry"
|
||||
elseif i == 9 then return "Conductive Ink", 1500960, 4, 3, 120, 119774.845, "Ethan"
|
||||
elseif i == 10 then return "Conductive Ink", 1500960, 1, 1, 120, 119774.845, "Michael"
|
||||
end
|
||||
end
|
||||
@@ -1,87 +1,87 @@
|
||||
--CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS
|
||||
function(e, msg, sender, ...)
|
||||
if not aura_env.toggle then aura_env.toggle = 1 end
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
|
||||
["port"] = 1,
|
||||
["portal"] = 1,
|
||||
["org"] = 1,
|
||||
["og"] = 1,
|
||||
["uc"] = 1,
|
||||
["under"] = 1,
|
||||
["thunder"] = 1,
|
||||
["tb"] = 1,
|
||||
["wtb"] = 1,
|
||||
}
|
||||
end
|
||||
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then
|
||||
local class = select(2, GetPlayerInfoByGUID(select(10, ...)))
|
||||
if msg and aura_env.toggle == 1 then
|
||||
msg = msg:lower()
|
||||
local noRealmSender = sender:match("(.+)-%w+")
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
if msg:match(k) then
|
||||
local st, en = msg:find(k)
|
||||
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then
|
||||
InviteUnit(sender)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "TOGGLE_MAGUS" then
|
||||
if aura_env.toggle == 0 then
|
||||
print("Toggling script on")
|
||||
aura_env.toggle = 1
|
||||
else
|
||||
print("Toggling script off")
|
||||
aura_env.toggle = 0
|
||||
end
|
||||
elseif e == "ADD_KEYWORD" then
|
||||
if msg then
|
||||
print("Adding", msg)
|
||||
msg = msg:lower()
|
||||
WeakAurasSaved.MagusKeywords[msg] = 1
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
elseif e == "LIST_KEYWORDS" then
|
||||
local test = ""
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
print(k)
|
||||
test = test .. k .. "\n"
|
||||
end
|
||||
message(test)
|
||||
elseif e == "REMOVE_KEYWORD" then
|
||||
if msg then
|
||||
if WeakAurasSaved.MagusKeywords[msg] then
|
||||
print("Removing", msg)
|
||||
WeakAurasSaved.MagusKeywords[msg] = nil
|
||||
else
|
||||
print(msg, "does not exist in the keyword table")
|
||||
end
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.button = CreateFrame("Button", "buton", UIParent, "SecureActionButtonTemplate")
|
||||
aura_env.button:SetAttribute("type", "macro")
|
||||
aura_env.button:SetPoint("CENTER", UIParent, "CENTER")
|
||||
aura_env.button:SetWidth(128)
|
||||
aura_env.button:SetHeight(128)
|
||||
aura_env.button:SetNormalTexture("interface/icons/inv_misc_enggizmos_rocketchicken.blp")
|
||||
aura_env.button:SetPushedTexture("interface/icons/inv_misc_enggizmos_rocketchicken.blp")
|
||||
if not aura_env.toggle then aura_env.toggle = 1 end
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
|
||||
"port",
|
||||
"portal",
|
||||
"org",
|
||||
"og",
|
||||
"UC",
|
||||
"under",
|
||||
"thunder",
|
||||
"tb",
|
||||
"wtb",
|
||||
--CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS
|
||||
function(e, msg, sender, ...)
|
||||
if not aura_env.toggle then aura_env.toggle = 1 end
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
|
||||
["port"] = 1,
|
||||
["portal"] = 1,
|
||||
["org"] = 1,
|
||||
["og"] = 1,
|
||||
["uc"] = 1,
|
||||
["under"] = 1,
|
||||
["thunder"] = 1,
|
||||
["tb"] = 1,
|
||||
["wtb"] = 1,
|
||||
}
|
||||
end
|
||||
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then
|
||||
local class = select(2, GetPlayerInfoByGUID(select(10, ...)))
|
||||
if msg and aura_env.toggle == 1 then
|
||||
msg = msg:lower()
|
||||
local noRealmSender = sender:match("(.+)-%w+")
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
if msg:match(k) then
|
||||
local st, en = msg:find(k)
|
||||
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then
|
||||
InviteUnit(sender)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "TOGGLE_MAGUS" then
|
||||
if aura_env.toggle == 0 then
|
||||
print("Toggling script on")
|
||||
aura_env.toggle = 1
|
||||
else
|
||||
print("Toggling script off")
|
||||
aura_env.toggle = 0
|
||||
end
|
||||
elseif e == "ADD_KEYWORD" then
|
||||
if msg then
|
||||
print("Adding", msg)
|
||||
msg = msg:lower()
|
||||
WeakAurasSaved.MagusKeywords[msg] = 1
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
elseif e == "LIST_KEYWORDS" then
|
||||
local test = ""
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
print(k)
|
||||
test = test .. k .. "\n"
|
||||
end
|
||||
message(test)
|
||||
elseif e == "REMOVE_KEYWORD" then
|
||||
if msg then
|
||||
if WeakAurasSaved.MagusKeywords[msg] then
|
||||
print("Removing", msg)
|
||||
WeakAurasSaved.MagusKeywords[msg] = nil
|
||||
else
|
||||
print(msg, "does not exist in the keyword table")
|
||||
end
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.button = CreateFrame("Button", "buton", UIParent, "SecureActionButtonTemplate")
|
||||
aura_env.button:SetAttribute("type", "macro")
|
||||
aura_env.button:SetPoint("CENTER", UIParent, "CENTER")
|
||||
aura_env.button:SetWidth(128)
|
||||
aura_env.button:SetHeight(128)
|
||||
aura_env.button:SetNormalTexture("interface/icons/inv_misc_enggizmos_rocketchicken.blp")
|
||||
aura_env.button:SetPushedTexture("interface/icons/inv_misc_enggizmos_rocketchicken.blp")
|
||||
if not aura_env.toggle then aura_env.toggle = 1 end
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
|
||||
"port",
|
||||
"portal",
|
||||
"org",
|
||||
"og",
|
||||
"UC",
|
||||
"under",
|
||||
"thunder",
|
||||
"tb",
|
||||
"wtb",
|
||||
}
|
||||
@@ -1,84 +1,84 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UNIT_STATS PLAYER_TARGET_CHANGED
|
||||
function(e, ...)
|
||||
local function updateStats()
|
||||
aura_env.output = "BUFFS "
|
||||
local noBuffs = 0
|
||||
local hitPercent = 0
|
||||
local critPercent = 0
|
||||
local attackPower = 0
|
||||
local effArmor = 0
|
||||
local armorPercent = 0
|
||||
|
||||
for i = 1, 40 do
|
||||
if UnitBuff("player", i) then
|
||||
noBuffs = noBuffs + 1
|
||||
end
|
||||
end
|
||||
hitPercent = GetCombatRatingBonus(6) + GetHitModifier()
|
||||
critPercent = GetCritChance()
|
||||
local base, pos, neg = UnitAttackPower("player")
|
||||
attackPower = base + pos - neg
|
||||
effArmor = select(2, UnitArmor("player"))
|
||||
if UnitExists("target") then
|
||||
local tlevel = UnitLevel("target")
|
||||
if tlevel < 60 then
|
||||
armorPercent = (effArmor / ((85 * tlevel) + effArmor + 400)) * 100
|
||||
elseif tlevel >= 60 then
|
||||
armorPercent = (effArmor / ((467.5 * tlevel) + effArmor - 22167.5)) * 100
|
||||
end
|
||||
end
|
||||
|
||||
-- BUFFS %d%d (5 + 2 + 1 = 8 + 4)
|
||||
aura_env.output = aura_env.output .. noBuffs
|
||||
while string.len(aura_env.output) < 12 do
|
||||
aura_env.output = aura_env.output .. " "
|
||||
end
|
||||
-- BUFFS %d%d<4>HIT %d%d.%d (12 + 3 + 1 + 4 = 20 + 4)
|
||||
aura_env.output = aura_env.output .. "HIT " .. math.ceil((hitPercent * 10)) / 10 .. "%"
|
||||
while string.len(aura_env.output) < 24 do
|
||||
aura_env.output = aura_env.output .. " "
|
||||
end
|
||||
-- BUFFS %d%d<4>HIT %d%d.%d<4>CRIT %d%d.%d (24 + 4 + 1 + 4 = 33 + 4)
|
||||
aura_env.output = aura_env.output .. "CRIT " .. math.ceil((critPercent * 10)) / 10 .. "%"
|
||||
while string.len(aura_env.output) < 37 do
|
||||
aura_env.output = aura_env.output .. " "
|
||||
end
|
||||
-- BUFFS %d%d<4>HIT %d%d.%d<4>CRIT %d%d.%d<4>AP %d+
|
||||
-- APPEND AP
|
||||
-- 37 + 3 + 8 = 48
|
||||
aura_env.output = aura_env.output .. "AP " .. attackPower
|
||||
while string.len(aura_env.output) < 48 do
|
||||
aura_env.output = aura_env.output .. " "
|
||||
end
|
||||
aura_env.output = aura_env.output .. "A " .. effArmor .. " " .. math.ceil((armorPercent * 10)) / 10 .. "%"
|
||||
end
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local subevents = {
|
||||
["SPELL_AURA_APPLIED"] = true,
|
||||
["SPELL_AURA_APPLIED_DOSE"] = true,
|
||||
["SPELL_AURA_REMOVED"] = true,
|
||||
["SPELL_AURA_REMOVED_DOSE"] = true,
|
||||
["SPELL_AURA_REFRESH"] = true,
|
||||
}
|
||||
if subevents[se] then
|
||||
local target = select(9, ...)
|
||||
if target == UnitName("player") then
|
||||
updateStats()
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "UNIT_STATS" or e == "PLAYER_TARGET_CHANGED" then
|
||||
updateStats()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.output or ""
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.output = ""
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UNIT_STATS PLAYER_TARGET_CHANGED
|
||||
function(e, ...)
|
||||
local function updateStats()
|
||||
aura_env.output = "BUFFS "
|
||||
local noBuffs = 0
|
||||
local hitPercent = 0
|
||||
local critPercent = 0
|
||||
local attackPower = 0
|
||||
local effArmor = 0
|
||||
local armorPercent = 0
|
||||
|
||||
for i = 1, 40 do
|
||||
if UnitBuff("player", i) then
|
||||
noBuffs = noBuffs + 1
|
||||
end
|
||||
end
|
||||
hitPercent = GetCombatRatingBonus(6) + GetHitModifier()
|
||||
critPercent = GetCritChance()
|
||||
local base, pos, neg = UnitAttackPower("player")
|
||||
attackPower = base + pos - neg
|
||||
effArmor = select(2, UnitArmor("player"))
|
||||
if UnitExists("target") then
|
||||
local tlevel = UnitLevel("target")
|
||||
if tlevel < 60 then
|
||||
armorPercent = (effArmor / ((85 * tlevel) + effArmor + 400)) * 100
|
||||
elseif tlevel >= 60 then
|
||||
armorPercent = (effArmor / ((467.5 * tlevel) + effArmor - 22167.5)) * 100
|
||||
end
|
||||
end
|
||||
|
||||
-- BUFFS %d%d (5 + 2 + 1 = 8 + 4)
|
||||
aura_env.output = aura_env.output .. noBuffs
|
||||
while string.len(aura_env.output) < 12 do
|
||||
aura_env.output = aura_env.output .. " "
|
||||
end
|
||||
-- BUFFS %d%d<4>HIT %d%d.%d (12 + 3 + 1 + 4 = 20 + 4)
|
||||
aura_env.output = aura_env.output .. "HIT " .. math.ceil((hitPercent * 10)) / 10 .. "%"
|
||||
while string.len(aura_env.output) < 24 do
|
||||
aura_env.output = aura_env.output .. " "
|
||||
end
|
||||
-- BUFFS %d%d<4>HIT %d%d.%d<4>CRIT %d%d.%d (24 + 4 + 1 + 4 = 33 + 4)
|
||||
aura_env.output = aura_env.output .. "CRIT " .. math.ceil((critPercent * 10)) / 10 .. "%"
|
||||
while string.len(aura_env.output) < 37 do
|
||||
aura_env.output = aura_env.output .. " "
|
||||
end
|
||||
-- BUFFS %d%d<4>HIT %d%d.%d<4>CRIT %d%d.%d<4>AP %d+
|
||||
-- APPEND AP
|
||||
-- 37 + 3 + 8 = 48
|
||||
aura_env.output = aura_env.output .. "AP " .. attackPower
|
||||
while string.len(aura_env.output) < 48 do
|
||||
aura_env.output = aura_env.output .. " "
|
||||
end
|
||||
aura_env.output = aura_env.output .. "A " .. effArmor .. " " .. math.ceil((armorPercent * 10)) / 10 .. "%"
|
||||
end
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local subevents = {
|
||||
["SPELL_AURA_APPLIED"] = true,
|
||||
["SPELL_AURA_APPLIED_DOSE"] = true,
|
||||
["SPELL_AURA_REMOVED"] = true,
|
||||
["SPELL_AURA_REMOVED_DOSE"] = true,
|
||||
["SPELL_AURA_REFRESH"] = true,
|
||||
}
|
||||
if subevents[se] then
|
||||
local target = select(9, ...)
|
||||
if target == UnitName("player") then
|
||||
updateStats()
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "UNIT_STATS" or e == "PLAYER_TARGET_CHANGED" then
|
||||
updateStats()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.output or ""
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.output = ""
|
||||
WeakAuras.ScanEvents("UNIT_STATS")
|
||||
@@ -1,81 +1,81 @@
|
||||
--UNIT_HEALTH UNIT_AURA PLAYER_REGEN_DISABLED
|
||||
function(e, u)
|
||||
if e == "PLAYER_REGEN_DISABLED" then
|
||||
aura_env.lowppl = 0
|
||||
aura_env.renw = 0
|
||||
elseif e == "UNIT_AURA" then
|
||||
if u == "player" then
|
||||
local i = 1
|
||||
while UnitBuff(u, i) do
|
||||
local name = UnitBuff(u, i)
|
||||
if name == "Mana Tea" then
|
||||
aura_env.manaTea = true
|
||||
break
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
elseif u:match("raid") then
|
||||
if not aura_env.people[u] then aura_env.people[u] = {} end
|
||||
aura_env.people[u].buff = false
|
||||
local i = 1
|
||||
while UnitBuff(u, i) do
|
||||
local caster = select(8, UnitBuff(u, i))
|
||||
local name = UnitBuff(u, i)
|
||||
if name == "Renewing Mist" and caster == "player" then
|
||||
aura_env.people[u].buff = true
|
||||
break
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
aura_env.renw = 0
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v.buff == true then
|
||||
aura_env.renw = aura_env.renw + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
elseif e == "UNIT_HEALTH" then
|
||||
if u:match("raid") then
|
||||
if not aura_env.people[u] then aura_env.people[u] = {} end
|
||||
aura_env.people[u].hp = UnitHealth(u)
|
||||
aura_env.people[u].mhp = UnitHealthMax(u)
|
||||
aura_env.people[u].php = UnitHealth(u) / UnitHealthMax(u)
|
||||
if aura_env.people[u].php < aura_env.config.low then
|
||||
aura_env.people[u].low = true
|
||||
else
|
||||
aura_env.people[u].low = false
|
||||
end
|
||||
end
|
||||
aura_env.lowppl = 0
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v.low == true then
|
||||
aura_env.lowppl = aura_env.lowppl + 1
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--ICON
|
||||
function()
|
||||
if aura_env.manaTea == true then
|
||||
return 1360980
|
||||
elseif aura_env.lowppl < 6 or aura_env.renw >= 5 then
|
||||
return 1360980
|
||||
elseif aura_env.lowppl >= 6 and aura_env.renw < 5 then
|
||||
return 1360978
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return format("Renewing mists active: %d\nPeople on low health: %d", aura_env.renw, aura_env.lowppl)
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.manaTea = false
|
||||
aura_env.lowppl = 0
|
||||
aura_env.renw = 0
|
||||
--UNIT_HEALTH UNIT_AURA PLAYER_REGEN_DISABLED
|
||||
function(e, u)
|
||||
if e == "PLAYER_REGEN_DISABLED" then
|
||||
aura_env.lowppl = 0
|
||||
aura_env.renw = 0
|
||||
elseif e == "UNIT_AURA" then
|
||||
if u == "player" then
|
||||
local i = 1
|
||||
while UnitBuff(u, i) do
|
||||
local name = UnitBuff(u, i)
|
||||
if name == "Mana Tea" then
|
||||
aura_env.manaTea = true
|
||||
break
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
elseif u:match("raid") then
|
||||
if not aura_env.people[u] then aura_env.people[u] = {} end
|
||||
aura_env.people[u].buff = false
|
||||
local i = 1
|
||||
while UnitBuff(u, i) do
|
||||
local caster = select(8, UnitBuff(u, i))
|
||||
local name = UnitBuff(u, i)
|
||||
if name == "Renewing Mist" and caster == "player" then
|
||||
aura_env.people[u].buff = true
|
||||
break
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
aura_env.renw = 0
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v.buff == true then
|
||||
aura_env.renw = aura_env.renw + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
elseif e == "UNIT_HEALTH" then
|
||||
if u:match("raid") then
|
||||
if not aura_env.people[u] then aura_env.people[u] = {} end
|
||||
aura_env.people[u].hp = UnitHealth(u)
|
||||
aura_env.people[u].mhp = UnitHealthMax(u)
|
||||
aura_env.people[u].php = UnitHealth(u) / UnitHealthMax(u)
|
||||
if aura_env.people[u].php < aura_env.config.low then
|
||||
aura_env.people[u].low = true
|
||||
else
|
||||
aura_env.people[u].low = false
|
||||
end
|
||||
end
|
||||
aura_env.lowppl = 0
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v.low == true then
|
||||
aura_env.lowppl = aura_env.lowppl + 1
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--ICON
|
||||
function()
|
||||
if aura_env.manaTea == true then
|
||||
return 1360980
|
||||
elseif aura_env.lowppl < 6 or aura_env.renw >= 5 then
|
||||
return 1360980
|
||||
elseif aura_env.lowppl >= 6 and aura_env.renw < 5 then
|
||||
return 1360978
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return format("Renewing mists active: %d\nPeople on low health: %d", aura_env.renw, aura_env.lowppl)
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.manaTea = false
|
||||
aura_env.lowppl = 0
|
||||
aura_env.renw = 0
|
||||
aura_env.people = {}
|
||||
@@ -1,54 +1,54 @@
|
||||
--CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_CHANNEL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS
|
||||
function(e, msg, sender, ...)
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {} end
|
||||
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" or e == "CHAT_MSG_CHANNEL" then
|
||||
local class = select(2, GetPlayerInfoByGUID(select(10, ...)))
|
||||
if msg and aura_env.toggle == 1 then
|
||||
msg = msg:lower()
|
||||
local noRealmSender = sender:match("(.+)-%w+")
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
if msg:match(k) then
|
||||
local st, en = msg:find(k)
|
||||
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then
|
||||
InviteUnit(sender)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "TOGGLE_MAGUS" then
|
||||
if aura_env.toggle == 0 then
|
||||
print("Toggling script on")
|
||||
aura_env.toggle = 1
|
||||
else
|
||||
print("Toggling script off")
|
||||
aura_env.toggle = 0
|
||||
end
|
||||
elseif e == "ADD_KEYWORD" then
|
||||
if msg then
|
||||
print("Adding", msg)
|
||||
msg = msg:lower()
|
||||
WeakAurasSaved.MagusKeywords[msg] = 1
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
elseif e == "LIST_KEYWORDS" then
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
print(k)
|
||||
end
|
||||
elseif e == "REMOVE_KEYWORD" then
|
||||
if msg then
|
||||
if WeakAurasSaved.MagusKeywords[msg] then
|
||||
print("Removing", msg)
|
||||
WeakAurasSaved.MagusKeywords[msg] = nil
|
||||
else
|
||||
print(msg, "does not exist in the keyword table")
|
||||
end
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.toggle = 0
|
||||
--CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_CHANNEL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS
|
||||
function(e, msg, sender, ...)
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {} end
|
||||
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" or e == "CHAT_MSG_CHANNEL" then
|
||||
local class = select(2, GetPlayerInfoByGUID(select(10, ...)))
|
||||
if msg and aura_env.toggle == 1 then
|
||||
msg = msg:lower()
|
||||
local noRealmSender = sender:match("(.+)-%w+")
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
if msg:match(k) then
|
||||
local st, en = msg:find(k)
|
||||
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then
|
||||
InviteUnit(sender)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "TOGGLE_MAGUS" then
|
||||
if aura_env.toggle == 0 then
|
||||
print("Toggling script on")
|
||||
aura_env.toggle = 1
|
||||
else
|
||||
print("Toggling script off")
|
||||
aura_env.toggle = 0
|
||||
end
|
||||
elseif e == "ADD_KEYWORD" then
|
||||
if msg then
|
||||
print("Adding", msg)
|
||||
msg = msg:lower()
|
||||
WeakAurasSaved.MagusKeywords[msg] = 1
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
elseif e == "LIST_KEYWORDS" then
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
print(k)
|
||||
end
|
||||
elseif e == "REMOVE_KEYWORD" then
|
||||
if msg then
|
||||
if WeakAurasSaved.MagusKeywords[msg] then
|
||||
print("Removing", msg)
|
||||
WeakAurasSaved.MagusKeywords[msg] = nil
|
||||
else
|
||||
print(msg, "does not exist in the keyword table")
|
||||
end
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.toggle = 0
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {} end
|
||||
@@ -1,12 +1,12 @@
|
||||
--GOSSIP_SHOW UPDATE_BATTLEFIELD_STATUS
|
||||
function(e, ...)
|
||||
if e == "GOSSIP_SHOW" then
|
||||
local target = UnitName("target")
|
||||
if target:match("Grizzle Halfmane") or target:match("Kartra Bloodsnarl") or target:match("Glordrum Steelbeard") or target:match("Thelman Slatefist") or target:match(" Taim Ragetotem") or target:match("Brogun Stoneshield") or target:match("Innkeeper Gryshka") then
|
||||
GossipTitleButton1:Click()
|
||||
BattlefieldFrameJoinButton:Click()
|
||||
end
|
||||
elseif e == "UPDATE_BATTLEFIELD_STATUS" then
|
||||
StaticPopup1Button1:Click()
|
||||
end
|
||||
--GOSSIP_SHOW UPDATE_BATTLEFIELD_STATUS
|
||||
function(e, ...)
|
||||
if e == "GOSSIP_SHOW" then
|
||||
local target = UnitName("target")
|
||||
if target:match("Grizzle Halfmane") or target:match("Kartra Bloodsnarl") or target:match("Glordrum Steelbeard") or target:match("Thelman Slatefist") or target:match(" Taim Ragetotem") or target:match("Brogun Stoneshield") or target:match("Innkeeper Gryshka") then
|
||||
GossipTitleButton1:Click()
|
||||
BattlefieldFrameJoinButton:Click()
|
||||
end
|
||||
elseif e == "UPDATE_BATTLEFIELD_STATUS" then
|
||||
StaticPopup1Button1:Click()
|
||||
end
|
||||
end
|
||||
@@ -1,277 +1,277 @@
|
||||
--CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS CHAT_MSG_SYSTEM COMBAT_LOG_EVENT_UNFILTERED TRADE_SHOW TRADE_MONEY_CHANGED PLAYER_TRADE_MONEY TRADE_ACCEPT_UPDATE TRADE_CLOSED
|
||||
function(e, msg, sender, ...)
|
||||
local function updateText()
|
||||
local texts = {[1] = {}, [2] = {}, [3] = {}, [4] = {}}
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v.state == 5 then
|
||||
if v.kw == "uc" or v.kw == "under" or v.kw == "undercity" then
|
||||
texts[1][#texts[1] + 1] = k
|
||||
elseif v.kw == "org" or v.kw == "og" or v.kw == "orgrimmar" then
|
||||
texts[2][#texts[2] + 1] = k
|
||||
elseif v.kw == "tb" or v.kw == "thunder" or v.kw == "thunderbluff" then
|
||||
texts[3][#texts[3] + 1] = k
|
||||
elseif v.kw == "test" then
|
||||
texts[4][#texts[4] + 1] = k
|
||||
end
|
||||
end
|
||||
end
|
||||
for k,v in pairs(texts) do
|
||||
local text = ""
|
||||
for k2,v2 in pairs(v) do
|
||||
text = text .. v2 .. "\n"
|
||||
end
|
||||
WeakAurasSaved.MagusKeywords.buttons[k].text:SetText(text)
|
||||
end
|
||||
end
|
||||
|
||||
local aura_env = aura_env
|
||||
if not aura_env.toggle then aura_env.toggle = 1 end
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
|
||||
["port"] = 1,
|
||||
["portal"] = 1,
|
||||
["org"] = 1,
|
||||
["og"] = 1,
|
||||
["uc"] = 1,
|
||||
["under"] = 1,
|
||||
["thunder"] = 1,
|
||||
["tb"] = 1,
|
||||
["wtb"] = 1,
|
||||
["test"] = 1,
|
||||
} end
|
||||
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then
|
||||
local class = select(2, GetPlayerInfoByGUID(select(10, ...)))
|
||||
if msg and aura_env.toggle == 1 then
|
||||
msg = msg:lower()
|
||||
local noRealmSender = sender:match("(.+)-?%w*") or sender
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
if msg:match(k) then
|
||||
local st, en = msg:find(k)
|
||||
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then
|
||||
InviteUnit(sender)
|
||||
if not aura_env.people[noRealmSender] then aura_env.people[noRealmSender] = {["state"] = 0, ["kw"] = k} end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "CHAT_MSG_SYSTEM" then
|
||||
if msg:match("You have invited") then
|
||||
local sender = msg:match("You have invited (.+) to join your group")
|
||||
local noRealmSender = sender:match("(.+)-%w+") or sender
|
||||
if aura_env.people[noRealmSender] then
|
||||
aura_env.people[noRealmSender].state = 0
|
||||
end
|
||||
elseif msg:match("joins the party") then
|
||||
local sender = msg:match("(.+) joins the party")
|
||||
local noRealmSender = sender:match("(.+)-%w+") or sender
|
||||
if aura_env.people[noRealmSender] and aura_env.people[noRealmSender].state == 0 then
|
||||
aura_env.people[noRealmSender].state = 1
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
if UnitName("party" .. i) == sender then
|
||||
aura_env.people[noRealmSender].unitID = "party" .. i
|
||||
break
|
||||
end
|
||||
end
|
||||
--If not tradeable create ticker and do other stuff
|
||||
if CheckInteractDistance(aura_env.people[noRealmSender].unitID, 2) then
|
||||
InitiateTrade(aura_env.people[noRealmSender].unitID)
|
||||
aura_env.people[noRealmSender].state = 2
|
||||
end
|
||||
end
|
||||
elseif msg:match("leaves the party") then
|
||||
local sender = msg:match("(.+) leaves the party")
|
||||
local noRealmSender = sender:match("(.+)-%w+") or sender
|
||||
if aura_env.people[noRealmSender] and aura_env[noRealmSender].state == 6 then
|
||||
aura_env.people[noRealmSender] = nil
|
||||
end
|
||||
end
|
||||
elseif e == "TRADE_SHOW" then
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v.state == 2 then
|
||||
aura_env.isTrade = true
|
||||
aura_env.tradee = k
|
||||
aura_env.people[k].state = 3
|
||||
end
|
||||
end
|
||||
elseif e == "TRADE_ACCEPT_UPDATE" then
|
||||
if msg == 1 and sender == 1 then
|
||||
if aura_env.isTrade == true then
|
||||
aura_env.people[aura_env.tradee].state = 4
|
||||
if aura_env.people[aura_env.tradee].kw == "uc" or aura_env.people[aura_env.tradee].kw == "under" or aura_env.people[aura_env.tradee].kw == "undercity" then
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[3])
|
||||
aura_env.castQueue["Portal: Undercity"] = true
|
||||
aura_env.people[aura_env.tradee]["Portal: Undercity"] = true
|
||||
aura_env.people[aura_env.tradee].state = 5
|
||||
elseif aura_env.people[aura_env.tradee].kw == "org" or aura_env.people[aura_env.tradee].kw == "og" or aura_env.people[aura_env.tradee].kw == "orgrimmar" then
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[2])
|
||||
aura_env.castQueue["Portal: Orgrimmar"] = true
|
||||
aura_env.people[aura_env.tradee]["Portal: Orgrimmar"] = true
|
||||
aura_env.people[aura_env.tradee].state = 5
|
||||
elseif aura_env.people[aura_env.tradee].kw == "tb" or aura_env.people[aura_env.tradee].kw == "thunder" or aura_env.people[aura_env.tradee].kw == "thunderbluff" then
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[1])
|
||||
aura_env.castQueue["Portal: Thunder Bluff"] = true
|
||||
aura_env.people[aura_env.tradee]["Portal: Thunder Bluff"] = true
|
||||
aura_env.people[aura_env.tradee].state = 5
|
||||
elseif aura_env.people[aura_env.tradee].kw == "test" then
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[4])
|
||||
aura_env.castQueue["Consecration"] = true
|
||||
aura_env.people[aura_env.tradee]["Consecration"] = true
|
||||
aura_env.people[aura_env.tradee].state = 5
|
||||
end
|
||||
aura_env.isTrade = false
|
||||
aura_env.tradee = ""
|
||||
updateText()
|
||||
end
|
||||
end
|
||||
elseif e == "TRADE_CLOSED" then
|
||||
if aura_env.isTrade == true then
|
||||
aura_env.people[aura_env.tradee].state = 2
|
||||
aura_env.isTrade = false
|
||||
aura_env.tradee = ""
|
||||
end
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = sender
|
||||
local caster = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" and caster == UnitName("player") then
|
||||
local spell = select(11, ...)
|
||||
if aura_env.castQueue[spell] == true then aura_env.castQueue[spell] = false end
|
||||
if spell == "Portal: Undercity" then
|
||||
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[3])
|
||||
elseif spell == "Portal: Orgrimmar" then
|
||||
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[2])
|
||||
elseif spell == "Portal: Thunder Bluff" then
|
||||
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[1])
|
||||
elseif spell == "Consecration" then
|
||||
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[4])
|
||||
end
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v[spell] and v.state == 5 then
|
||||
v[spell] = false
|
||||
aura_env.people[k] = nil
|
||||
updateText()
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "TOGGLE_MAGUS" then
|
||||
if aura_env.toggle == 0 then
|
||||
print("Toggling script on")
|
||||
aura_env.toggle = 1
|
||||
for i = 1, 3 do
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:Show()
|
||||
end
|
||||
else
|
||||
print("Toggling script off")
|
||||
aura_env.toggle = 0
|
||||
for i = 1, 3 do
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:Hide()
|
||||
end
|
||||
end
|
||||
elseif e == "ADD_KEYWORD" then
|
||||
if msg then
|
||||
print("Adding", msg)
|
||||
msg = msg:lower()
|
||||
WeakAurasSaved.MagusKeywords[msg] = 1
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
elseif e == "LIST_KEYWORDS" then
|
||||
local test = ""
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
print(k)
|
||||
test = test .. k .. "\n"
|
||||
end
|
||||
message(test)
|
||||
elseif e == "REMOVE_KEYWORD" then
|
||||
if msg then
|
||||
if WeakAurasSaved.MagusKeywords[msg] then
|
||||
print("Removing", msg)
|
||||
WeakAurasSaved.MagusKeywords[msg] = nil
|
||||
else
|
||||
print(msg, "does not exist in the keyword table")
|
||||
end
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not aura_env.toggle then aura_env.toggle = 1 end
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
|
||||
["port"] = 1,
|
||||
["portal"] = 1,
|
||||
["org"] = 1,
|
||||
["og"] = 1,
|
||||
["uc"] = 1,
|
||||
["under"] = 1,
|
||||
["thunder"] = 1,
|
||||
["tb"] = 1,
|
||||
["wtb"] = 1,
|
||||
} end
|
||||
|
||||
--[[
|
||||
Player state table
|
||||
0 - invited
|
||||
1 - joined
|
||||
2 - trade queue
|
||||
3 - trading
|
||||
4 - trade complete
|
||||
5 - light up portal
|
||||
6 - portal cast
|
||||
7 - left? clean table
|
||||
|
||||
Cancel everything if person leave
|
||||
]]
|
||||
aura_env.people = {}
|
||||
aura_env.castQueue = {}
|
||||
aura_env.isTrade = false
|
||||
aura_env.tradee = ""
|
||||
|
||||
--[[local function hideButon(self)
|
||||
ActionButton_HideOverlayGlow(self)
|
||||
end--]]
|
||||
|
||||
if not WeakAurasSaved.MagusKeywords.buttons or not WeakAurasSaved.MagusKeywords.buttons[1][0] then WeakAurasSaved.MagusKeywords.buttons = {
|
||||
[1] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
|
||||
[2] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
|
||||
[3] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
|
||||
[4] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
|
||||
} end
|
||||
|
||||
for i = 1, 4 do
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:SetAttribute("type", "macro")
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:SetSize(aura_env.config.size, aura_env.config.size)
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:SetPoint("CENTER", aura_env.region, "CENTER", (i - 1) * aura_env.config.size, 0)
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:RegisterForClicks("LeftButtonDown")
|
||||
--WeakAurasSaved.MagusKeywords.buttons[i]:SetScript("PreClick", hideButon)
|
||||
WeakAurasSaved.MagusKeywords.buttons[i].text = WeakAurasSaved.MagusKeywords.buttons[i]:CreateFontString("text", "ARTWORK")
|
||||
WeakAurasSaved.MagusKeywords.buttons[i].text:SetFont("Fonts\\FRIZQT__.TTF", 14, "OUTLINE, MONOCHROME")
|
||||
WeakAurasSaved.MagusKeywords.buttons[i].text:SetPoint("CENTER", WeakAurasSaved.MagusKeywords.buttons[i], "CENTER", 0, -aura_env.config.size / 2 - 14)
|
||||
WeakAurasSaved.MagusKeywords.buttons[i].text:Show()
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:Show()
|
||||
end
|
||||
|
||||
WeakAurasSaved.MagusKeywords.buttons[1]:SetNormalTexture(135750)
|
||||
WeakAurasSaved.MagusKeywords.buttons[1]:SetAttribute("macrotext", format("/cast Portal: Thunder Bluff"))
|
||||
WeakAurasSaved.MagusKeywords.buttons[2]:SetNormalTexture(135744)
|
||||
WeakAurasSaved.MagusKeywords.buttons[2]:SetAttribute("macrotext", format("/cast Portal: Orgrimmar"))
|
||||
WeakAurasSaved.MagusKeywords.buttons[3]:SetNormalTexture(135751)
|
||||
WeakAurasSaved.MagusKeywords.buttons[3]:SetAttribute("macrotext", format("/cast Portal: Undercity"))
|
||||
WeakAurasSaved.MagusKeywords.buttons[4]:SetNormalTexture(135926)
|
||||
WeakAurasSaved.MagusKeywords.buttons[4]:SetAttribute("macrotext", format("/cast Consecration"))
|
||||
|
||||
aura_env.printTable = function(table, n)
|
||||
if not n then n = 0 end
|
||||
for k,v in pairs(table) do
|
||||
local printText = ""
|
||||
for i = 1, n do
|
||||
printText = printText .. " "
|
||||
end
|
||||
printText = printText .. "[" .. k .. "] = " .. tostring(v)
|
||||
print(printText)
|
||||
if type(v) == "table" then
|
||||
n = n + 1
|
||||
aura_env.printTable(v, n)
|
||||
end
|
||||
end
|
||||
--CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS CHAT_MSG_SYSTEM COMBAT_LOG_EVENT_UNFILTERED TRADE_SHOW TRADE_MONEY_CHANGED PLAYER_TRADE_MONEY TRADE_ACCEPT_UPDATE TRADE_CLOSED
|
||||
function(e, msg, sender, ...)
|
||||
local function updateText()
|
||||
local texts = {[1] = {}, [2] = {}, [3] = {}, [4] = {}}
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v.state == 5 then
|
||||
if v.kw == "uc" or v.kw == "under" or v.kw == "undercity" then
|
||||
texts[1][#texts[1] + 1] = k
|
||||
elseif v.kw == "org" or v.kw == "og" or v.kw == "orgrimmar" then
|
||||
texts[2][#texts[2] + 1] = k
|
||||
elseif v.kw == "tb" or v.kw == "thunder" or v.kw == "thunderbluff" then
|
||||
texts[3][#texts[3] + 1] = k
|
||||
elseif v.kw == "test" then
|
||||
texts[4][#texts[4] + 1] = k
|
||||
end
|
||||
end
|
||||
end
|
||||
for k,v in pairs(texts) do
|
||||
local text = ""
|
||||
for k2,v2 in pairs(v) do
|
||||
text = text .. v2 .. "\n"
|
||||
end
|
||||
WeakAurasSaved.MagusKeywords.buttons[k].text:SetText(text)
|
||||
end
|
||||
end
|
||||
|
||||
local aura_env = aura_env
|
||||
if not aura_env.toggle then aura_env.toggle = 1 end
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
|
||||
["port"] = 1,
|
||||
["portal"] = 1,
|
||||
["org"] = 1,
|
||||
["og"] = 1,
|
||||
["uc"] = 1,
|
||||
["under"] = 1,
|
||||
["thunder"] = 1,
|
||||
["tb"] = 1,
|
||||
["wtb"] = 1,
|
||||
["test"] = 1,
|
||||
} end
|
||||
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then
|
||||
local class = select(2, GetPlayerInfoByGUID(select(10, ...)))
|
||||
if msg and aura_env.toggle == 1 then
|
||||
msg = msg:lower()
|
||||
local noRealmSender = sender:match("(.+)-?%w*") or sender
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
if msg:match(k) then
|
||||
local st, en = msg:find(k)
|
||||
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then
|
||||
InviteUnit(sender)
|
||||
if not aura_env.people[noRealmSender] then aura_env.people[noRealmSender] = {["state"] = 0, ["kw"] = k} end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "CHAT_MSG_SYSTEM" then
|
||||
if msg:match("You have invited") then
|
||||
local sender = msg:match("You have invited (.+) to join your group")
|
||||
local noRealmSender = sender:match("(.+)-%w+") or sender
|
||||
if aura_env.people[noRealmSender] then
|
||||
aura_env.people[noRealmSender].state = 0
|
||||
end
|
||||
elseif msg:match("joins the party") then
|
||||
local sender = msg:match("(.+) joins the party")
|
||||
local noRealmSender = sender:match("(.+)-%w+") or sender
|
||||
if aura_env.people[noRealmSender] and aura_env.people[noRealmSender].state == 0 then
|
||||
aura_env.people[noRealmSender].state = 1
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
if UnitName("party" .. i) == sender then
|
||||
aura_env.people[noRealmSender].unitID = "party" .. i
|
||||
break
|
||||
end
|
||||
end
|
||||
--If not tradeable create ticker and do other stuff
|
||||
if CheckInteractDistance(aura_env.people[noRealmSender].unitID, 2) then
|
||||
InitiateTrade(aura_env.people[noRealmSender].unitID)
|
||||
aura_env.people[noRealmSender].state = 2
|
||||
end
|
||||
end
|
||||
elseif msg:match("leaves the party") then
|
||||
local sender = msg:match("(.+) leaves the party")
|
||||
local noRealmSender = sender:match("(.+)-%w+") or sender
|
||||
if aura_env.people[noRealmSender] and aura_env[noRealmSender].state == 6 then
|
||||
aura_env.people[noRealmSender] = nil
|
||||
end
|
||||
end
|
||||
elseif e == "TRADE_SHOW" then
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v.state == 2 then
|
||||
aura_env.isTrade = true
|
||||
aura_env.tradee = k
|
||||
aura_env.people[k].state = 3
|
||||
end
|
||||
end
|
||||
elseif e == "TRADE_ACCEPT_UPDATE" then
|
||||
if msg == 1 and sender == 1 then
|
||||
if aura_env.isTrade == true then
|
||||
aura_env.people[aura_env.tradee].state = 4
|
||||
if aura_env.people[aura_env.tradee].kw == "uc" or aura_env.people[aura_env.tradee].kw == "under" or aura_env.people[aura_env.tradee].kw == "undercity" then
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[3])
|
||||
aura_env.castQueue["Portal: Undercity"] = true
|
||||
aura_env.people[aura_env.tradee]["Portal: Undercity"] = true
|
||||
aura_env.people[aura_env.tradee].state = 5
|
||||
elseif aura_env.people[aura_env.tradee].kw == "org" or aura_env.people[aura_env.tradee].kw == "og" or aura_env.people[aura_env.tradee].kw == "orgrimmar" then
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[2])
|
||||
aura_env.castQueue["Portal: Orgrimmar"] = true
|
||||
aura_env.people[aura_env.tradee]["Portal: Orgrimmar"] = true
|
||||
aura_env.people[aura_env.tradee].state = 5
|
||||
elseif aura_env.people[aura_env.tradee].kw == "tb" or aura_env.people[aura_env.tradee].kw == "thunder" or aura_env.people[aura_env.tradee].kw == "thunderbluff" then
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[1])
|
||||
aura_env.castQueue["Portal: Thunder Bluff"] = true
|
||||
aura_env.people[aura_env.tradee]["Portal: Thunder Bluff"] = true
|
||||
aura_env.people[aura_env.tradee].state = 5
|
||||
elseif aura_env.people[aura_env.tradee].kw == "test" then
|
||||
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[4])
|
||||
aura_env.castQueue["Consecration"] = true
|
||||
aura_env.people[aura_env.tradee]["Consecration"] = true
|
||||
aura_env.people[aura_env.tradee].state = 5
|
||||
end
|
||||
aura_env.isTrade = false
|
||||
aura_env.tradee = ""
|
||||
updateText()
|
||||
end
|
||||
end
|
||||
elseif e == "TRADE_CLOSED" then
|
||||
if aura_env.isTrade == true then
|
||||
aura_env.people[aura_env.tradee].state = 2
|
||||
aura_env.isTrade = false
|
||||
aura_env.tradee = ""
|
||||
end
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = sender
|
||||
local caster = select(3, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" and caster == UnitName("player") then
|
||||
local spell = select(11, ...)
|
||||
if aura_env.castQueue[spell] == true then aura_env.castQueue[spell] = false end
|
||||
if spell == "Portal: Undercity" then
|
||||
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[3])
|
||||
elseif spell == "Portal: Orgrimmar" then
|
||||
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[2])
|
||||
elseif spell == "Portal: Thunder Bluff" then
|
||||
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[1])
|
||||
elseif spell == "Consecration" then
|
||||
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[4])
|
||||
end
|
||||
for k,v in pairs(aura_env.people) do
|
||||
if v[spell] and v.state == 5 then
|
||||
v[spell] = false
|
||||
aura_env.people[k] = nil
|
||||
updateText()
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "TOGGLE_MAGUS" then
|
||||
if aura_env.toggle == 0 then
|
||||
print("Toggling script on")
|
||||
aura_env.toggle = 1
|
||||
for i = 1, 3 do
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:Show()
|
||||
end
|
||||
else
|
||||
print("Toggling script off")
|
||||
aura_env.toggle = 0
|
||||
for i = 1, 3 do
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:Hide()
|
||||
end
|
||||
end
|
||||
elseif e == "ADD_KEYWORD" then
|
||||
if msg then
|
||||
print("Adding", msg)
|
||||
msg = msg:lower()
|
||||
WeakAurasSaved.MagusKeywords[msg] = 1
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
elseif e == "LIST_KEYWORDS" then
|
||||
local test = ""
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
print(k)
|
||||
test = test .. k .. "\n"
|
||||
end
|
||||
message(test)
|
||||
elseif e == "REMOVE_KEYWORD" then
|
||||
if msg then
|
||||
if WeakAurasSaved.MagusKeywords[msg] then
|
||||
print("Removing", msg)
|
||||
WeakAurasSaved.MagusKeywords[msg] = nil
|
||||
else
|
||||
print(msg, "does not exist in the keyword table")
|
||||
end
|
||||
else
|
||||
print("No keyword provided")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not aura_env.toggle then aura_env.toggle = 1 end
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
|
||||
["port"] = 1,
|
||||
["portal"] = 1,
|
||||
["org"] = 1,
|
||||
["og"] = 1,
|
||||
["uc"] = 1,
|
||||
["under"] = 1,
|
||||
["thunder"] = 1,
|
||||
["tb"] = 1,
|
||||
["wtb"] = 1,
|
||||
} end
|
||||
|
||||
--[[
|
||||
Player state table
|
||||
0 - invited
|
||||
1 - joined
|
||||
2 - trade queue
|
||||
3 - trading
|
||||
4 - trade complete
|
||||
5 - light up portal
|
||||
6 - portal cast
|
||||
7 - left? clean table
|
||||
|
||||
Cancel everything if person leave
|
||||
]]
|
||||
aura_env.people = {}
|
||||
aura_env.castQueue = {}
|
||||
aura_env.isTrade = false
|
||||
aura_env.tradee = ""
|
||||
|
||||
--[[local function hideButon(self)
|
||||
ActionButton_HideOverlayGlow(self)
|
||||
end--]]
|
||||
|
||||
if not WeakAurasSaved.MagusKeywords.buttons or not WeakAurasSaved.MagusKeywords.buttons[1][0] then WeakAurasSaved.MagusKeywords.buttons = {
|
||||
[1] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
|
||||
[2] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
|
||||
[3] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
|
||||
[4] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
|
||||
} end
|
||||
|
||||
for i = 1, 4 do
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:SetAttribute("type", "macro")
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:SetSize(aura_env.config.size, aura_env.config.size)
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:SetPoint("CENTER", aura_env.region, "CENTER", (i - 1) * aura_env.config.size, 0)
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:RegisterForClicks("LeftButtonDown")
|
||||
--WeakAurasSaved.MagusKeywords.buttons[i]:SetScript("PreClick", hideButon)
|
||||
WeakAurasSaved.MagusKeywords.buttons[i].text = WeakAurasSaved.MagusKeywords.buttons[i]:CreateFontString("text", "ARTWORK")
|
||||
WeakAurasSaved.MagusKeywords.buttons[i].text:SetFont("Fonts\\FRIZQT__.TTF", 14, "OUTLINE, MONOCHROME")
|
||||
WeakAurasSaved.MagusKeywords.buttons[i].text:SetPoint("CENTER", WeakAurasSaved.MagusKeywords.buttons[i], "CENTER", 0, -aura_env.config.size / 2 - 14)
|
||||
WeakAurasSaved.MagusKeywords.buttons[i].text:Show()
|
||||
WeakAurasSaved.MagusKeywords.buttons[i]:Show()
|
||||
end
|
||||
|
||||
WeakAurasSaved.MagusKeywords.buttons[1]:SetNormalTexture(135750)
|
||||
WeakAurasSaved.MagusKeywords.buttons[1]:SetAttribute("macrotext", format("/cast Portal: Thunder Bluff"))
|
||||
WeakAurasSaved.MagusKeywords.buttons[2]:SetNormalTexture(135744)
|
||||
WeakAurasSaved.MagusKeywords.buttons[2]:SetAttribute("macrotext", format("/cast Portal: Orgrimmar"))
|
||||
WeakAurasSaved.MagusKeywords.buttons[3]:SetNormalTexture(135751)
|
||||
WeakAurasSaved.MagusKeywords.buttons[3]:SetAttribute("macrotext", format("/cast Portal: Undercity"))
|
||||
WeakAurasSaved.MagusKeywords.buttons[4]:SetNormalTexture(135926)
|
||||
WeakAurasSaved.MagusKeywords.buttons[4]:SetAttribute("macrotext", format("/cast Consecration"))
|
||||
|
||||
aura_env.printTable = function(table, n)
|
||||
if not n then n = 0 end
|
||||
for k,v in pairs(table) do
|
||||
local printText = ""
|
||||
for i = 1, n do
|
||||
printText = printText .. " "
|
||||
end
|
||||
printText = printText .. "[" .. k .. "] = " .. tostring(v)
|
||||
print(printText)
|
||||
if type(v) == "table" then
|
||||
n = n + 1
|
||||
aura_env.printTable(v, n)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,234 +1,234 @@
|
||||
--GROUP_ROSTER_UPDATE INSPECT_READY
|
||||
function(e)
|
||||
if e == "GROUP_ROSTER_UPDATE" then
|
||||
for i = 1, 40 do
|
||||
local u = "raid" .. i
|
||||
if UnitExists(u) and not UnitIsUnit(u, "player") then
|
||||
if not aura_env.data[u] then
|
||||
aura_env.data[u] = {
|
||||
["name"] = UnitName(u),
|
||||
["class"] = select(3, UnitClass(u)),
|
||||
["neckilvl"] = 0,
|
||||
["backilvl"] = 0,
|
||||
["corruption"] = 0,
|
||||
["inspectQueue"] = false,
|
||||
["inspected"] = false
|
||||
}
|
||||
end
|
||||
if aura_env.data[u] then
|
||||
if aura_env.data[u].name ~= UnitName(u) then
|
||||
aura_env.data[u] = {
|
||||
["name"] = UnitName(u),
|
||||
["class"] = select(3, UnitClass(u)),
|
||||
["neckilvl"] = 0,
|
||||
["backilvl"] = 0,
|
||||
["corruption"] = 0,
|
||||
["inspectQueue"] = false,
|
||||
["inspected"] = false
|
||||
}
|
||||
end
|
||||
end
|
||||
elseif not UnitExists(u) and aura_env.data[u] then
|
||||
if aura_env.data[u] then
|
||||
aura_env.data[u] = nil
|
||||
end
|
||||
for k,v in pairs(aura_env.inspectQueue) do
|
||||
if v == u then
|
||||
table.remove(aura_env.inspectQueue, k)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "INSPECT_READY" then
|
||||
if aura_env.notifyInspect ~= false and aura_env.inspecting == false then
|
||||
InspectUnit(aura_env.notifyInspect)
|
||||
aura_env.inspecting = true
|
||||
elseif aura_env.notifyInspect ~= false and aura_env.inspecting == true then
|
||||
for i = 1, 17 do
|
||||
local link = GetInventoryItemLink(aura_env.notifyInspect, i) or 0
|
||||
if link ~= 0 then
|
||||
local stats = {}
|
||||
GetItemStats(link, stats)
|
||||
local rarity = select(3, GetItemInfo(link))
|
||||
local ilvl = select(4, GetItemInfo(link))
|
||||
if aura_env.config.debug == true then
|
||||
for k,v in pairs(stats) do
|
||||
end
|
||||
end
|
||||
if i == 2 then
|
||||
aura_env.data[aura_env.notifyInspect].neckilvl = ilvl
|
||||
elseif i == 15 and rarity == 5 then
|
||||
aura_env.data[aura_env.notifyInspect].backilvl = ilvl
|
||||
end
|
||||
if stats["ITEM_MOD_CORRUPTION"] then
|
||||
--print("Item", link, "adds", stats["ITEM_MOD_CORRUPTION"], "corruption")
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption + stats["ITEM_MOD_CORRUPTION"]
|
||||
end
|
||||
if stats["ITEM_MOD_CORRUPTION_RESISTANCE"] then
|
||||
--print("Item", link, "reduces corruption by", stats["ITEM_MOD_CORRUPTION_RESISTANCE"])
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - stats["ITEM_MOD_CORRUPTION_RESISTANCE"]
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.data[aura_env.notifyInspect].inspectQueue = false
|
||||
aura_env.data[aura_env.notifyInspect].inspected = true
|
||||
aura_env.notifyInspect = false
|
||||
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing) end
|
||||
ClearInspectPlayer()
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(aura_env.data) do
|
||||
if v.inspected == false and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
if v.neckilvl == 0 and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
end
|
||||
|
||||
local text = {"", "", "", ""}
|
||||
for k,v in pairs(aura_env.data) do
|
||||
text[1] = text[1] .. aura_env.classColor(v.class) .. v.name .. "\n"
|
||||
text[2] = text[2] .. "|cff" .. aura_env.config.ncolor .. v.neckilvl .. "\n"
|
||||
text[3] = text[3] .. "|cff" .. aura_env.config.ccolor .. v.backilvl .. "\n"
|
||||
text[4] = text[4] .. "|cff" .. aura_env.config.cocolor .. v.corruption .. "\n"
|
||||
end
|
||||
|
||||
aura_env.text = text[1]
|
||||
aura_env.randomFrame.text2:SetText(text[2])
|
||||
aura_env.randomFrame.text3:SetText(text[3])
|
||||
aura_env.randomFrame.text4:SetText(text[4])
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.text
|
||||
end
|
||||
|
||||
--INIT
|
||||
if WeakAuras.IsOptionsOpen() then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
end
|
||||
end
|
||||
local aura_env = aura_env
|
||||
aura_env.data = {}
|
||||
aura_env.text = ""
|
||||
aura_env.inspectQueue = {}
|
||||
aura_env.insIndex = 1
|
||||
aura_env.notifyInspect = false
|
||||
aura_env.inspecting = false
|
||||
aura_env.output = ""
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.Debug then WeakAurasSaved.CustomTrash.Debug = {} end
|
||||
|
||||
aura_env.printTable = function(table, n)
|
||||
if not n then n = 0 end
|
||||
for k,v in pairs(table) do
|
||||
local printText = ""
|
||||
for i = 1, n do
|
||||
printText = printText .. " "
|
||||
end
|
||||
printText = printText .. "[" .. k .. "] = " .. tostring(v)
|
||||
print(printText)
|
||||
if type(v) == "table" then
|
||||
n = n + 1
|
||||
aura_env.printTable(v, n)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function uninspect()
|
||||
aura_env.inspecting = false
|
||||
end
|
||||
hooksecurefunc("ClearInspectPlayer", uninspect)
|
||||
|
||||
aura_env.classColor = function(class)
|
||||
if class == 6 then return "|cFFC41F3B" elseif
|
||||
class == 12 then return "|cFFA330C9" elseif
|
||||
class == 11 then return "|cFFFF7D0A" elseif
|
||||
class == 3 then return "|cFFABD473" elseif
|
||||
class == 8 then return "|cFF40C7EB" elseif
|
||||
class == 10 then return "|cFF00FF96" elseif
|
||||
class == 2 then return "|cFFF58CBA" elseif
|
||||
class == 5 then return "|cFFFFFFFF" elseif
|
||||
class == 4 then return "|cFFFFF569" elseif
|
||||
class == 7 then return "|cFF0070DE" elseif
|
||||
class == 9 then return "|cFF8787ED" elseif
|
||||
class == 1 then return "|cFFC79C6E" else
|
||||
return "|cFF000000" end
|
||||
end
|
||||
|
||||
aura_env.inspectPing = function()
|
||||
if aura_env.inspecting == false and aura_env.notifyInspect == false then
|
||||
if #aura_env.inspectQueue > 0 then
|
||||
if aura_env.insIndex >= #aura_env.inspectQueue then
|
||||
aura_env.insIndex = 1
|
||||
end
|
||||
for i = aura_env.insIndex, #aura_env.inspectQueue do
|
||||
if CheckInteractDistance(aura_env.inspectQueue[i], 2) == true then
|
||||
ClearInspectPlayer()
|
||||
NotifyInspect(aura_env.inspectQueue[i])
|
||||
aura_env.notifyInspect = aura_env.inspectQueue[i]
|
||||
if aura_env.ticker then aura_env.ticker:Cancel(); aura_env.ticker = nil end
|
||||
table.remove(aura_env.inspectQueue, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
for k,v in pairs(aura_env.data) do
|
||||
if v.neckilvl == 0 and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if not aura_env.ticker then
|
||||
aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing)
|
||||
end
|
||||
|
||||
local font, fontSize, fontFlags = aura_env.region.text:GetFont()
|
||||
local charWidth = fontSize * 0.6
|
||||
fontSize = fontSize * 0.65
|
||||
|
||||
aura_env.randomFrame = CreateFrame("frame")
|
||||
aura_env.randomFrame:ClearAllPoints()
|
||||
aura_env.randomFrame:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
|
||||
if not aura_env.randomFrame.text2 then
|
||||
aura_env.randomFrame.text2 = aura_env.randomFrame:CreateFontString()
|
||||
end
|
||||
aura_env.randomFrame.text2:SetFont(font, fontSize, fontFlags)
|
||||
aura_env.randomFrame.text2:SetPoint("CENTER", aura_env.region, "CENTER", charWidth * 8, 0)
|
||||
aura_env.randomFrame.text2:SetText("")
|
||||
aura_env.randomFrame.text2:SetJustifyV("center")
|
||||
aura_env.randomFrame.text2:SetJustifyH("center")
|
||||
aura_env.randomFrame.text2:Show()
|
||||
|
||||
if not aura_env.randomFrame.text3 then
|
||||
aura_env.randomFrame.text3 = aura_env.randomFrame:CreateFontString()
|
||||
end
|
||||
aura_env.randomFrame.text3:SetFont(font, fontSize, fontFlags)
|
||||
aura_env.randomFrame.text3:SetPoint("CENTER", aura_env.region, "CENTER", (charWidth * 8) + (charWidth * 3), 0)
|
||||
aura_env.randomFrame.text3:SetText("")
|
||||
aura_env.randomFrame.text3:SetJustifyV("center")
|
||||
aura_env.randomFrame.text3:SetJustifyH("center")
|
||||
aura_env.randomFrame.text3:Show()
|
||||
|
||||
if not aura_env.randomFrame.text4 then
|
||||
aura_env.randomFrame.text4 = aura_env.randomFrame:CreateFontString()
|
||||
end
|
||||
aura_env.randomFrame.text4:SetFont(font, fontSize, fontFlags)
|
||||
aura_env.randomFrame.text4:SetPoint("CENTER", aura_env.region, "CENTER", (charWidth * 8) + (charWidth * 3) + (charWidth * 3), 0)
|
||||
aura_env.randomFrame.text4:SetText("")
|
||||
aura_env.randomFrame.text4:SetJustifyV("center")
|
||||
aura_env.randomFrame.text4:SetJustifyH("center")
|
||||
--GROUP_ROSTER_UPDATE INSPECT_READY
|
||||
function(e)
|
||||
if e == "GROUP_ROSTER_UPDATE" then
|
||||
for i = 1, 40 do
|
||||
local u = "raid" .. i
|
||||
if UnitExists(u) and not UnitIsUnit(u, "player") then
|
||||
if not aura_env.data[u] then
|
||||
aura_env.data[u] = {
|
||||
["name"] = UnitName(u),
|
||||
["class"] = select(3, UnitClass(u)),
|
||||
["neckilvl"] = 0,
|
||||
["backilvl"] = 0,
|
||||
["corruption"] = 0,
|
||||
["inspectQueue"] = false,
|
||||
["inspected"] = false
|
||||
}
|
||||
end
|
||||
if aura_env.data[u] then
|
||||
if aura_env.data[u].name ~= UnitName(u) then
|
||||
aura_env.data[u] = {
|
||||
["name"] = UnitName(u),
|
||||
["class"] = select(3, UnitClass(u)),
|
||||
["neckilvl"] = 0,
|
||||
["backilvl"] = 0,
|
||||
["corruption"] = 0,
|
||||
["inspectQueue"] = false,
|
||||
["inspected"] = false
|
||||
}
|
||||
end
|
||||
end
|
||||
elseif not UnitExists(u) and aura_env.data[u] then
|
||||
if aura_env.data[u] then
|
||||
aura_env.data[u] = nil
|
||||
end
|
||||
for k,v in pairs(aura_env.inspectQueue) do
|
||||
if v == u then
|
||||
table.remove(aura_env.inspectQueue, k)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "INSPECT_READY" then
|
||||
if aura_env.notifyInspect ~= false and aura_env.inspecting == false then
|
||||
InspectUnit(aura_env.notifyInspect)
|
||||
aura_env.inspecting = true
|
||||
elseif aura_env.notifyInspect ~= false and aura_env.inspecting == true then
|
||||
for i = 1, 17 do
|
||||
local link = GetInventoryItemLink(aura_env.notifyInspect, i) or 0
|
||||
if link ~= 0 then
|
||||
local stats = {}
|
||||
GetItemStats(link, stats)
|
||||
local rarity = select(3, GetItemInfo(link))
|
||||
local ilvl = select(4, GetItemInfo(link))
|
||||
if aura_env.config.debug == true then
|
||||
for k,v in pairs(stats) do
|
||||
end
|
||||
end
|
||||
if i == 2 then
|
||||
aura_env.data[aura_env.notifyInspect].neckilvl = ilvl
|
||||
elseif i == 15 and rarity == 5 then
|
||||
aura_env.data[aura_env.notifyInspect].backilvl = ilvl
|
||||
end
|
||||
if stats["ITEM_MOD_CORRUPTION"] then
|
||||
--print("Item", link, "adds", stats["ITEM_MOD_CORRUPTION"], "corruption")
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption + stats["ITEM_MOD_CORRUPTION"]
|
||||
end
|
||||
if stats["ITEM_MOD_CORRUPTION_RESISTANCE"] then
|
||||
--print("Item", link, "reduces corruption by", stats["ITEM_MOD_CORRUPTION_RESISTANCE"])
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - stats["ITEM_MOD_CORRUPTION_RESISTANCE"]
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.data[aura_env.notifyInspect].inspectQueue = false
|
||||
aura_env.data[aura_env.notifyInspect].inspected = true
|
||||
aura_env.notifyInspect = false
|
||||
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing) end
|
||||
ClearInspectPlayer()
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(aura_env.data) do
|
||||
if v.inspected == false and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
if v.neckilvl == 0 and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
end
|
||||
|
||||
local text = {"", "", "", ""}
|
||||
for k,v in pairs(aura_env.data) do
|
||||
text[1] = text[1] .. aura_env.classColor(v.class) .. v.name .. "\n"
|
||||
text[2] = text[2] .. "|cff" .. aura_env.config.ncolor .. v.neckilvl .. "\n"
|
||||
text[3] = text[3] .. "|cff" .. aura_env.config.ccolor .. v.backilvl .. "\n"
|
||||
text[4] = text[4] .. "|cff" .. aura_env.config.cocolor .. v.corruption .. "\n"
|
||||
end
|
||||
|
||||
aura_env.text = text[1]
|
||||
aura_env.randomFrame.text2:SetText(text[2])
|
||||
aura_env.randomFrame.text3:SetText(text[3])
|
||||
aura_env.randomFrame.text4:SetText(text[4])
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.text
|
||||
end
|
||||
|
||||
--INIT
|
||||
if WeakAuras.IsOptionsOpen() then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
end
|
||||
end
|
||||
local aura_env = aura_env
|
||||
aura_env.data = {}
|
||||
aura_env.text = ""
|
||||
aura_env.inspectQueue = {}
|
||||
aura_env.insIndex = 1
|
||||
aura_env.notifyInspect = false
|
||||
aura_env.inspecting = false
|
||||
aura_env.output = ""
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.Debug then WeakAurasSaved.CustomTrash.Debug = {} end
|
||||
|
||||
aura_env.printTable = function(table, n)
|
||||
if not n then n = 0 end
|
||||
for k,v in pairs(table) do
|
||||
local printText = ""
|
||||
for i = 1, n do
|
||||
printText = printText .. " "
|
||||
end
|
||||
printText = printText .. "[" .. k .. "] = " .. tostring(v)
|
||||
print(printText)
|
||||
if type(v) == "table" then
|
||||
n = n + 1
|
||||
aura_env.printTable(v, n)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function uninspect()
|
||||
aura_env.inspecting = false
|
||||
end
|
||||
hooksecurefunc("ClearInspectPlayer", uninspect)
|
||||
|
||||
aura_env.classColor = function(class)
|
||||
if class == 6 then return "|cFFC41F3B" elseif
|
||||
class == 12 then return "|cFFA330C9" elseif
|
||||
class == 11 then return "|cFFFF7D0A" elseif
|
||||
class == 3 then return "|cFFABD473" elseif
|
||||
class == 8 then return "|cFF40C7EB" elseif
|
||||
class == 10 then return "|cFF00FF96" elseif
|
||||
class == 2 then return "|cFFF58CBA" elseif
|
||||
class == 5 then return "|cFFFFFFFF" elseif
|
||||
class == 4 then return "|cFFFFF569" elseif
|
||||
class == 7 then return "|cFF0070DE" elseif
|
||||
class == 9 then return "|cFF8787ED" elseif
|
||||
class == 1 then return "|cFFC79C6E" else
|
||||
return "|cFF000000" end
|
||||
end
|
||||
|
||||
aura_env.inspectPing = function()
|
||||
if aura_env.inspecting == false and aura_env.notifyInspect == false then
|
||||
if #aura_env.inspectQueue > 0 then
|
||||
if aura_env.insIndex >= #aura_env.inspectQueue then
|
||||
aura_env.insIndex = 1
|
||||
end
|
||||
for i = aura_env.insIndex, #aura_env.inspectQueue do
|
||||
if CheckInteractDistance(aura_env.inspectQueue[i], 2) == true then
|
||||
ClearInspectPlayer()
|
||||
NotifyInspect(aura_env.inspectQueue[i])
|
||||
aura_env.notifyInspect = aura_env.inspectQueue[i]
|
||||
if aura_env.ticker then aura_env.ticker:Cancel(); aura_env.ticker = nil end
|
||||
table.remove(aura_env.inspectQueue, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
for k,v in pairs(aura_env.data) do
|
||||
if v.neckilvl == 0 and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if not aura_env.ticker then
|
||||
aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing)
|
||||
end
|
||||
|
||||
local font, fontSize, fontFlags = aura_env.region.text:GetFont()
|
||||
local charWidth = fontSize * 0.6
|
||||
fontSize = fontSize * 0.65
|
||||
|
||||
aura_env.randomFrame = CreateFrame("frame")
|
||||
aura_env.randomFrame:ClearAllPoints()
|
||||
aura_env.randomFrame:SetPoint("CENTER", aura_env.region, "CENTER")
|
||||
|
||||
if not aura_env.randomFrame.text2 then
|
||||
aura_env.randomFrame.text2 = aura_env.randomFrame:CreateFontString()
|
||||
end
|
||||
aura_env.randomFrame.text2:SetFont(font, fontSize, fontFlags)
|
||||
aura_env.randomFrame.text2:SetPoint("CENTER", aura_env.region, "CENTER", charWidth * 8, 0)
|
||||
aura_env.randomFrame.text2:SetText("")
|
||||
aura_env.randomFrame.text2:SetJustifyV("center")
|
||||
aura_env.randomFrame.text2:SetJustifyH("center")
|
||||
aura_env.randomFrame.text2:Show()
|
||||
|
||||
if not aura_env.randomFrame.text3 then
|
||||
aura_env.randomFrame.text3 = aura_env.randomFrame:CreateFontString()
|
||||
end
|
||||
aura_env.randomFrame.text3:SetFont(font, fontSize, fontFlags)
|
||||
aura_env.randomFrame.text3:SetPoint("CENTER", aura_env.region, "CENTER", (charWidth * 8) + (charWidth * 3), 0)
|
||||
aura_env.randomFrame.text3:SetText("")
|
||||
aura_env.randomFrame.text3:SetJustifyV("center")
|
||||
aura_env.randomFrame.text3:SetJustifyH("center")
|
||||
aura_env.randomFrame.text3:Show()
|
||||
|
||||
if not aura_env.randomFrame.text4 then
|
||||
aura_env.randomFrame.text4 = aura_env.randomFrame:CreateFontString()
|
||||
end
|
||||
aura_env.randomFrame.text4:SetFont(font, fontSize, fontFlags)
|
||||
aura_env.randomFrame.text4:SetPoint("CENTER", aura_env.region, "CENTER", (charWidth * 8) + (charWidth * 3) + (charWidth * 3), 0)
|
||||
aura_env.randomFrame.text4:SetText("")
|
||||
aura_env.randomFrame.text4:SetJustifyV("center")
|
||||
aura_env.randomFrame.text4:SetJustifyH("center")
|
||||
aura_env.randomFrame.text4:Show()
|
||||
@@ -1,223 +1,223 @@
|
||||
--GROUP_ROSTER_UPDATE INSPECT_READY
|
||||
function(allstates, e)
|
||||
if e == "GROUP_ROSTER_UPDATE" then
|
||||
for i = 1, 40 do
|
||||
local u = "raid" .. i
|
||||
if UnitExists(u) and not UnitIsUnit(u, "player") then
|
||||
if not aura_env.data[u] then
|
||||
aura_env.data[u] = {
|
||||
["name"] = UnitName(u),
|
||||
["class"] = select(3, UnitClass(u)),
|
||||
["neckilvl"] = 0,
|
||||
["backilvl"] = 0,
|
||||
["corruption"] = 0,
|
||||
["inspectQueue"] = false,
|
||||
["inspected"] = false
|
||||
}
|
||||
end
|
||||
if aura_env.data[u] then
|
||||
if aura_env.data[u].name ~= UnitName(u) then
|
||||
aura_env.data[u] = {
|
||||
["name"] = UnitName(u),
|
||||
["class"] = select(3, UnitClass(u)),
|
||||
["neckilvl"] = 0,
|
||||
["backilvl"] = 0,
|
||||
["corruption"] = 0,
|
||||
["inspectQueue"] = false,
|
||||
["inspected"] = false
|
||||
}
|
||||
end
|
||||
end
|
||||
elseif not UnitExists(u) and (aura_env.data[u] or allstates[u]) then
|
||||
if aura_env.data[u] then
|
||||
aura_env.data[u] = nil
|
||||
end
|
||||
for k,v in pairs(aura_env.inspectQueue) do
|
||||
if v == u then
|
||||
table.remove(aura_env.inspectQueue, k)
|
||||
end
|
||||
end
|
||||
if allstates[u] then
|
||||
allstates[u].show = false
|
||||
allstates[u].changed = true
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "INSPECT_READY" then
|
||||
if aura_env.notifyInspect ~= false and aura_env.inspecting == false then
|
||||
InspectUnit(aura_env.notifyInspect)
|
||||
aura_env.inspecting = true
|
||||
elseif aura_env.notifyInspect ~= false and aura_env.inspecting == true then
|
||||
for i = 1, 17 do
|
||||
local link = GetInventoryItemLink(aura_env.notifyInspect, i) or 0
|
||||
if link ~= 0 then
|
||||
local stats = {}
|
||||
GetItemStats(link, stats)
|
||||
local rarity = select(3, GetItemInfo(link))
|
||||
local ilvl = select(4, GetItemInfo(link))
|
||||
if aura_env.config.debug == true then
|
||||
for k,v in pairs(stats) do
|
||||
end
|
||||
end
|
||||
if i == 2 then
|
||||
aura_env.data[aura_env.notifyInspect].neckilvl = ilvl
|
||||
elseif i == 15 and rarity == 5 then
|
||||
aura_env.data[aura_env.notifyInspect].backilvl = ilvl
|
||||
end
|
||||
if stats["ITEM_MOD_CORRUPTION"] then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption + stats["ITEM_MOD_CORRUPTION"]
|
||||
end
|
||||
if stats["ITEM_MOD_CORRUPTION_RESISTANCE"] then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - stats["ITEM_MOD_CORRUPTION_RESISTANCE"]
|
||||
end
|
||||
end
|
||||
end
|
||||
if aura_env.data[aura_env.notifyInspect].backilvl > 0 then
|
||||
local bil = aura_env.data[aura_env.notifyInspect].backilvl
|
||||
if bil >= 470 and bil < 472 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 5
|
||||
elseif bil >= 472 and bil <= 474 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 12
|
||||
elseif bil >= 476 and bil <= 480 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 20
|
||||
elseif bil >= 482 and bil <= 484 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 27
|
||||
elseif bil >= 486 and bil <= 488 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 35
|
||||
elseif bil >= 490 and bil <= 494 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 42
|
||||
elseif bil >= 494 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 50
|
||||
end
|
||||
end
|
||||
aura_env.data[aura_env.notifyInspect].inspectQueue = false
|
||||
aura_env.data[aura_env.notifyInspect].inspected = true
|
||||
aura_env.notifyInspect = false
|
||||
ClearInspectPlayer()
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(aura_env.data) do
|
||||
if v.inspected == false and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
if v.neckilvl == 0 and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(aura_env.data) do
|
||||
allstates[k] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
name = v.name,
|
||||
class = v.class,
|
||||
classColor = aura_env.classColor(v.class),
|
||||
backilvl = v.backilvl,
|
||||
backColor = "|cff" .. aura_env.config.ccolor,
|
||||
neckilvl = v.neckilvl,
|
||||
neckColor = "|cff" .. aura_env.config.ncolor,
|
||||
corruption = v.corruption,
|
||||
corruptionColor = "|cff" .. aura_env.config.cocolor,
|
||||
resort = true,
|
||||
index = v.name,
|
||||
}
|
||||
if aura_env.config.sort == 1 then
|
||||
allstates[k].index = v.name
|
||||
elseif aura_env.config.sort == 2 then
|
||||
allstates[k].index = v.backilvl
|
||||
elseif aura_env.config.sort == 3 then
|
||||
allstates[k].index = v.neckilvl
|
||||
elseif aura_env.config.sort == 4 then
|
||||
allstates[k].index = v.corruption
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
%classColor%n %neckColor%neckilvl %backColor%backilvl %corruptionColor%corruption
|
||||
|
||||
--INIT
|
||||
if WeakAuras.IsOptionsOpen() then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
end
|
||||
end
|
||||
local aura_env = aura_env
|
||||
aura_env.data = {}
|
||||
aura_env.inspectQueue = {}
|
||||
aura_env.insIndex = 1
|
||||
aura_env.notifyInspect = false
|
||||
aura_env.inspecting = false
|
||||
aura_env.output = ""
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.Debug then WeakAurasSaved.CustomTrash.Debug = {} end
|
||||
|
||||
aura_env.printTable = function(table, n)
|
||||
if not n then n = 0 end
|
||||
for k,v in pairs(table) do
|
||||
local printText = ""
|
||||
for i = 1, n do
|
||||
printText = printText .. " "
|
||||
end
|
||||
printText = printText .. "[" .. k .. "] = " .. tostring(v)
|
||||
print(printText)
|
||||
if type(v) == "table" then
|
||||
n = n + 1
|
||||
aura_env.printTable(v, n)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function uninspect()
|
||||
aura_env.inspecting = false
|
||||
end
|
||||
hooksecurefunc("ClearInspectPlayer", uninspect)
|
||||
|
||||
aura_env.classColor = function(class)
|
||||
if class == 6 then return "|cFFC41F3B" elseif
|
||||
class == 12 then return "|cFFA330C9" elseif
|
||||
class == 11 then return "|cFFFF7D0A" elseif
|
||||
class == 3 then return "|cFFABD473" elseif
|
||||
class == 8 then return "|cFF40C7EB" elseif
|
||||
class == 10 then return "|cFF00FF96" elseif
|
||||
class == 2 then return "|cFFF58CBA" elseif
|
||||
class == 5 then return "|cFFFFFFFF" elseif
|
||||
class == 4 then return "|cFFFFF569" elseif
|
||||
class == 7 then return "|cFF0070DE" elseif
|
||||
class == 9 then return "|cFF8787ED" elseif
|
||||
class == 1 then return "|cFFC79C6E" else
|
||||
return "|cFF000000" end
|
||||
end
|
||||
|
||||
aura_env.inspectPing = function()
|
||||
if aura_env.inspecting == false and aura_env.notifyInspect == false then
|
||||
if #aura_env.inspectQueue > 0 then
|
||||
--print("There are units to inspect D:")
|
||||
if aura_env.insIndex >= #aura_env.inspectQueue then
|
||||
aura_env.insIndex = 1
|
||||
end
|
||||
for i = aura_env.insIndex, #aura_env.inspectQueue do
|
||||
if CheckInteractDistance(aura_env.inspectQueue[i], 2) == true then
|
||||
--print("QUEUEING INSPECT FOR", aura_env.inspectQueue[i])
|
||||
ClearInspectPlayer()
|
||||
NotifyInspect(aura_env.inspectQueue[i])
|
||||
aura_env.notifyInspect = aura_env.inspectQueue[i]
|
||||
table.remove(aura_env.inspectQueue, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
for k,v in pairs(aura_env.data) do
|
||||
if v.neckilvl == 0 and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
end
|
||||
end
|
||||
--GROUP_ROSTER_UPDATE INSPECT_READY
|
||||
function(allstates, e)
|
||||
if e == "GROUP_ROSTER_UPDATE" then
|
||||
for i = 1, 40 do
|
||||
local u = "raid" .. i
|
||||
if UnitExists(u) and not UnitIsUnit(u, "player") then
|
||||
if not aura_env.data[u] then
|
||||
aura_env.data[u] = {
|
||||
["name"] = UnitName(u),
|
||||
["class"] = select(3, UnitClass(u)),
|
||||
["neckilvl"] = 0,
|
||||
["backilvl"] = 0,
|
||||
["corruption"] = 0,
|
||||
["inspectQueue"] = false,
|
||||
["inspected"] = false
|
||||
}
|
||||
end
|
||||
if aura_env.data[u] then
|
||||
if aura_env.data[u].name ~= UnitName(u) then
|
||||
aura_env.data[u] = {
|
||||
["name"] = UnitName(u),
|
||||
["class"] = select(3, UnitClass(u)),
|
||||
["neckilvl"] = 0,
|
||||
["backilvl"] = 0,
|
||||
["corruption"] = 0,
|
||||
["inspectQueue"] = false,
|
||||
["inspected"] = false
|
||||
}
|
||||
end
|
||||
end
|
||||
elseif not UnitExists(u) and (aura_env.data[u] or allstates[u]) then
|
||||
if aura_env.data[u] then
|
||||
aura_env.data[u] = nil
|
||||
end
|
||||
for k,v in pairs(aura_env.inspectQueue) do
|
||||
if v == u then
|
||||
table.remove(aura_env.inspectQueue, k)
|
||||
end
|
||||
end
|
||||
if allstates[u] then
|
||||
allstates[u].show = false
|
||||
allstates[u].changed = true
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "INSPECT_READY" then
|
||||
if aura_env.notifyInspect ~= false and aura_env.inspecting == false then
|
||||
InspectUnit(aura_env.notifyInspect)
|
||||
aura_env.inspecting = true
|
||||
elseif aura_env.notifyInspect ~= false and aura_env.inspecting == true then
|
||||
for i = 1, 17 do
|
||||
local link = GetInventoryItemLink(aura_env.notifyInspect, i) or 0
|
||||
if link ~= 0 then
|
||||
local stats = {}
|
||||
GetItemStats(link, stats)
|
||||
local rarity = select(3, GetItemInfo(link))
|
||||
local ilvl = select(4, GetItemInfo(link))
|
||||
if aura_env.config.debug == true then
|
||||
for k,v in pairs(stats) do
|
||||
end
|
||||
end
|
||||
if i == 2 then
|
||||
aura_env.data[aura_env.notifyInspect].neckilvl = ilvl
|
||||
elseif i == 15 and rarity == 5 then
|
||||
aura_env.data[aura_env.notifyInspect].backilvl = ilvl
|
||||
end
|
||||
if stats["ITEM_MOD_CORRUPTION"] then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption + stats["ITEM_MOD_CORRUPTION"]
|
||||
end
|
||||
if stats["ITEM_MOD_CORRUPTION_RESISTANCE"] then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - stats["ITEM_MOD_CORRUPTION_RESISTANCE"]
|
||||
end
|
||||
end
|
||||
end
|
||||
if aura_env.data[aura_env.notifyInspect].backilvl > 0 then
|
||||
local bil = aura_env.data[aura_env.notifyInspect].backilvl
|
||||
if bil >= 470 and bil < 472 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 5
|
||||
elseif bil >= 472 and bil <= 474 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 12
|
||||
elseif bil >= 476 and bil <= 480 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 20
|
||||
elseif bil >= 482 and bil <= 484 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 27
|
||||
elseif bil >= 486 and bil <= 488 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 35
|
||||
elseif bil >= 490 and bil <= 494 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 42
|
||||
elseif bil >= 494 then
|
||||
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 50
|
||||
end
|
||||
end
|
||||
aura_env.data[aura_env.notifyInspect].inspectQueue = false
|
||||
aura_env.data[aura_env.notifyInspect].inspected = true
|
||||
aura_env.notifyInspect = false
|
||||
ClearInspectPlayer()
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(aura_env.data) do
|
||||
if v.inspected == false and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
if v.neckilvl == 0 and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(aura_env.data) do
|
||||
allstates[k] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
name = v.name,
|
||||
class = v.class,
|
||||
classColor = aura_env.classColor(v.class),
|
||||
backilvl = v.backilvl,
|
||||
backColor = "|cff" .. aura_env.config.ccolor,
|
||||
neckilvl = v.neckilvl,
|
||||
neckColor = "|cff" .. aura_env.config.ncolor,
|
||||
corruption = v.corruption,
|
||||
corruptionColor = "|cff" .. aura_env.config.cocolor,
|
||||
resort = true,
|
||||
index = v.name,
|
||||
}
|
||||
if aura_env.config.sort == 1 then
|
||||
allstates[k].index = v.name
|
||||
elseif aura_env.config.sort == 2 then
|
||||
allstates[k].index = v.backilvl
|
||||
elseif aura_env.config.sort == 3 then
|
||||
allstates[k].index = v.neckilvl
|
||||
elseif aura_env.config.sort == 4 then
|
||||
allstates[k].index = v.corruption
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
%classColor%n %neckColor%neckilvl %backColor%backilvl %corruptionColor%corruption
|
||||
|
||||
--INIT
|
||||
if WeakAuras.IsOptionsOpen() then
|
||||
if aura_env.ticker then
|
||||
aura_env.ticker:Cancel()
|
||||
aura_env.ticker = nil
|
||||
end
|
||||
end
|
||||
local aura_env = aura_env
|
||||
aura_env.data = {}
|
||||
aura_env.inspectQueue = {}
|
||||
aura_env.insIndex = 1
|
||||
aura_env.notifyInspect = false
|
||||
aura_env.inspecting = false
|
||||
aura_env.output = ""
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.Debug then WeakAurasSaved.CustomTrash.Debug = {} end
|
||||
|
||||
aura_env.printTable = function(table, n)
|
||||
if not n then n = 0 end
|
||||
for k,v in pairs(table) do
|
||||
local printText = ""
|
||||
for i = 1, n do
|
||||
printText = printText .. " "
|
||||
end
|
||||
printText = printText .. "[" .. k .. "] = " .. tostring(v)
|
||||
print(printText)
|
||||
if type(v) == "table" then
|
||||
n = n + 1
|
||||
aura_env.printTable(v, n)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function uninspect()
|
||||
aura_env.inspecting = false
|
||||
end
|
||||
hooksecurefunc("ClearInspectPlayer", uninspect)
|
||||
|
||||
aura_env.classColor = function(class)
|
||||
if class == 6 then return "|cFFC41F3B" elseif
|
||||
class == 12 then return "|cFFA330C9" elseif
|
||||
class == 11 then return "|cFFFF7D0A" elseif
|
||||
class == 3 then return "|cFFABD473" elseif
|
||||
class == 8 then return "|cFF40C7EB" elseif
|
||||
class == 10 then return "|cFF00FF96" elseif
|
||||
class == 2 then return "|cFFF58CBA" elseif
|
||||
class == 5 then return "|cFFFFFFFF" elseif
|
||||
class == 4 then return "|cFFFFF569" elseif
|
||||
class == 7 then return "|cFF0070DE" elseif
|
||||
class == 9 then return "|cFF8787ED" elseif
|
||||
class == 1 then return "|cFFC79C6E" else
|
||||
return "|cFF000000" end
|
||||
end
|
||||
|
||||
aura_env.inspectPing = function()
|
||||
if aura_env.inspecting == false and aura_env.notifyInspect == false then
|
||||
if #aura_env.inspectQueue > 0 then
|
||||
--print("There are units to inspect D:")
|
||||
if aura_env.insIndex >= #aura_env.inspectQueue then
|
||||
aura_env.insIndex = 1
|
||||
end
|
||||
for i = aura_env.insIndex, #aura_env.inspectQueue do
|
||||
if CheckInteractDistance(aura_env.inspectQueue[i], 2) == true then
|
||||
--print("QUEUEING INSPECT FOR", aura_env.inspectQueue[i])
|
||||
ClearInspectPlayer()
|
||||
NotifyInspect(aura_env.inspectQueue[i])
|
||||
aura_env.notifyInspect = aura_env.inspectQueue[i]
|
||||
table.remove(aura_env.inspectQueue, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
for k,v in pairs(aura_env.data) do
|
||||
if v.neckilvl == 0 and v.inspectQueue == false then
|
||||
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
|
||||
v.inspectQueue = true
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing)
|
||||
@@ -1,71 +1,71 @@
|
||||
--UNIT_AURA DRUID_HOTS_REMOVE_HOT UPDATE_HOTS
|
||||
function(e, ...)
|
||||
if not WeakAurasSaved.DruidHots then WeakAurasSaved.DruidHots = {} end
|
||||
if not WeakAurasSaved.DruidHotsTotal then WeakAurasSaved.DruidHotsTotal = {
|
||||
["Rejuvenation"] = 0,
|
||||
["Regrowth"] = 0,
|
||||
["Lifebloom"] = 0,
|
||||
["Wild Growth"] = 0,
|
||||
["Spring Blossoms"] = 0,
|
||||
["Grove Tending"] = 0,
|
||||
["Rejuvenation (Germination)"] = 0,
|
||||
} end
|
||||
if e == "UNIT_AURA" then
|
||||
local u = ...
|
||||
local index = 1
|
||||
local GUID = UnitGUID(u)
|
||||
local buff, update = 0, 0
|
||||
WeakAurasSaved.DruidHots[GUID] = {}
|
||||
while UnitBuff(u, index, "PLAYER") do
|
||||
local name = UnitBuff(u, index, "PLAYER")
|
||||
local dur = select(6, UnitBuff(u, index, "PLAYER"))
|
||||
if aura_env.hots[name] then
|
||||
buff = 1
|
||||
WeakAurasSaved.DruidHots[GUID][name] = C_Timer.NewTimer(dur, function() WeakAuras.ScanEvents("DRUID_HOTS_REMOVE_HOT", GUID, name) end)
|
||||
end
|
||||
index = index + 1
|
||||
if index > 20 then break end
|
||||
end
|
||||
if buff == 0 then WeakAurasSaved.DruidHots[GUID] = nil end
|
||||
if buff == 1 then WeakAuras.ScanEvents("UPDATE_HOTS") end
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
elseif e == "DRUID_HOTS_REMOVE_HOT" then
|
||||
local GUID, bname = ...
|
||||
WeakAurasSaved.DruidHots[GUID][bname] = nil
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
elseif e == "UPDATE_HOTS" then
|
||||
WeakAurasSaved.DruidHotsTotal = {
|
||||
["Rejuvenation"] = 0,
|
||||
["Regrowth"] = 0,
|
||||
["Lifebloom"] = 0,
|
||||
["Wild Growth"] = 0,
|
||||
["Spring Blossoms"] = 0,
|
||||
["Grove Tending"] = 0,
|
||||
["Rejuvenation (Germination)"] = 0,
|
||||
}
|
||||
for k,v in pairs(WeakAurasSaved.DruidHots) do
|
||||
for k2, v2 in pairs(v) do
|
||||
--print(k2)
|
||||
WeakAurasSaved.DruidHotsTotal[k2] = WeakAurasSaved.DruidHotsTotal[k2] + 1
|
||||
end
|
||||
end
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHotsTotal)
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.DruidHotsTotal["Grove Tending"]
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.hots = {
|
||||
["Rejuvenation"] = 1,
|
||||
["Regrowth"] = 1,
|
||||
["Lifebloom"] = 1,
|
||||
["Wild Growth"] = 1,
|
||||
["Spring Blossoms"] = 1,
|
||||
["Grove Tending"] = 1,
|
||||
["Rejuvenation (Germination)"] = 1,
|
||||
--UNIT_AURA DRUID_HOTS_REMOVE_HOT UPDATE_HOTS
|
||||
function(e, ...)
|
||||
if not WeakAurasSaved.DruidHots then WeakAurasSaved.DruidHots = {} end
|
||||
if not WeakAurasSaved.DruidHotsTotal then WeakAurasSaved.DruidHotsTotal = {
|
||||
["Rejuvenation"] = 0,
|
||||
["Regrowth"] = 0,
|
||||
["Lifebloom"] = 0,
|
||||
["Wild Growth"] = 0,
|
||||
["Spring Blossoms"] = 0,
|
||||
["Grove Tending"] = 0,
|
||||
["Rejuvenation (Germination)"] = 0,
|
||||
} end
|
||||
if e == "UNIT_AURA" then
|
||||
local u = ...
|
||||
local index = 1
|
||||
local GUID = UnitGUID(u)
|
||||
local buff, update = 0, 0
|
||||
WeakAurasSaved.DruidHots[GUID] = {}
|
||||
while UnitBuff(u, index, "PLAYER") do
|
||||
local name = UnitBuff(u, index, "PLAYER")
|
||||
local dur = select(6, UnitBuff(u, index, "PLAYER"))
|
||||
if aura_env.hots[name] then
|
||||
buff = 1
|
||||
WeakAurasSaved.DruidHots[GUID][name] = C_Timer.NewTimer(dur, function() WeakAuras.ScanEvents("DRUID_HOTS_REMOVE_HOT", GUID, name) end)
|
||||
end
|
||||
index = index + 1
|
||||
if index > 20 then break end
|
||||
end
|
||||
if buff == 0 then WeakAurasSaved.DruidHots[GUID] = nil end
|
||||
if buff == 1 then WeakAuras.ScanEvents("UPDATE_HOTS") end
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
elseif e == "DRUID_HOTS_REMOVE_HOT" then
|
||||
local GUID, bname = ...
|
||||
WeakAurasSaved.DruidHots[GUID][bname] = nil
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
elseif e == "UPDATE_HOTS" then
|
||||
WeakAurasSaved.DruidHotsTotal = {
|
||||
["Rejuvenation"] = 0,
|
||||
["Regrowth"] = 0,
|
||||
["Lifebloom"] = 0,
|
||||
["Wild Growth"] = 0,
|
||||
["Spring Blossoms"] = 0,
|
||||
["Grove Tending"] = 0,
|
||||
["Rejuvenation (Germination)"] = 0,
|
||||
}
|
||||
for k,v in pairs(WeakAurasSaved.DruidHots) do
|
||||
for k2, v2 in pairs(v) do
|
||||
--print(k2)
|
||||
WeakAurasSaved.DruidHotsTotal[k2] = WeakAurasSaved.DruidHotsTotal[k2] + 1
|
||||
end
|
||||
end
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHotsTotal)
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.DruidHotsTotal["Grove Tending"]
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.hots = {
|
||||
["Rejuvenation"] = 1,
|
||||
["Regrowth"] = 1,
|
||||
["Lifebloom"] = 1,
|
||||
["Wild Growth"] = 1,
|
||||
["Spring Blossoms"] = 1,
|
||||
["Grove Tending"] = 1,
|
||||
["Rejuvenation (Germination)"] = 1,
|
||||
}
|
||||
@@ -1,105 +1,105 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED
|
||||
--I fucked it up.
|
||||
function(e, msg, sender)
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {["tb"] = "Thunder Bluff", ["org"] = "Orgrimmar", ["uc"] = "Undercity", ["portal"] = "Portal", ["port"] = "Portal", ["water"] = "Water", ["waters"] = "Waters", ["food"] = "Food"} end
|
||||
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then
|
||||
if msg and aura_env.toggle == 1 then
|
||||
msg = msg:lower()
|
||||
local noRealmSender = sender:match("(.+)-%w+")
|
||||
--print(sender, noRealmSender, UnitClass(sender), UnitClass(noRealmSender))
|
||||
if select(3, UnitClass(noRealmSender)) == 8 and not WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] then
|
||||
print("Adding", noRealmSender, "to the ignore")
|
||||
WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] = 1
|
||||
end
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
if msg:match(k) then
|
||||
local st, en = msg:find(k)
|
||||
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and select(3, UnitClass(noRealmSender)) ~= 8 then
|
||||
if not WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] then
|
||||
InviteUnit(sender)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "TOGGLE_MAGUS" then
|
||||
if aura_env.toggle == 0 then
|
||||
print("Toggling script on")
|
||||
SendWho('z-"azsuna" c-"Mage"')
|
||||
aura_env.toggle = 1
|
||||
else
|
||||
print("Toggling script off")
|
||||
aura_env.toggle = 0
|
||||
end
|
||||
elseif e == "WHO_LIST_UPDATE" then
|
||||
for i = 1, GetNumWhoResults() do
|
||||
local name = select(1, GetWhoInfo(i))
|
||||
local class = select(5, GetWhoInfo(i))
|
||||
if class:match("Mage") then
|
||||
if not WeakAurasSaved.MagusKeywords.AntiMagusTable[name] then
|
||||
print("Adding", name, "to the ignore table")
|
||||
WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
FriendsFrameCloseButton:Click()
|
||||
elseif e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name, class = UnitName(msg), select(3, UnitClass(msg))
|
||||
local ispl = UnitIsPlayer(msg)
|
||||
if class == 8 and WeakAurasSaved.MagusKeywords.AntiMagusTable[name] == nil and ispl == true then
|
||||
print("Adding", name, "to the ignore table")
|
||||
WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1
|
||||
end
|
||||
elseif e =="NAME_PLATE_UNIT_REMOVED" then
|
||||
local name, class = UnitName(msg), select(3, UnitClass(msg))
|
||||
local ispl = UnitIsPlayer(msg)
|
||||
if class == 8 and WeakAurasSaved.MagusKeywords.AntiMagusTable[name] == nil and ispl == true then
|
||||
print("Adding", name, "to the ignore table")
|
||||
WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1
|
||||
end
|
||||
elseif e == "ADD_KEYWORD" then
|
||||
print("Adding", msg)
|
||||
msg = msg:lower()
|
||||
WeakAurasSaved.MagusKeywords[msg] = 1
|
||||
elseif e == "LIST_KEYWORDS" then
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
print(k)
|
||||
end
|
||||
elseif e == "REMOVE_KEYWORD" then
|
||||
if WeakAurasSaved.MagusKeywords[msg] then
|
||||
print("Removing", msg)
|
||||
WeakAurasSaved.MagusKeywords[msg] = nil
|
||||
else
|
||||
print(msg, "does not exist in the keyword table")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--EVERY FRAME 1
|
||||
function()
|
||||
if (WeakAurasSaved.CustomTrash.swingone - GetTime()) > 0 then
|
||||
return string.format("%.1f", WeakAurasSaved.CustomTrash.swingone - GetTime())
|
||||
end
|
||||
end
|
||||
|
||||
--EVERY FRAME 2
|
||||
function()
|
||||
if (WeakAurasSaved.CustomTrash.swingtwo - GetTime()) > 0 then
|
||||
return string.format("%.1f", WeakAurasSaved.CustomTrash.swingtwo - GetTime())
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if WeakAurasSaved.CustomTrash.swingRotation == 1 then
|
||||
return "MH"
|
||||
elseif WeakAurasSaved.CustomTrash.swingRotation == 2 then
|
||||
return "OH"
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
WeakAurasSaved.CustomTrash.swingRotation = 1
|
||||
WeakAurasSaved.CustomTrash.swingone = 0
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED
|
||||
--I fucked it up.
|
||||
function(e, msg, sender)
|
||||
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {["tb"] = "Thunder Bluff", ["org"] = "Orgrimmar", ["uc"] = "Undercity", ["portal"] = "Portal", ["port"] = "Portal", ["water"] = "Water", ["waters"] = "Waters", ["food"] = "Food"} end
|
||||
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then
|
||||
if msg and aura_env.toggle == 1 then
|
||||
msg = msg:lower()
|
||||
local noRealmSender = sender:match("(.+)-%w+")
|
||||
--print(sender, noRealmSender, UnitClass(sender), UnitClass(noRealmSender))
|
||||
if select(3, UnitClass(noRealmSender)) == 8 and not WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] then
|
||||
print("Adding", noRealmSender, "to the ignore")
|
||||
WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] = 1
|
||||
end
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
if msg:match(k) then
|
||||
local st, en = msg:find(k)
|
||||
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and select(3, UnitClass(noRealmSender)) ~= 8 then
|
||||
if not WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] then
|
||||
InviteUnit(sender)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "TOGGLE_MAGUS" then
|
||||
if aura_env.toggle == 0 then
|
||||
print("Toggling script on")
|
||||
SendWho('z-"azsuna" c-"Mage"')
|
||||
aura_env.toggle = 1
|
||||
else
|
||||
print("Toggling script off")
|
||||
aura_env.toggle = 0
|
||||
end
|
||||
elseif e == "WHO_LIST_UPDATE" then
|
||||
for i = 1, GetNumWhoResults() do
|
||||
local name = select(1, GetWhoInfo(i))
|
||||
local class = select(5, GetWhoInfo(i))
|
||||
if class:match("Mage") then
|
||||
if not WeakAurasSaved.MagusKeywords.AntiMagusTable[name] then
|
||||
print("Adding", name, "to the ignore table")
|
||||
WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
FriendsFrameCloseButton:Click()
|
||||
elseif e == "NAME_PLATE_UNIT_ADDED" then
|
||||
local name, class = UnitName(msg), select(3, UnitClass(msg))
|
||||
local ispl = UnitIsPlayer(msg)
|
||||
if class == 8 and WeakAurasSaved.MagusKeywords.AntiMagusTable[name] == nil and ispl == true then
|
||||
print("Adding", name, "to the ignore table")
|
||||
WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1
|
||||
end
|
||||
elseif e =="NAME_PLATE_UNIT_REMOVED" then
|
||||
local name, class = UnitName(msg), select(3, UnitClass(msg))
|
||||
local ispl = UnitIsPlayer(msg)
|
||||
if class == 8 and WeakAurasSaved.MagusKeywords.AntiMagusTable[name] == nil and ispl == true then
|
||||
print("Adding", name, "to the ignore table")
|
||||
WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1
|
||||
end
|
||||
elseif e == "ADD_KEYWORD" then
|
||||
print("Adding", msg)
|
||||
msg = msg:lower()
|
||||
WeakAurasSaved.MagusKeywords[msg] = 1
|
||||
elseif e == "LIST_KEYWORDS" then
|
||||
for k,v in pairs(WeakAurasSaved.MagusKeywords) do
|
||||
print(k)
|
||||
end
|
||||
elseif e == "REMOVE_KEYWORD" then
|
||||
if WeakAurasSaved.MagusKeywords[msg] then
|
||||
print("Removing", msg)
|
||||
WeakAurasSaved.MagusKeywords[msg] = nil
|
||||
else
|
||||
print(msg, "does not exist in the keyword table")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--EVERY FRAME 1
|
||||
function()
|
||||
if (WeakAurasSaved.CustomTrash.swingone - GetTime()) > 0 then
|
||||
return string.format("%.1f", WeakAurasSaved.CustomTrash.swingone - GetTime())
|
||||
end
|
||||
end
|
||||
|
||||
--EVERY FRAME 2
|
||||
function()
|
||||
if (WeakAurasSaved.CustomTrash.swingtwo - GetTime()) > 0 then
|
||||
return string.format("%.1f", WeakAurasSaved.CustomTrash.swingtwo - GetTime())
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if WeakAurasSaved.CustomTrash.swingRotation == 1 then
|
||||
return "MH"
|
||||
elseif WeakAurasSaved.CustomTrash.swingRotation == 2 then
|
||||
return "OH"
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
WeakAurasSaved.CustomTrash.swingRotation = 1
|
||||
WeakAurasSaved.CustomTrash.swingone = 0
|
||||
WeakAurasSaved.CustomTrash.swingtwo = 0
|
||||
@@ -1,103 +1,103 @@
|
||||
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED COMBAT_TICKER_TICK COMBAT_TICKER_FALSE
|
||||
function(e)
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.CombatTimers then WeakAurasSaved.CustomTrash.CombatTimers = {}; aura_env.updateTimers() end
|
||||
if e == "PLAYER_REGEN_ENABLED" then
|
||||
if WeakAurasSaved.CustomTrash.CombatTimers.ticker then WeakAurasSaved.CustomTrash.CombatTimers.ticker:Cancel(); WeakAurasSaved.CustomTrash.CombatTimers.ticker = nil end
|
||||
elseif e == "PLAYER_REGEN_DISABLED" then
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.time = 0
|
||||
WeakAuras.ScanEvents("COMBAT_TICKER_TICK")
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0}
|
||||
aura_env.nextTimer(WeakAurasSaved.CustomTrash.CombatTimers.time)
|
||||
if not WeakAurasSaved.CustomTrash.CombatTimers.ticker then WeakAurasSaved.CustomTrash.CombatTimers.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("COMBAT_TICKER_TICK") end) end
|
||||
elseif e == "COMBAT_TICKER_TICK" then
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.time = WeakAurasSaved.CustomTrash.CombatTimers.time + 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time - 1
|
||||
if WeakAurasSaved.CustomTrash.CombatTimers.timers[WeakAurasSaved.CustomTrash.CombatTimers.time] then
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0}
|
||||
aura_env.nextTimer(WeakAurasSaved.CustomTrash.CombatTimers.time)
|
||||
C_Timer.After(aura_env.config.dur, function() WeakAuras.ScanEvents("COMBAT_TICKER_FALSE") end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--UNTRIGGER
|
||||
function(e)
|
||||
if e == "COMBAT_TICKER_FALSE" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--Aura #2
|
||||
--COMBAT_TICKER_TICK
|
||||
function(e)
|
||||
return true
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local temps = {
|
||||
[1] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.time},
|
||||
[2] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time},
|
||||
[3] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.id},
|
||||
}
|
||||
|
||||
for k,v in ipairs(temps) do
|
||||
while v.res >= 60 do
|
||||
v.m = v.m + 1
|
||||
v.res = v.res - 60
|
||||
end
|
||||
v.s = v.res
|
||||
if v.s < 10 then
|
||||
v.s = string.format("0%d", v.s)
|
||||
end
|
||||
if type(v.s) ~= "string" then tostring(v.s) end
|
||||
end
|
||||
|
||||
return string.format("%d:%s\n%d:%s (%d:%s)", temps[1].m, temps[1].s, temps[2].m, temps[2].s, temps[3].m, temps[3].s)
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.CombatTimers then WeakAurasSaved.CustomTrash.CombatTimers = {} end
|
||||
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0}
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.time = 0
|
||||
|
||||
aura_env.updateTimers = function()
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers = {}
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m1 or 0) * 60) + (aura_env.config.s1 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m2 or 0) * 60) + (aura_env.config.s2 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m3 or 0) * 60) + (aura_env.config.s3 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m4 or 0) * 60) + (aura_env.config.s4 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m5 or 0) * 60) + (aura_env.config.s5 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m6 or 0) * 60) + (aura_env.config.s6 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m7 or 0) * 60) + (aura_env.config.s7 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m8 or 0) * 60) + (aura_env.config.s8 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m9 or 0) * 60) + (aura_env.config.s9 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m10 or 0) * 60) + (aura_env.config.s10 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m11 or 0) * 60) + (aura_env.config.s11 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m12 or 0) * 60) + (aura_env.config.s12 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m13 or 0) * 60) + (aura_env.config.s13 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m14 or 0) * 60) + (aura_env.config.s14 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m15 or 0) * 60) + (aura_env.config.s15 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m16 or 0) * 60) + (aura_env.config.s16 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m17 or 0) * 60) + (aura_env.config.s17 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m18 or 0) * 60) + (aura_env.config.s18 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m19 or 0) * 60) + (aura_env.config.s19 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m20 or 0) * 60) + (aura_env.config.s20 or 0)] = 1
|
||||
end
|
||||
|
||||
aura_env.updateTimers()
|
||||
|
||||
aura_env.nextTimer = function(time)
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.CombatTimers.timers) do
|
||||
local dtime = k - time
|
||||
if dtime < WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time and dtime > 0 then
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time = dtime
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.id = k
|
||||
end
|
||||
end
|
||||
return 0
|
||||
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED COMBAT_TICKER_TICK COMBAT_TICKER_FALSE
|
||||
function(e)
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.CombatTimers then WeakAurasSaved.CustomTrash.CombatTimers = {}; aura_env.updateTimers() end
|
||||
if e == "PLAYER_REGEN_ENABLED" then
|
||||
if WeakAurasSaved.CustomTrash.CombatTimers.ticker then WeakAurasSaved.CustomTrash.CombatTimers.ticker:Cancel(); WeakAurasSaved.CustomTrash.CombatTimers.ticker = nil end
|
||||
elseif e == "PLAYER_REGEN_DISABLED" then
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.time = 0
|
||||
WeakAuras.ScanEvents("COMBAT_TICKER_TICK")
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0}
|
||||
aura_env.nextTimer(WeakAurasSaved.CustomTrash.CombatTimers.time)
|
||||
if not WeakAurasSaved.CustomTrash.CombatTimers.ticker then WeakAurasSaved.CustomTrash.CombatTimers.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("COMBAT_TICKER_TICK") end) end
|
||||
elseif e == "COMBAT_TICKER_TICK" then
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.time = WeakAurasSaved.CustomTrash.CombatTimers.time + 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time - 1
|
||||
if WeakAurasSaved.CustomTrash.CombatTimers.timers[WeakAurasSaved.CustomTrash.CombatTimers.time] then
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0}
|
||||
aura_env.nextTimer(WeakAurasSaved.CustomTrash.CombatTimers.time)
|
||||
C_Timer.After(aura_env.config.dur, function() WeakAuras.ScanEvents("COMBAT_TICKER_FALSE") end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--UNTRIGGER
|
||||
function(e)
|
||||
if e == "COMBAT_TICKER_FALSE" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--Aura #2
|
||||
--COMBAT_TICKER_TICK
|
||||
function(e)
|
||||
return true
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
local temps = {
|
||||
[1] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.time},
|
||||
[2] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time},
|
||||
[3] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.id},
|
||||
}
|
||||
|
||||
for k,v in ipairs(temps) do
|
||||
while v.res >= 60 do
|
||||
v.m = v.m + 1
|
||||
v.res = v.res - 60
|
||||
end
|
||||
v.s = v.res
|
||||
if v.s < 10 then
|
||||
v.s = string.format("0%d", v.s)
|
||||
end
|
||||
if type(v.s) ~= "string" then tostring(v.s) end
|
||||
end
|
||||
|
||||
return string.format("%d:%s\n%d:%s (%d:%s)", temps[1].m, temps[1].s, temps[2].m, temps[2].s, temps[3].m, temps[3].s)
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.CombatTimers then WeakAurasSaved.CustomTrash.CombatTimers = {} end
|
||||
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0}
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.time = 0
|
||||
|
||||
aura_env.updateTimers = function()
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers = {}
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m1 or 0) * 60) + (aura_env.config.s1 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m2 or 0) * 60) + (aura_env.config.s2 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m3 or 0) * 60) + (aura_env.config.s3 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m4 or 0) * 60) + (aura_env.config.s4 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m5 or 0) * 60) + (aura_env.config.s5 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m6 or 0) * 60) + (aura_env.config.s6 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m7 or 0) * 60) + (aura_env.config.s7 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m8 or 0) * 60) + (aura_env.config.s8 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m9 or 0) * 60) + (aura_env.config.s9 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m10 or 0) * 60) + (aura_env.config.s10 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m11 or 0) * 60) + (aura_env.config.s11 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m12 or 0) * 60) + (aura_env.config.s12 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m13 or 0) * 60) + (aura_env.config.s13 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m14 or 0) * 60) + (aura_env.config.s14 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m15 or 0) * 60) + (aura_env.config.s15 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m16 or 0) * 60) + (aura_env.config.s16 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m17 or 0) * 60) + (aura_env.config.s17 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m18 or 0) * 60) + (aura_env.config.s18 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m19 or 0) * 60) + (aura_env.config.s19 or 0)] = 1
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m20 or 0) * 60) + (aura_env.config.s20 or 0)] = 1
|
||||
end
|
||||
|
||||
aura_env.updateTimers()
|
||||
|
||||
aura_env.nextTimer = function(time)
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.CombatTimers.timers) do
|
||||
local dtime = k - time
|
||||
if dtime < WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time and dtime > 0 then
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time = dtime
|
||||
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.id = k
|
||||
end
|
||||
end
|
||||
return 0
|
||||
end
|
||||
@@ -1,65 +1,65 @@
|
||||
--CLEU
|
||||
function(e, ...)
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff("target", i)
|
||||
if name == "Conductive Ink" then
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff("target", i))
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.stacks * aura_env.config.mediandamage
|
||||
end
|
||||
end
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff("target", i, PLAYER)
|
||||
if name == "Conductive Ink" then
|
||||
aura_env.owndebuff.stacks = select(3, UnitDebuff("target", i, PLAYER))
|
||||
aura_env.owndebuff.damage = aura_env.owndebuff.stacks * aura_env.config.mediandamage
|
||||
break
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage)
|
||||
return "Player stacks\nPlayer damage\nTotal stacks\nTotal damage"
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0)
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
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
|
||||
--CLEU
|
||||
function(e, ...)
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff("target", i)
|
||||
if name == "Conductive Ink" then
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff("target", i))
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.stacks * aura_env.config.mediandamage
|
||||
end
|
||||
end
|
||||
for i = 1, 40 do
|
||||
local name = UnitDebuff("target", i, PLAYER)
|
||||
if name == "Conductive Ink" then
|
||||
aura_env.owndebuff.stacks = select(3, UnitDebuff("target", i, PLAYER))
|
||||
aura_env.owndebuff.damage = aura_env.owndebuff.stacks * aura_env.config.mediandamage
|
||||
break
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage)
|
||||
return "Player stacks\nPlayer damage\nTotal stacks\nTotal damage"
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0)
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
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
|
||||
@@ -1,290 +1,290 @@
|
||||
--CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED
|
||||
function(e, ...)
|
||||
if aura_env.config.tsuenable == false then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.damagepercentage = 0
|
||||
local unit = "target"
|
||||
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
|
||||
local bossmax = UnitHealthMax(unit)
|
||||
if aura_env.config.pdmg == true then
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, UnitDebuff(unit, i))
|
||||
local stacks = select(3, UnitDebuff(unit, i))
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage + damage
|
||||
if caster == "player" then aura_env.owndebuff.damage = damage; aura_env.owndebuff.stacks = stacks end
|
||||
end
|
||||
elseif not name then break end
|
||||
end
|
||||
else
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff(unit, i))
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
aura_env.totaldebuff.damage = text:match("inflict (%d+%,?%d*)")
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub("%,", "")
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub(" ", "")
|
||||
aura_env.totaldebuff.damage = tonumber(aura_env.totaldebuff.damage)
|
||||
end
|
||||
break
|
||||
elseif not name then break end
|
||||
end
|
||||
end
|
||||
aura_env.damagepercentage = aura_env.round(((aura_env.totaldebuff.damage / bossmax) * 100), 2)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--TSU
|
||||
--CLEU PLAYER_TARGET_CHANGED
|
||||
function(allstates, e, ...)
|
||||
if aura_env.config.tsuenable == true then
|
||||
local unit = "target"
|
||||
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
|
||||
if UnitExists(unit) then
|
||||
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
|
||||
local pp = hp / maxhp
|
||||
if pp > 0.3 then
|
||||
local totaldamage, totalstacks = 0, 0
|
||||
local maxdamage, maxstacks = {["d"] = 0, ["c"] = ""}, {["s"] = 0, ["c"] = ""}
|
||||
local datatable = {}
|
||||
aura_env.damagepercentage = 0
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" or e == "PLAYER_FOCUS_CHANGED" then
|
||||
for i = 1, #allstates do
|
||||
allstates[i].sub30 = false
|
||||
if i > 1 then
|
||||
allstates[i] = {["show"] = false, ["changed"] = true}
|
||||
end
|
||||
end
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, UnitDebuff(unit, i))
|
||||
local stacks = select(3, UnitDebuff(unit, i))
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
--local damage = i * 23412
|
||||
datatable[caster] = {["damage"] = damage, ["stacks"] = stacks, ["name"] = UnitName(caster), ["class"] = select(3, UnitClass(caster))} --UnitName(caster) UnitClass(caster)
|
||||
if damage > maxdamage.d then maxdamage.d = damage; maxdamage.c = caster; maxstacks.s = stacks; maxstacks.c = caster end
|
||||
totaldamage = totaldamage + damage; totalstacks = totalstacks + stacks
|
||||
end
|
||||
elseif not name then break end
|
||||
end
|
||||
local allstatesindex = 2
|
||||
for k,v in pairs(datatable) do
|
||||
allstates[allstatesindex] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
progressType = "static",
|
||||
caster = v.name,
|
||||
class = v.class,
|
||||
stacks = v.stacks,
|
||||
damage = v.damage,
|
||||
}
|
||||
if aura_env.config.sort == 1 then
|
||||
allstates[allstatesindex].resort = true
|
||||
allstates[allstatesindex].index = v.damage --/ totaldamage
|
||||
allstates[allstatesindex].value = v.damage --/ totaldamage
|
||||
allstates[allstatesindex].total = maxdamage.d
|
||||
elseif aura_env.config.sort == 2 then
|
||||
allstates[allstatesindex].resort = true
|
||||
allstates[allstatesindex].index = v.stacks
|
||||
allstates[allstatesindex].value = v.stacks
|
||||
allstates[allstatesindex].total = totalstacks
|
||||
end
|
||||
allstatesindex = allstatesindex + 1
|
||||
end
|
||||
dmgper = aura_env.round(((totaldamage / maxhp) * 100), 2)
|
||||
allstates[1] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
progressType = "static",
|
||||
caster = "Total",
|
||||
stacks = totalstacks,
|
||||
damage = totaldamage,
|
||||
resort = true,
|
||||
percent = dmgper,
|
||||
index = maxdamage.d + 1,
|
||||
value = maxdamage.d + 1,
|
||||
total = maxdamage.d + 1,
|
||||
}
|
||||
if totalstacks == 0 then totalstacks = 1 end
|
||||
if aura_env.config.sort == 2 then allstates[1].index = totalstacks + 1 end
|
||||
end
|
||||
return true
|
||||
else
|
||||
for i = 1, #allstates do
|
||||
if allstates[i] then
|
||||
allstates[i].show = true
|
||||
allstates[i].changed = true
|
||||
allstates[i].sub30 = true
|
||||
end
|
||||
end
|
||||
allstates[1].percent = "<30"
|
||||
allstates[1].class = 15
|
||||
return true
|
||||
end
|
||||
else
|
||||
for i = 1, #allstates do
|
||||
if allstates[i].sub30 == false or not allstates[i].sub30 then
|
||||
allstates[i] = {["show"] = false, ["changed"] = true}
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--CUSTOM TRIGGER
|
||||
function(t)
|
||||
if aura_env.config.tsuenable == false then return t[1] and t[2] elseif aura_env.config.tsuenable == true then return t[3] and t[2] end
|
||||
end
|
||||
|
||||
--COLOR ANIMATION
|
||||
function()
|
||||
if aura_env.state then
|
||||
return aura_env.classColor(aura_env.state.class)
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.config.tsuenable == false then
|
||||
if aura_env.config.pdmg == true then
|
||||
if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
|
||||
if aura_env.config.stext == true then aura_env.region.text3:SetText("Player stacks\nPlayer damage\nTotal stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
|
||||
else
|
||||
if aura_env.config.sh == true then aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
|
||||
if aura_env.config.stext == true then aura_env.region.text3:SetText("Total stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
|
||||
end
|
||||
else
|
||||
if aura_env.state.caster == "Total" then
|
||||
return aura_env.shorten(aura_env.state.damage) .. " - " .. aura_env.state.stacks .. " - " .. aura_env.state.percent .. "%"
|
||||
else
|
||||
return aura_env.shorten(aura_env.state.damage) .. " - " .. aura_env.state.stacks
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate")
|
||||
aura_env.myTooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
|
||||
if aura_env.config.tsuenable == false then
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0)
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
|
||||
if not aura_env.region.text3 then
|
||||
local text3 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text3 = text3
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text3:SetFont(font, size, flags)
|
||||
aura_env.region.text3:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", - aura_env.config.x, 0)
|
||||
aura_env.region.text3:SetText("")
|
||||
aura_env.region.text3:Show()
|
||||
aura_env.region.bar:Hide()
|
||||
end
|
||||
|
||||
if aura_env.config.tsuenable == true and aura_env.region.text2 then aura_env.region.text2:Hide() end
|
||||
if aura_env.config.tsuenable == true and aura_env.region.text3 then aura_env.region.text3:Hide() end
|
||||
if aura_env.config.tsuenable == true and aura_env.region.bar then aura_env.region.bar:Show() 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.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.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43
|
||||
elseif class == 2 then return 0.96, 0.55, 0.73
|
||||
elseif class == 3 then return 0.67, 0.83, 0.45
|
||||
elseif class == 4 then return 1, 0.96, 0.41, 1
|
||||
elseif class == 5 then return 1, 1, 1
|
||||
elseif class == 6 then return 0.77, 0.12, 0.23
|
||||
elseif class == 7 then return 0, 0.44, 0.87
|
||||
elseif class == 8 then return 0.25, 0.78, 0.92
|
||||
elseif class == 9 then return 0.53, 0.53, 0.93
|
||||
elseif class == 10 then return 0, 1, 0.59
|
||||
elseif class == 11 then return 1, 0.49, 0.04
|
||||
elseif class == 12 then return 0.64, 0.19, 0.79
|
||||
elseif class == 15 then return 0, 1, 0
|
||||
else return 1, 1, 1 end
|
||||
end
|
||||
--TESTING
|
||||
--Conductive Ink 1500960 1 Magic 120 119774.845 player false false 302565 false false true false 1
|
||||
aura_env.UnitDebuffC = function(unit, i)
|
||||
if i == 1 then return "Conductive Ink", 1500960, 1, 2, 120, 119774.845, "Pinko"
|
||||
elseif i == 1 then return "Conductive Ink", 1500960, 3, 4, 120, 119774.845, "Billy"
|
||||
elseif i == 2 then return "Conductive Ink", 1500960, 7, 7, 120, 119774.845, "Mary"
|
||||
elseif i == 3 then return "Conductive Ink", 1500960, 35, 11, 120, 119774.845, "Anna"
|
||||
elseif i == 4 then return "Conductive Ink", 1500960, 8, 6, 120, 119774.845, "John"
|
||||
elseif i == 5 then return "Conductive Ink", 1500960, 72, 2, 120, 119774.845, "Frank"
|
||||
elseif i == 6 then return "Conductive Ink", 1500960, 25, 7, 120, 119774.845, "Emma"
|
||||
elseif i == 7 then return "Conductive Ink", 1500960, 45, 8, 120, 119774.845, "Sophia"
|
||||
elseif i == 8 then return "Conductive Ink", 1500960, 37, 5, 120, 119774.845, "Henry"
|
||||
elseif i == 9 then return "Conductive Ink", 1500960, 4, 3, 120, 119774.845, "Ethan"
|
||||
elseif i == 10 then return "Conductive Ink", 1500960, 1, 1, 120, 119774.845, "Michael"
|
||||
end
|
||||
--CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED
|
||||
function(e, ...)
|
||||
if aura_env.config.tsuenable == false then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.damagepercentage = 0
|
||||
local unit = "target"
|
||||
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
|
||||
local bossmax = UnitHealthMax(unit)
|
||||
if aura_env.config.pdmg == true then
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, UnitDebuff(unit, i))
|
||||
local stacks = select(3, UnitDebuff(unit, i))
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage + damage
|
||||
if caster == "player" then aura_env.owndebuff.damage = damage; aura_env.owndebuff.stacks = stacks end
|
||||
end
|
||||
elseif not name then break end
|
||||
end
|
||||
else
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff(unit, i))
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
aura_env.totaldebuff.damage = text:match("inflict (%d+%,?%d*)")
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub("%,", "")
|
||||
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub(" ", "")
|
||||
aura_env.totaldebuff.damage = tonumber(aura_env.totaldebuff.damage)
|
||||
end
|
||||
break
|
||||
elseif not name then break end
|
||||
end
|
||||
end
|
||||
aura_env.damagepercentage = aura_env.round(((aura_env.totaldebuff.damage / bossmax) * 100), 2)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--TSU
|
||||
--CLEU PLAYER_TARGET_CHANGED
|
||||
function(allstates, e, ...)
|
||||
if aura_env.config.tsuenable == true then
|
||||
local unit = "target"
|
||||
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
|
||||
if UnitExists(unit) then
|
||||
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
|
||||
local pp = hp / maxhp
|
||||
if pp > 0.3 then
|
||||
local totaldamage, totalstacks = 0, 0
|
||||
local maxdamage, maxstacks = {["d"] = 0, ["c"] = ""}, {["s"] = 0, ["c"] = ""}
|
||||
local datatable = {}
|
||||
aura_env.damagepercentage = 0
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" or e == "PLAYER_FOCUS_CHANGED" then
|
||||
for i = 1, #allstates do
|
||||
allstates[i].sub30 = false
|
||||
if i > 1 then
|
||||
allstates[i] = {["show"] = false, ["changed"] = true}
|
||||
end
|
||||
end
|
||||
for i = 1, 200 do
|
||||
local name = UnitDebuff(unit, i)
|
||||
if name == "Conductive Ink" then
|
||||
local caster = select(7, UnitDebuff(unit, i))
|
||||
local stacks = select(3, UnitDebuff(unit, i))
|
||||
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks
|
||||
aura_env.myTooltip:SetUnitDebuff(unit, i)
|
||||
local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
|
||||
if text:match("Falling below %d*%% health will cause") then
|
||||
local damage = text:match("inflict (%d+%,?%d*)")
|
||||
damage = damage:gsub("%,", "")
|
||||
damage = damage:gsub(" ", "")
|
||||
damage = tonumber(damage)
|
||||
--local damage = i * 23412
|
||||
datatable[caster] = {["damage"] = damage, ["stacks"] = stacks, ["name"] = UnitName(caster), ["class"] = select(3, UnitClass(caster))} --UnitName(caster) UnitClass(caster)
|
||||
if damage > maxdamage.d then maxdamage.d = damage; maxdamage.c = caster; maxstacks.s = stacks; maxstacks.c = caster end
|
||||
totaldamage = totaldamage + damage; totalstacks = totalstacks + stacks
|
||||
end
|
||||
elseif not name then break end
|
||||
end
|
||||
local allstatesindex = 2
|
||||
for k,v in pairs(datatable) do
|
||||
allstates[allstatesindex] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
progressType = "static",
|
||||
caster = v.name,
|
||||
class = v.class,
|
||||
stacks = v.stacks,
|
||||
damage = v.damage,
|
||||
}
|
||||
if aura_env.config.sort == 1 then
|
||||
allstates[allstatesindex].resort = true
|
||||
allstates[allstatesindex].index = v.damage --/ totaldamage
|
||||
allstates[allstatesindex].value = v.damage --/ totaldamage
|
||||
allstates[allstatesindex].total = maxdamage.d
|
||||
elseif aura_env.config.sort == 2 then
|
||||
allstates[allstatesindex].resort = true
|
||||
allstates[allstatesindex].index = v.stacks
|
||||
allstates[allstatesindex].value = v.stacks
|
||||
allstates[allstatesindex].total = totalstacks
|
||||
end
|
||||
allstatesindex = allstatesindex + 1
|
||||
end
|
||||
dmgper = aura_env.round(((totaldamage / maxhp) * 100), 2)
|
||||
allstates[1] =
|
||||
{
|
||||
show = true,
|
||||
changed = true,
|
||||
progressType = "static",
|
||||
caster = "Total",
|
||||
stacks = totalstacks,
|
||||
damage = totaldamage,
|
||||
resort = true,
|
||||
percent = dmgper,
|
||||
index = maxdamage.d + 1,
|
||||
value = maxdamage.d + 1,
|
||||
total = maxdamage.d + 1,
|
||||
}
|
||||
if totalstacks == 0 then totalstacks = 1 end
|
||||
if aura_env.config.sort == 2 then allstates[1].index = totalstacks + 1 end
|
||||
end
|
||||
return true
|
||||
else
|
||||
for i = 1, #allstates do
|
||||
if allstates[i] then
|
||||
allstates[i].show = true
|
||||
allstates[i].changed = true
|
||||
allstates[i].sub30 = true
|
||||
end
|
||||
end
|
||||
allstates[1].percent = "<30"
|
||||
allstates[1].class = 15
|
||||
return true
|
||||
end
|
||||
else
|
||||
for i = 1, #allstates do
|
||||
if allstates[i].sub30 == false or not allstates[i].sub30 then
|
||||
allstates[i] = {["show"] = false, ["changed"] = true}
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--CUSTOM TRIGGER
|
||||
function(t)
|
||||
if aura_env.config.tsuenable == false then return t[1] and t[2] elseif aura_env.config.tsuenable == true then return t[3] and t[2] end
|
||||
end
|
||||
|
||||
--COLOR ANIMATION
|
||||
function()
|
||||
if aura_env.statee then
|
||||
return aura_env.classColor(aura_env.statee.class)
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.config.tsuenable == false then
|
||||
if aura_env.config.pdmg == true then
|
||||
if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
|
||||
if aura_env.config.stext == true then aura_env.region.text3:SetText("Player stacks\nPlayer damage\nTotal stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
|
||||
else
|
||||
if aura_env.config.sh == true then aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
|
||||
aura_env.region.text2:SetText(aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
|
||||
if aura_env.config.stext == true then aura_env.region.text3:SetText("Total stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
|
||||
end
|
||||
else
|
||||
if aura_env.statee.caster == "Total" then
|
||||
return aura_env.shorten(aura_env.statee.damage) .. " - " .. aura_env.statee.stacks .. " - " .. aura_env.statee.percent .. "%"
|
||||
else
|
||||
return aura_env.shorten(aura_env.statee.damage) .. " - " .. aura_env.statee.stacks
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate")
|
||||
aura_env.myTooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
||||
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
|
||||
|
||||
if aura_env.config.tsuenable == false then
|
||||
if not aura_env.region.text2 then
|
||||
local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text2 = text2
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text2:SetFont(font, size, flags)
|
||||
aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0)
|
||||
aura_env.region.text2:SetText("")
|
||||
aura_env.region.text2:Show()
|
||||
|
||||
if not aura_env.region.text3 then
|
||||
local text3 = aura_env.region:CreateFontString(nil, aura_env.region)
|
||||
aura_env.region.text3 = text3
|
||||
end
|
||||
local font, size, flags = aura_env.region.text:GetFont()
|
||||
aura_env.region.text3:SetFont(font, size, flags)
|
||||
aura_env.region.text3:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
|
||||
aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", - aura_env.config.x, 0)
|
||||
aura_env.region.text3:SetText("")
|
||||
aura_env.region.text3:Show()
|
||||
aura_env.region.bar:Hide()
|
||||
end
|
||||
|
||||
if aura_env.config.tsuenable == true and aura_env.region.text2 then aura_env.region.text2:Hide() end
|
||||
if aura_env.config.tsuenable == true and aura_env.region.text3 then aura_env.region.text3:Hide() end
|
||||
if aura_env.config.tsuenable == true and aura_env.region.bar then aura_env.region.bar:Show() 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.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.classColor = function(class)
|
||||
if class == 1 then return 0.78, 0.61, 0.43
|
||||
elseif class == 2 then return 0.96, 0.55, 0.73
|
||||
elseif class == 3 then return 0.67, 0.83, 0.45
|
||||
elseif class == 4 then return 1, 0.96, 0.41, 1
|
||||
elseif class == 5 then return 1, 1, 1
|
||||
elseif class == 6 then return 0.77, 0.12, 0.23
|
||||
elseif class == 7 then return 0, 0.44, 0.87
|
||||
elseif class == 8 then return 0.25, 0.78, 0.92
|
||||
elseif class == 9 then return 0.53, 0.53, 0.93
|
||||
elseif class == 10 then return 0, 1, 0.59
|
||||
elseif class == 11 then return 1, 0.49, 0.04
|
||||
elseif class == 12 then return 0.64, 0.19, 0.79
|
||||
elseif class == 15 then return 0, 1, 0
|
||||
else return 1, 1, 1 end
|
||||
end
|
||||
--TESTING
|
||||
--Conductive Ink 1500960 1 Magic 120 119774.845 player false false 302565 false false true false 1
|
||||
aura_env.UnitDebuffC = function(unit, i)
|
||||
if i == 1 then return "Conductive Ink", 1500960, 1, 2, 120, 119774.845, "Pinko"
|
||||
elseif i == 1 then return "Conductive Ink", 1500960, 3, 4, 120, 119774.845, "Billy"
|
||||
elseif i == 2 then return "Conductive Ink", 1500960, 7, 7, 120, 119774.845, "Mary"
|
||||
elseif i == 3 then return "Conductive Ink", 1500960, 35, 11, 120, 119774.845, "Anna"
|
||||
elseif i == 4 then return "Conductive Ink", 1500960, 8, 6, 120, 119774.845, "John"
|
||||
elseif i == 5 then return "Conductive Ink", 1500960, 72, 2, 120, 119774.845, "Frank"
|
||||
elseif i == 6 then return "Conductive Ink", 1500960, 25, 7, 120, 119774.845, "Emma"
|
||||
elseif i == 7 then return "Conductive Ink", 1500960, 45, 8, 120, 119774.845, "Sophia"
|
||||
elseif i == 8 then return "Conductive Ink", 1500960, 37, 5, 120, 119774.845, "Henry"
|
||||
elseif i == 9 then return "Conductive Ink", 1500960, 4, 3, 120, 119774.845, "Ethan"
|
||||
elseif i == 10 then return "Conductive Ink", 1500960, 1, 1, 120, 119774.845, "Michael"
|
||||
end
|
||||
end
|
||||
@@ -1,76 +1,76 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED DRUID_HOTS_REMOVE_HOT UPDATE_WOUNDS
|
||||
function(e, ...)
|
||||
if not WeakAurasSaved.FesteringWounds then WeakAurasSaved.FesteringWounds = {["count"] = 0} end
|
||||
if not WeakAurasSaved.FesteringWounds.ticker then WeakAurasSaved.FesteringWounds.ticker = C_Timer.NewTicker(0.5, function() WeakAuras.ScanEvents("UPDATE_WOUNDS") end) end
|
||||
if e == "UPDATE_WOUNDS" then return true
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local caster = select(5, ...)
|
||||
local spellname = select(13, ...)
|
||||
local stacks = select(16, ...)
|
||||
if se == "SPELL_AURA_APPLIED" or se == "SPELL_AURA_APPLIED_DOSE" or se == "SPELL_AURA_REMOVED" or se == "SPELL_AURA_REMOVED_DOSE" then
|
||||
if caster and caster == UnitName("player") and spellname == "Festering Wound" then
|
||||
local countsum = 0
|
||||
local counted = 0
|
||||
for i = 1, 40 do
|
||||
if UnitExists("nameplate" .. i) then
|
||||
local index = 1
|
||||
while UnitDebuff("nameplate" .. i, index) do
|
||||
local name, _, _, count = UnitDebuff("nameplate" .. i, index)
|
||||
local caster = select(8, UnitDebuff("nameplate" .. i, index))
|
||||
if name == "Festering Wound" then
|
||||
countsum = countsum + count
|
||||
if counted == 0 then counted = 1 end
|
||||
end
|
||||
index = index + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
if counted == 0 and se == "SPELL_AURA_REMOVED" then
|
||||
WeakAurasSaved.FesteringWounds.count = 0
|
||||
end
|
||||
if counted == 1 then
|
||||
WeakAurasSaved.FesteringWounds.count = countsum
|
||||
end
|
||||
--DevTools_Dump(WeakAurasSaved.FesteringWounds)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then
|
||||
WeakAurasSaved.FesteringWounds.count = 0
|
||||
local countsum = 0
|
||||
local counted = 0
|
||||
for i = 1, 40 do
|
||||
if UnitExists("nameplate" .. i) then
|
||||
local index = 1
|
||||
while UnitDebuff("nameplate" .. i, index) do
|
||||
local name, _, _, count = UnitDebuff("nameplate" .. i, index)
|
||||
local caster = select(8, UnitDebuff("nameplate" .. i, index))
|
||||
if name == "Festering Wound" then
|
||||
countsum = countsum + count
|
||||
if counted == 0 then counted = 1 end
|
||||
end
|
||||
index = index + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
if counted == 1 then
|
||||
WeakAurasSaved.FesteringWounds.count = countsum
|
||||
end
|
||||
--DevTools_Dump(WeakAurasSaved.FesteringWounds)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--STACK INFO
|
||||
function()
|
||||
return WeakAurasSaved.FesteringWounds.count
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.FesteringWounds["Spring Blossoms"].count
|
||||
end
|
||||
|
||||
--INIT
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED DRUID_HOTS_REMOVE_HOT UPDATE_WOUNDS
|
||||
function(e, ...)
|
||||
if not WeakAurasSaved.FesteringWounds then WeakAurasSaved.FesteringWounds = {["count"] = 0} end
|
||||
if not WeakAurasSaved.FesteringWounds.ticker then WeakAurasSaved.FesteringWounds.ticker = C_Timer.NewTicker(0.5, function() WeakAuras.ScanEvents("UPDATE_WOUNDS") end) end
|
||||
if e == "UPDATE_WOUNDS" then return true
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local caster = select(5, ...)
|
||||
local spellname = select(13, ...)
|
||||
local stacks = select(16, ...)
|
||||
if se == "SPELL_AURA_APPLIED" or se == "SPELL_AURA_APPLIED_DOSE" or se == "SPELL_AURA_REMOVED" or se == "SPELL_AURA_REMOVED_DOSE" then
|
||||
if caster and caster == UnitName("player") and spellname == "Festering Wound" then
|
||||
local countsum = 0
|
||||
local counted = 0
|
||||
for i = 1, 40 do
|
||||
if UnitExists("nameplate" .. i) then
|
||||
local index = 1
|
||||
while UnitDebuff("nameplate" .. i, index) do
|
||||
local name, _, _, count = UnitDebuff("nameplate" .. i, index)
|
||||
local caster = select(8, UnitDebuff("nameplate" .. i, index))
|
||||
if name == "Festering Wound" then
|
||||
countsum = countsum + count
|
||||
if counted == 0 then counted = 1 end
|
||||
end
|
||||
index = index + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
if counted == 0 and se == "SPELL_AURA_REMOVED" then
|
||||
WeakAurasSaved.FesteringWounds.count = 0
|
||||
end
|
||||
if counted == 1 then
|
||||
WeakAurasSaved.FesteringWounds.count = countsum
|
||||
end
|
||||
--DevTools_Dump(WeakAurasSaved.FesteringWounds)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then
|
||||
WeakAurasSaved.FesteringWounds.count = 0
|
||||
local countsum = 0
|
||||
local counted = 0
|
||||
for i = 1, 40 do
|
||||
if UnitExists("nameplate" .. i) then
|
||||
local index = 1
|
||||
while UnitDebuff("nameplate" .. i, index) do
|
||||
local name, _, _, count = UnitDebuff("nameplate" .. i, index)
|
||||
local caster = select(8, UnitDebuff("nameplate" .. i, index))
|
||||
if name == "Festering Wound" then
|
||||
countsum = countsum + count
|
||||
if counted == 0 then counted = 1 end
|
||||
end
|
||||
index = index + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
if counted == 1 then
|
||||
WeakAurasSaved.FesteringWounds.count = countsum
|
||||
end
|
||||
--DevTools_Dump(WeakAurasSaved.FesteringWounds)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--STACK INFO
|
||||
function()
|
||||
return WeakAurasSaved.FesteringWounds.count
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.FesteringWounds["Spring Blossoms"].count
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.FesteringWounds then WeakAurasSaved.FesteringWounds = {["count"] = 0} end
|
||||
@@ -1,119 +1,119 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED DRUID_HOTS_REMOVE_HOT
|
||||
function(e, ...)
|
||||
if not WeakAurasSaved.DruidHots then
|
||||
WeakAurasSaved.DruidHots = {
|
||||
["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
|
||||
["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timers"] = {}},
|
||||
["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timers"] = {}},
|
||||
["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timers"] = {}},
|
||||
["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timers"] = {}},
|
||||
["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timers"] = {}},
|
||||
["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
|
||||
}
|
||||
end
|
||||
if not WeakAurasSaved.DruidHots.ticker then WeakAurasSaved.DruidHots.ticker = C_Timer.NewTicker(0.5, function() WeakAuras.ScanEvents("UPDATE_HOTS") end) end
|
||||
if e == "DRUID_HOTS_REMOVE_HOT" then
|
||||
local name, id = ...
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
if WeakAurasSaved.DruidHots[name].timers[id] then
|
||||
if WeakAurasSaved.DruidHots[name].timers[id] then WeakAurasSaved.DruidHots[name].timers[id]:Cancel() end
|
||||
WeakAurasSaved.DruidHots[name].timers[id] = nil
|
||||
WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count - 1
|
||||
end
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local caster = select(5, ...)
|
||||
local spellname = select(13, ...)
|
||||
local target = select(10, ...)
|
||||
if se == "SPELL_AURA_APPLIED" then
|
||||
if caster and caster == UnitName("player") then
|
||||
if WeakAurasSaved.DruidHots[spellname] then
|
||||
WeakAurasSaved.DruidHots[spellname].count = WeakAurasSaved.DruidHots[spellname].count + 1
|
||||
WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count] = C_Timer.NewTimer(WeakAurasSaved.DruidHots[spellname].duration * 4, function() WeakAuras.ScanEvents("DRUID_HOTS_REMOVE_HOT", spellname, WeakAurasSaved.DruidHots[spellname].count) end)
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_AURA_REMOVED" then
|
||||
if caster and caster == UnitName("player") then
|
||||
if WeakAurasSaved.DruidHots[spellname] then
|
||||
if WeakAurasSaved.DruidHots[spellname].count > 0 then
|
||||
WeakAurasSaved.DruidHots[spellname].count = WeakAurasSaved.DruidHots[spellname].count - 1
|
||||
if WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1] then WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1]:Cancel(); WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1] = nil end
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then
|
||||
WeakAurasSaved.DruidHots = {
|
||||
["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
|
||||
["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timers"] = {}},
|
||||
["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timers"] = {}},
|
||||
["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timers"] = {}},
|
||||
["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timers"] = {}},
|
||||
["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timers"] = {}},
|
||||
["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
|
||||
}
|
||||
local instance = "party"
|
||||
if IsInRaid() then instance = "raid" end
|
||||
local index = 1
|
||||
--DevTools_Dump(UnitBuff("player", index, "PLAYER"))
|
||||
while UnitBuff("player", index, "PLAYER") do
|
||||
local name = UnitBuff("player", index, "PLAYER")
|
||||
if WeakAurasSaved.DruidHots[name] then
|
||||
WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count + 1
|
||||
end
|
||||
index = index + 1
|
||||
if index > 20 then break end
|
||||
end
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
local index = 1
|
||||
--DevTools_Dump(UnitBuff(instance .. i, index, "PLAYER"))
|
||||
while UnitBuff(instance .. i, index, "PLAYER") do
|
||||
--DevTools_Dump(UnitBuff(instance .. i , index, "PLAYER"))
|
||||
local name = UnitBuff(instance .. i, index, "PLAYER")
|
||||
if WeakAurasSaved.DruidHots[name] then
|
||||
WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count + 1
|
||||
end
|
||||
index = index + 1
|
||||
if index > 20 then break end
|
||||
end
|
||||
end
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.DruidHots["Spring Blossoms"].count
|
||||
end
|
||||
|
||||
--Mana bar
|
||||
--DISPLAY
|
||||
function()
|
||||
local mana = UnitPower("player", 0)
|
||||
if mana >= 1e3 and mana < 1e6 then
|
||||
mana = string.format("%.1fk", mana / 1e3)
|
||||
elseif mana >= 1e6 and mana < 1e9 then
|
||||
mana = string.format("%.1fM", mana / 1e6)
|
||||
end
|
||||
return mana
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.DruidHots then
|
||||
WeakAurasSaved.DruidHots = {
|
||||
["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timer"] = nil},
|
||||
["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timer"] = nil},
|
||||
["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timer"] = nil},
|
||||
["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timer"] = nil},
|
||||
["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timer"] = nil},
|
||||
["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timer"] = nil},
|
||||
["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timer"] = nil},
|
||||
}
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED DRUID_HOTS_REMOVE_HOT
|
||||
function(e, ...)
|
||||
if not WeakAurasSaved.DruidHots then
|
||||
WeakAurasSaved.DruidHots = {
|
||||
["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
|
||||
["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timers"] = {}},
|
||||
["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timers"] = {}},
|
||||
["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timers"] = {}},
|
||||
["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timers"] = {}},
|
||||
["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timers"] = {}},
|
||||
["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
|
||||
}
|
||||
end
|
||||
if not WeakAurasSaved.DruidHots.ticker then WeakAurasSaved.DruidHots.ticker = C_Timer.NewTicker(0.5, function() WeakAuras.ScanEvents("UPDATE_HOTS") end) end
|
||||
if e == "DRUID_HOTS_REMOVE_HOT" then
|
||||
local name, id = ...
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
if WeakAurasSaved.DruidHots[name].timers[id] then
|
||||
if WeakAurasSaved.DruidHots[name].timers[id] then WeakAurasSaved.DruidHots[name].timers[id]:Cancel() end
|
||||
WeakAurasSaved.DruidHots[name].timers[id] = nil
|
||||
WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count - 1
|
||||
end
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, ...)
|
||||
local caster = select(5, ...)
|
||||
local spellname = select(13, ...)
|
||||
local target = select(10, ...)
|
||||
if se == "SPELL_AURA_APPLIED" then
|
||||
if caster and caster == UnitName("player") then
|
||||
if WeakAurasSaved.DruidHots[spellname] then
|
||||
WeakAurasSaved.DruidHots[spellname].count = WeakAurasSaved.DruidHots[spellname].count + 1
|
||||
WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count] = C_Timer.NewTimer(WeakAurasSaved.DruidHots[spellname].duration * 4, function() WeakAuras.ScanEvents("DRUID_HOTS_REMOVE_HOT", spellname, WeakAurasSaved.DruidHots[spellname].count) end)
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
end
|
||||
end
|
||||
elseif se == "SPELL_AURA_REMOVED" then
|
||||
if caster and caster == UnitName("player") then
|
||||
if WeakAurasSaved.DruidHots[spellname] then
|
||||
if WeakAurasSaved.DruidHots[spellname].count > 0 then
|
||||
WeakAurasSaved.DruidHots[spellname].count = WeakAurasSaved.DruidHots[spellname].count - 1
|
||||
if WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1] then WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1]:Cancel(); WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1] = nil end
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then
|
||||
WeakAurasSaved.DruidHots = {
|
||||
["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
|
||||
["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timers"] = {}},
|
||||
["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timers"] = {}},
|
||||
["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timers"] = {}},
|
||||
["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timers"] = {}},
|
||||
["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timers"] = {}},
|
||||
["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
|
||||
}
|
||||
local instance = "party"
|
||||
if IsInRaid() then instance = "raid" end
|
||||
local index = 1
|
||||
--DevTools_Dump(UnitBuff("player", index, "PLAYER"))
|
||||
while UnitBuff("player", index, "PLAYER") do
|
||||
local name = UnitBuff("player", index, "PLAYER")
|
||||
if WeakAurasSaved.DruidHots[name] then
|
||||
WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count + 1
|
||||
end
|
||||
index = index + 1
|
||||
if index > 20 then break end
|
||||
end
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
local index = 1
|
||||
--DevTools_Dump(UnitBuff(instance .. i, index, "PLAYER"))
|
||||
while UnitBuff(instance .. i, index, "PLAYER") do
|
||||
--DevTools_Dump(UnitBuff(instance .. i , index, "PLAYER"))
|
||||
local name = UnitBuff(instance .. i, index, "PLAYER")
|
||||
if WeakAurasSaved.DruidHots[name] then
|
||||
WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count + 1
|
||||
end
|
||||
index = index + 1
|
||||
if index > 20 then break end
|
||||
end
|
||||
end
|
||||
--DevTools_Dump(WeakAurasSaved.DruidHots)
|
||||
WeakAuras.ScanEvents("UPDATE_HOTS")
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.DruidHots["Spring Blossoms"].count
|
||||
end
|
||||
|
||||
--Mana bar
|
||||
--DISPLAY
|
||||
function()
|
||||
local mana = UnitPower("player", 0)
|
||||
if mana >= 1e3 and mana < 1e6 then
|
||||
mana = string.format("%.1fk", mana / 1e3)
|
||||
elseif mana >= 1e6 and mana < 1e9 then
|
||||
mana = string.format("%.1fM", mana / 1e6)
|
||||
end
|
||||
return mana
|
||||
end
|
||||
|
||||
--INIT
|
||||
if not WeakAurasSaved.DruidHots then
|
||||
WeakAurasSaved.DruidHots = {
|
||||
["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timer"] = nil},
|
||||
["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timer"] = nil},
|
||||
["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timer"] = nil},
|
||||
["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timer"] = nil},
|
||||
["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timer"] = nil},
|
||||
["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timer"] = nil},
|
||||
["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timer"] = nil},
|
||||
}
|
||||
end
|
||||
@@ -1,203 +1,203 @@
|
||||
--Idea:
|
||||
--Get loot from everyone
|
||||
--Put loot in table sorted with everyone
|
||||
--If AH visit get prices of boe items? and DE mats
|
||||
--In item table add value in vendor, AH and DE
|
||||
--Add option to export all to excel
|
||||
--Add timer (toggleable?) with a button and macro
|
||||
--Add option to mark significant items, idk how maybe use macro maybe some sort of button
|
||||
--Use only for guildies
|
||||
--Maybe reminder to turn timer on
|
||||
--Maybe individual member timer
|
||||
--Sort table by member > item > iteminfo
|
||||
--Where member holds time and key is name
|
||||
--Maybe use time as start and endtime
|
||||
--Maybe establish comms with other weakauras to make sure times are synced
|
||||
--Add gold / hour !!
|
||||
--Maybe add split gold f(totalgold, membertimespent)?
|
||||
--Google sheets uses tab for column seperation and newline for row seperation !!
|
||||
--Make into addon not weakaura
|
||||
|
||||
--CHAT_MSG_LOOT AUCTION_HOUSE_SHOW AUCTION_ITEM_LIST_UPDATE AH_READY
|
||||
function(e, msg)
|
||||
if e == "CHAT_MSG_LOOT" then
|
||||
if msg then
|
||||
local who = msg:match("%w+")
|
||||
if who == "You" then who = UnitName("player") end
|
||||
if who:match("(-)") then who:match("(.+)-%w*") end
|
||||
local howmuch = msg:match("(x%d+).$")
|
||||
local link
|
||||
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
|
||||
link = itemLink
|
||||
end
|
||||
local itemName, _, itemQuality, _, _, itemType = GetItemInfo(link)
|
||||
local itemLevel = GetDetailedItemLevelInfo(link)
|
||||
if itemQuality > 1 then
|
||||
if not aura_env.lootTable[who] then aura_env.lootTable[who] = {["items"] = {}} end
|
||||
if not aura_env.lootTable[who].items[itemName] then
|
||||
aura_env.lootTable[who].items[itemName] = {
|
||||
["name"] = itemName,
|
||||
["vendor"] = select(11, GetItemInfo(link)),
|
||||
["quantity"] = howmuch or 1,
|
||||
}
|
||||
--Handles DE price prediction
|
||||
--if itemType == "Armor" or itemType == "Weapon" then
|
||||
-- print("itemLevel", itemLevel)
|
||||
-- if itemLevel >= 45 and itemLevel <= 55 then
|
||||
-- local price = 0
|
||||
-- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[1]) do
|
||||
-- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k])
|
||||
-- end
|
||||
-- price = price * (howmuch or 1)
|
||||
-- aura_env.lootTable[who].items[itemName].DE = price
|
||||
-- DevTools_Dump(aura_env.lootTable)
|
||||
-- elseif itemLevel >= 56 then
|
||||
-- local price = 0
|
||||
-- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[2]) do
|
||||
-- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k])
|
||||
-- end
|
||||
-- price = price * (howmuch or 1)
|
||||
-- aura_env.lootTable[who].items[itemName].DE = price
|
||||
-- DevTools_Dump(aura_env.lootTable)
|
||||
-- elseif itemLevel > 58 and itemLevel < 77 and itemQuality == 4 then
|
||||
-- local price = 0
|
||||
-- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[3]) do
|
||||
-- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k])
|
||||
-- end
|
||||
-- price = price * (howmuch or 1)
|
||||
-- aura_env.lootTable[who].items[itemName].DE = price
|
||||
-- DevTools_Dump(aura_env.lootTable)
|
||||
-- end
|
||||
--end
|
||||
if WeakAurasSaved.LootLog.Notables[itemName] then
|
||||
aura_env.lootTable[who].items[itemName].AH = WeakAurasSaved.LootLog.Notables[itemName]
|
||||
end
|
||||
else
|
||||
aura_env.lootTable[who].items[itemName].quantity = aura_env.lootTable[who].items[itemName].quantity + 1
|
||||
end
|
||||
end
|
||||
DevTools_Dump(aura_env.lootTable)
|
||||
--DevTools_Dump(WeakAurasSaved.LootLog)
|
||||
end
|
||||
elseif e == "AUCTION_HOUSE_SHOW" then
|
||||
DevTools_Dump(WeakAurasSaved.LootLog.AHPrices)
|
||||
if aura_env.i == 1 then
|
||||
QueryAuctionItems("Illusion Dust")
|
||||
print("Querry", "Illusion Dust")
|
||||
end
|
||||
--Querry update that fires item list update then get item info from like a page or two and get median value if the spread isn't too much
|
||||
elseif e == "AUCTION_ITEM_LIST_UPDATE" then
|
||||
--Get auction info
|
||||
if not aura_env.timer then
|
||||
SortAuctionSetSort("list", "buyout")
|
||||
SortAuctionApplySort("list")
|
||||
end
|
||||
if aura_env.timer then aura_env.timer:Cancel(); aura_env.timer = nil end
|
||||
if not aura_env.timer then aura_env.timer = C_Timer.NewTimer(1, function() WeakAuras.ScanEvents("AH_READY") end) end
|
||||
elseif e == "AH_READY" then
|
||||
if aura_env.timer then aura_env.timer = nil end
|
||||
local masterName, masterID
|
||||
if aura_env.i == 1 then
|
||||
masterName = "Illusion Dust"
|
||||
masterID = "ID"
|
||||
elseif aura_env.i == 2 then
|
||||
masterName = "Dream Dust"
|
||||
masterID = "DD"
|
||||
elseif aura_env.i == 3 then
|
||||
masterName = "Small Brillaint Shard"
|
||||
masterID = "SBS"
|
||||
elseif aura_env.i == 4 then
|
||||
masterName = "Large Brilliant Shard"
|
||||
masterID = "LBS"
|
||||
elseif aura_env.i == 5 then
|
||||
masterName = "Lesser Eternal Essence"
|
||||
masterID = "LEE"
|
||||
elseif aura_env.i == 6 then
|
||||
masterName = "Greater Eternal Essence"
|
||||
masterID = "GEE"
|
||||
end
|
||||
for i = 1, GetNumAuctionItems("list") do
|
||||
local name, _, count = GetAuctionItemInfo("list", i)
|
||||
local buyoutPrice = select(10, GetAuctionItemInfo("list", i))
|
||||
if name == masterName then
|
||||
local pricePerEach = buyoutPrice / count
|
||||
if WeakAurasSaved.LootLog.AHPrices[masterID] == 0 then
|
||||
WeakAurasSaved.LootLog.AHPrices[masterID] = pricePerEach
|
||||
else
|
||||
WeakAurasSaved.LootLog.AHPrices[masterID] = (WeakAurasSaved.LootLog.AHPrices[masterID] + pricePerEach) / 2
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.i = aura_env.i + 1
|
||||
if WeakAurasSaved.LootLog.AHPrices[masterID] then WeakAurasSaved.LootLog.AHPrices[masterID] = math.floor(WeakAurasSaved.LootLog.AHPrices[masterID]) end
|
||||
--DevTools_Dump(WeakAurasSaved.LootLog.AHPrices)
|
||||
if aura_env.i == 1 then
|
||||
masterName = "Illusion Dust"
|
||||
masterID = "ID"
|
||||
elseif aura_env.i == 2 then
|
||||
masterName = "Dream Dust"
|
||||
masterID = "DD"
|
||||
elseif aura_env.i == 3 then
|
||||
masterName = "Small Brillaint Shard"
|
||||
masterID = "SBS"
|
||||
elseif aura_env.i == 4 then
|
||||
masterName = "Large Brilliant Shard"
|
||||
masterID = "LBS"
|
||||
elseif aura_env.i == 5 then
|
||||
masterName = "Lesser Eternal Essence"
|
||||
masterID = "LEE"
|
||||
elseif aura_env.i == 6 then
|
||||
masterName = "Greater Eternal Essence"
|
||||
masterID = "GEE"
|
||||
elseif aura_env.i > 6 then
|
||||
print("AH Scan complete")
|
||||
DevTools_Dump(WeakAurasSaved.LootLog.AHPrices)
|
||||
masterName = nil
|
||||
masterID = nil
|
||||
aura_env.i = 1
|
||||
end
|
||||
if masterName then
|
||||
QueryAuctionItems(masterName)
|
||||
print("Querry", masterName)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.i = 1
|
||||
aura_env.lootTable = {}
|
||||
if not WeakAurasSaved.LootLog then WeakAurasSaved.LootLog = {} end
|
||||
if not WeakAurasSaved.LootLog.AHPrices then
|
||||
WeakAurasSaved.LootLog.AHPrices = {
|
||||
["ID"] = 0,
|
||||
["DD"] = 0,
|
||||
["SBS"] = 0,
|
||||
["LBS"] = 0,
|
||||
["LEE"] = 0,
|
||||
["GEE"] = 0,
|
||||
}
|
||||
end
|
||||
if not WeakAurasSaved.LootLog.DEStats then
|
||||
WeakAurasSaved.LootLog.DEStats = {
|
||||
--<45,55>
|
||||
[1] = {
|
||||
["DD"] = 0,
|
||||
["SBS"] = 0,
|
||||
["LBS"] = 0,
|
||||
["LEE"] = 0,
|
||||
["GEE"] = 0,
|
||||
["GME"] = 0,
|
||||
},
|
||||
--<56,65>
|
||||
[2] = {
|
||||
["ID"] = 2.8699,
|
||||
["LBS"] = 0.018,
|
||||
["GEE"] = 0.4,
|
||||
},
|
||||
--Purple items between 59 and 78
|
||||
[3] = {
|
||||
["LBS"] = 0,
|
||||
},
|
||||
}
|
||||
end
|
||||
--Idea:
|
||||
--Get loot from everyone
|
||||
--Put loot in table sorted with everyone
|
||||
--If AH visit get prices of boe items? and DE mats
|
||||
--In item table add value in vendor, AH and DE
|
||||
--Add option to export all to excel
|
||||
--Add timer (toggleable?) with a button and macro
|
||||
--Add option to mark significant items, idk how maybe use macro maybe some sort of button
|
||||
--Use only for guildies
|
||||
--Maybe reminder to turn timer on
|
||||
--Maybe individual member timer
|
||||
--Sort table by member > item > iteminfo
|
||||
--Where member holds time and key is name
|
||||
--Maybe use time as start and endtime
|
||||
--Maybe establish comms with other weakauras to make sure times are synced
|
||||
--Add gold / hour !!
|
||||
--Maybe add split gold f(totalgold, membertimespent)?
|
||||
--Google sheets uses tab for column seperation and newline for row seperation !!
|
||||
--Make into addon not weakaura
|
||||
|
||||
--CHAT_MSG_LOOT AUCTION_HOUSE_SHOW AUCTION_ITEM_LIST_UPDATE AH_READY
|
||||
function(e, msg)
|
||||
if e == "CHAT_MSG_LOOT" then
|
||||
if msg then
|
||||
local who = msg:match("%w+")
|
||||
if who == "You" then who = UnitName("player") end
|
||||
if who:match("(-)") then who:match("(.+)-%w*") end
|
||||
local howmuch = msg:match("(x%d+).$")
|
||||
local link
|
||||
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
|
||||
link = itemLink
|
||||
end
|
||||
local itemName, _, itemQuality, _, _, itemType = GetItemInfo(link)
|
||||
local itemLevel = GetDetailedItemLevelInfo(link)
|
||||
if itemQuality > 1 then
|
||||
if not aura_env.lootTable[who] then aura_env.lootTable[who] = {["items"] = {}} end
|
||||
if not aura_env.lootTable[who].items[itemName] then
|
||||
aura_env.lootTable[who].items[itemName] = {
|
||||
["name"] = itemName,
|
||||
["vendor"] = select(11, GetItemInfo(link)),
|
||||
["quantity"] = howmuch or 1,
|
||||
}
|
||||
--Handles DE price prediction
|
||||
--if itemType == "Armor" or itemType == "Weapon" then
|
||||
-- print("itemLevel", itemLevel)
|
||||
-- if itemLevel >= 45 and itemLevel <= 55 then
|
||||
-- local price = 0
|
||||
-- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[1]) do
|
||||
-- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k])
|
||||
-- end
|
||||
-- price = price * (howmuch or 1)
|
||||
-- aura_env.lootTable[who].items[itemName].DE = price
|
||||
-- DevTools_Dump(aura_env.lootTable)
|
||||
-- elseif itemLevel >= 56 then
|
||||
-- local price = 0
|
||||
-- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[2]) do
|
||||
-- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k])
|
||||
-- end
|
||||
-- price = price * (howmuch or 1)
|
||||
-- aura_env.lootTable[who].items[itemName].DE = price
|
||||
-- DevTools_Dump(aura_env.lootTable)
|
||||
-- elseif itemLevel > 58 and itemLevel < 77 and itemQuality == 4 then
|
||||
-- local price = 0
|
||||
-- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[3]) do
|
||||
-- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k])
|
||||
-- end
|
||||
-- price = price * (howmuch or 1)
|
||||
-- aura_env.lootTable[who].items[itemName].DE = price
|
||||
-- DevTools_Dump(aura_env.lootTable)
|
||||
-- end
|
||||
--end
|
||||
if WeakAurasSaved.LootLog.Notables[itemName] then
|
||||
aura_env.lootTable[who].items[itemName].AH = WeakAurasSaved.LootLog.Notables[itemName]
|
||||
end
|
||||
else
|
||||
aura_env.lootTable[who].items[itemName].quantity = aura_env.lootTable[who].items[itemName].quantity + 1
|
||||
end
|
||||
end
|
||||
DevTools_Dump(aura_env.lootTable)
|
||||
--DevTools_Dump(WeakAurasSaved.LootLog)
|
||||
end
|
||||
elseif e == "AUCTION_HOUSE_SHOW" then
|
||||
DevTools_Dump(WeakAurasSaved.LootLog.AHPrices)
|
||||
if aura_env.i == 1 then
|
||||
QueryAuctionItems("Illusion Dust")
|
||||
print("Querry", "Illusion Dust")
|
||||
end
|
||||
--Querry update that fires item list update then get item info from like a page or two and get median value if the spread isn't too much
|
||||
elseif e == "AUCTION_ITEM_LIST_UPDATE" then
|
||||
--Get auction info
|
||||
if not aura_env.timer then
|
||||
SortAuctionSetSort("list", "buyout")
|
||||
SortAuctionApplySort("list")
|
||||
end
|
||||
if aura_env.timer then aura_env.timer:Cancel(); aura_env.timer = nil end
|
||||
if not aura_env.timer then aura_env.timer = C_Timer.NewTimer(1, function() WeakAuras.ScanEvents("AH_READY") end) end
|
||||
elseif e == "AH_READY" then
|
||||
if aura_env.timer then aura_env.timer = nil end
|
||||
local masterName, masterID
|
||||
if aura_env.i == 1 then
|
||||
masterName = "Illusion Dust"
|
||||
masterID = "ID"
|
||||
elseif aura_env.i == 2 then
|
||||
masterName = "Dream Dust"
|
||||
masterID = "DD"
|
||||
elseif aura_env.i == 3 then
|
||||
masterName = "Small Brillaint Shard"
|
||||
masterID = "SBS"
|
||||
elseif aura_env.i == 4 then
|
||||
masterName = "Large Brilliant Shard"
|
||||
masterID = "LBS"
|
||||
elseif aura_env.i == 5 then
|
||||
masterName = "Lesser Eternal Essence"
|
||||
masterID = "LEE"
|
||||
elseif aura_env.i == 6 then
|
||||
masterName = "Greater Eternal Essence"
|
||||
masterID = "GEE"
|
||||
end
|
||||
for i = 1, GetNumAuctionItems("list") do
|
||||
local name, _, count = GetAuctionItemInfo("list", i)
|
||||
local buyoutPrice = select(10, GetAuctionItemInfo("list", i))
|
||||
if name == masterName then
|
||||
local pricePerEach = buyoutPrice / count
|
||||
if WeakAurasSaved.LootLog.AHPrices[masterID] == 0 then
|
||||
WeakAurasSaved.LootLog.AHPrices[masterID] = pricePerEach
|
||||
else
|
||||
WeakAurasSaved.LootLog.AHPrices[masterID] = (WeakAurasSaved.LootLog.AHPrices[masterID] + pricePerEach) / 2
|
||||
end
|
||||
end
|
||||
end
|
||||
aura_env.i = aura_env.i + 1
|
||||
if WeakAurasSaved.LootLog.AHPrices[masterID] then WeakAurasSaved.LootLog.AHPrices[masterID] = math.floor(WeakAurasSaved.LootLog.AHPrices[masterID]) end
|
||||
--DevTools_Dump(WeakAurasSaved.LootLog.AHPrices)
|
||||
if aura_env.i == 1 then
|
||||
masterName = "Illusion Dust"
|
||||
masterID = "ID"
|
||||
elseif aura_env.i == 2 then
|
||||
masterName = "Dream Dust"
|
||||
masterID = "DD"
|
||||
elseif aura_env.i == 3 then
|
||||
masterName = "Small Brillaint Shard"
|
||||
masterID = "SBS"
|
||||
elseif aura_env.i == 4 then
|
||||
masterName = "Large Brilliant Shard"
|
||||
masterID = "LBS"
|
||||
elseif aura_env.i == 5 then
|
||||
masterName = "Lesser Eternal Essence"
|
||||
masterID = "LEE"
|
||||
elseif aura_env.i == 6 then
|
||||
masterName = "Greater Eternal Essence"
|
||||
masterID = "GEE"
|
||||
elseif aura_env.i > 6 then
|
||||
print("AH Scan complete")
|
||||
DevTools_Dump(WeakAurasSaved.LootLog.AHPrices)
|
||||
masterName = nil
|
||||
masterID = nil
|
||||
aura_env.i = 1
|
||||
end
|
||||
if masterName then
|
||||
QueryAuctionItems(masterName)
|
||||
print("Querry", masterName)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.i = 1
|
||||
aura_env.lootTable = {}
|
||||
if not WeakAurasSaved.LootLog then WeakAurasSaved.LootLog = {} end
|
||||
if not WeakAurasSaved.LootLog.AHPrices then
|
||||
WeakAurasSaved.LootLog.AHPrices = {
|
||||
["ID"] = 0,
|
||||
["DD"] = 0,
|
||||
["SBS"] = 0,
|
||||
["LBS"] = 0,
|
||||
["LEE"] = 0,
|
||||
["GEE"] = 0,
|
||||
}
|
||||
end
|
||||
if not WeakAurasSaved.LootLog.DEStats then
|
||||
WeakAurasSaved.LootLog.DEStats = {
|
||||
--<45,55>
|
||||
[1] = {
|
||||
["DD"] = 0,
|
||||
["SBS"] = 0,
|
||||
["LBS"] = 0,
|
||||
["LEE"] = 0,
|
||||
["GEE"] = 0,
|
||||
["GME"] = 0,
|
||||
},
|
||||
--<56,65>
|
||||
[2] = {
|
||||
["ID"] = 2.8699,
|
||||
["LBS"] = 0.018,
|
||||
["GEE"] = 0.4,
|
||||
},
|
||||
--Purple items between 59 and 78
|
||||
[3] = {
|
||||
["LBS"] = 0,
|
||||
},
|
||||
}
|
||||
end
|
||||
if not WeakAurasSaved.LootLog.Notables then WeakAurasSaved.LootLog.Notables = {} end
|
||||
@@ -1,49 +1,49 @@
|
||||
--GROUP_ROSTER_UPDATE COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(allstates, e, ...)
|
||||
if e == "GROUP_ROSTER_UPDATE" then
|
||||
aura_env.playerList = {}
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
local u = "raid" .. i
|
||||
if select(3, UnitClass(u)) == 2 then
|
||||
if not aura_env.playerList[UnitName(u)] then aura_env.playerList[UnitName(u)] = u end
|
||||
if not allstates[UnitName(u)] then allstates[UnitName(u)] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
name = UnitName(u),
|
||||
unit = u,
|
||||
class = UnitClass(u),
|
||||
resort = true,
|
||||
cd = 0,
|
||||
cdtotal = 20,
|
||||
index = 0,
|
||||
progressType = "static",
|
||||
value = 0,
|
||||
total = 1,
|
||||
} end
|
||||
end
|
||||
end
|
||||
return true
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local caster = select(5, ...)
|
||||
if aura_env.playerList[caster] then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local spellname = select(13, ...)
|
||||
if spellname == "Consecration" then
|
||||
if allstates[caster] then
|
||||
allstates[caster].progressType = "timed"
|
||||
allstates[caster].duration = 7.57
|
||||
allstates[caster].expirationTime = GetTime() + 7.57
|
||||
allstates[caster].index = GetTime() + 7.57
|
||||
allstates[caster].resort = true
|
||||
allstates[caster].changed = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
--GROUP_ROSTER_UPDATE COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(allstates, e, ...)
|
||||
if e == "GROUP_ROSTER_UPDATE" then
|
||||
aura_env.playerList = {}
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
local u = "raid" .. i
|
||||
if select(3, UnitClass(u)) == 2 then
|
||||
if not aura_env.playerList[UnitName(u)] then aura_env.playerList[UnitName(u)] = u end
|
||||
if not allstates[UnitName(u)] then allstates[UnitName(u)] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
name = UnitName(u),
|
||||
unit = u,
|
||||
class = UnitClass(u),
|
||||
resort = true,
|
||||
cd = 0,
|
||||
cdtotal = 20,
|
||||
index = 0,
|
||||
progressType = "static",
|
||||
value = 0,
|
||||
total = 1,
|
||||
} end
|
||||
end
|
||||
end
|
||||
return true
|
||||
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local caster = select(5, ...)
|
||||
if aura_env.playerList[caster] then
|
||||
local se = select(2, ...)
|
||||
if se == "SPELL_CAST_SUCCESS" then
|
||||
local spellname = select(13, ...)
|
||||
if spellname == "Consecration" then
|
||||
if allstates[caster] then
|
||||
allstates[caster].progressType = "timed"
|
||||
allstates[caster].duration = 7.57
|
||||
allstates[caster].expirationTime = GetTime() + 7.57
|
||||
allstates[caster].index = GetTime() + 7.57
|
||||
allstates[caster].resort = true
|
||||
allstates[caster].changed = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.playerList = {}
|
||||
@@ -1,40 +1,40 @@
|
||||
There are more things these weakauras can do but it might be a pain to understand/read/care; this is what I got sidetracked doing
|
||||
It is possible to tell the 4th-row aura to look for all cooldowns (in your spellbook) or to exclude/whitelist some; for example
|
||||
You can tell it to find all spells with cooldowns in your spellbook except for Life Cocoon; likewise, you can tell it to only find Life Cocoon
|
||||
There also are two modes this aura can appear in, one sorts the spells by their cooldown (so a 30s spell would be first, a 1 min spell second and so on) and the other sorts them by their active cooldown (so ready spells are always first and last are spells on cooldown sorted by their remaining cooldown)
|
||||
|
||||
I got carried away designing this and I think there would be no point withholding it from you so, feature-full it is
|
||||
|
||||
To begin, it has two modes of display (as mentioned previously) and this is how you toggle between them (ran in the chat of course)
|
||||
|
||||
/run WeakAuras.ScanEvents("COOLDOWN_MANAGER_SWITCH_MODES")
|
||||
|
||||
I also mentioned it being able to switch between whitelisted and blacklisted spells and this is how that's done (currently there is no way to tell what mode it's in other than looking at the actual aura and seeing for yourself (There is no output other than 0 and 1))
|
||||
|
||||
/run WeakAuras.ScanEvents("COOLDOWN_MANAGER_SWITCH_SCAN_MODES")
|
||||
|
||||
What the above command essentially does is tells the aura to either look for the spells we want or those we don't want; once it is in either mode we also need to tell it what to look for
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_ADD", "<SPELL NAME OR ID>")
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", "<SPELL NAME OR ID>")
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_ADD", "<SPELL NAME OR ID>")
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_REMOVE", "<SPELL NAME OR ID>")
|
||||
|
||||
You can use these commands to either whitelist or blacklist spells using their name or their ID; if you wanted the aura to NOT show Chi Wave you would do
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_ADD", "Chi Wave")
|
||||
|
||||
And if you wanted it to show Chi Wave again you would do
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", "Chi Wave")
|
||||
|
||||
Few things to note here are if you want to use spell names you must place them in quotation marks however if you want to use ID's you may not use quotation marks; so an ID example would be and also if the aura is in Whitelisted mode (showing only the spells you told it to) the exclusion table/list will have no effect on it and adding or removing spells to it will not change the behavior, similarly if the aura is in Exclusion/Blacklist mode the whitelisted list will have no effect on it
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", 115008)
|
||||
|
||||
And finally to check what spells are blacklisted or whitelisted you would do
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_LIST")
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_LIST")
|
||||
|
||||
There are more things these weakauras can do but it might be a pain to understand/read/care; this is what I got sidetracked doing
|
||||
It is possible to tell the 4th-row aura to look for all cooldowns (in your spellbook) or to exclude/whitelist some; for example
|
||||
You can tell it to find all spells with cooldowns in your spellbook except for Life Cocoon; likewise, you can tell it to only find Life Cocoon
|
||||
There also are two modes this aura can appear in, one sorts the spells by their cooldown (so a 30s spell would be first, a 1 min spell second and so on) and the other sorts them by their active cooldown (so ready spells are always first and last are spells on cooldown sorted by their remaining cooldown)
|
||||
|
||||
I got carried away designing this and I think there would be no point withholding it from you so, feature-full it is
|
||||
|
||||
To begin, it has two modes of display (as mentioned previously) and this is how you toggle between them (ran in the chat of course)
|
||||
|
||||
/run WeakAuras.ScanEvents("COOLDOWN_MANAGER_SWITCH_MODES")
|
||||
|
||||
I also mentioned it being able to switch between whitelisted and blacklisted spells and this is how that's done (currently there is no way to tell what mode it's in other than looking at the actual aura and seeing for yourself (There is no output other than 0 and 1))
|
||||
|
||||
/run WeakAuras.ScanEvents("COOLDOWN_MANAGER_SWITCH_SCAN_MODES")
|
||||
|
||||
What the above command essentially does is tells the aura to either look for the spells we want or those we don't want; once it is in either mode we also need to tell it what to look for
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_ADD", "<SPELL NAME OR ID>")
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", "<SPELL NAME OR ID>")
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_ADD", "<SPELL NAME OR ID>")
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_REMOVE", "<SPELL NAME OR ID>")
|
||||
|
||||
You can use these commands to either whitelist or blacklist spells using their name or their ID; if you wanted the aura to NOT show Chi Wave you would do
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_ADD", "Chi Wave")
|
||||
|
||||
And if you wanted it to show Chi Wave again you would do
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", "Chi Wave")
|
||||
|
||||
Few things to note here are if you want to use spell names you must place them in quotation marks however if you want to use ID's you may not use quotation marks; so an ID example would be and also if the aura is in Whitelisted mode (showing only the spells you told it to) the exclusion table/list will have no effect on it and adding or removing spells to it will not change the behavior, similarly if the aura is in Exclusion/Blacklist mode the whitelisted list will have no effect on it
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", 115008)
|
||||
|
||||
And finally to check what spells are blacklisted or whitelisted you would do
|
||||
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_LIST")
|
||||
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_LIST")
|
||||
|
||||
Why had I done this? I do not know
|
||||
@@ -1,67 +1,67 @@
|
||||
--DISPLAY
|
||||
function()
|
||||
local mana = UnitPower("player")
|
||||
local maxmana = UnitPowerMax("player")
|
||||
return string.format("%.f%%", (mana / maxmana) * 100)
|
||||
end
|
||||
|
||||
--NAME
|
||||
function()
|
||||
local mana = UnitPower("player")
|
||||
local maxmana = UnitPowerMax("player")
|
||||
return aura_env.shorten(mana)
|
||||
end
|
||||
|
||||
--UNIT_POWER
|
||||
function()
|
||||
return true
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
local mana = UnitPower("player")
|
||||
local maxmana = UnitPowerMax("player")
|
||||
return maxmana - mana, maxmana, 1
|
||||
end
|
||||
|
||||
--SPELL_UPDATE_COOLDOWN
|
||||
function()
|
||||
return true
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
local id = 109132
|
||||
if IsPlayerSpell(115008) then id = 115008 end
|
||||
local charges, maxCharges, start, duration = GetSpellCharges(id)
|
||||
if charges >= 2 then
|
||||
return 0, 1, 1, 1
|
||||
elseif charges == 1 then
|
||||
expirationTime = start + duration
|
||||
return duration, expirationTime
|
||||
elseif charges < 1 then
|
||||
return 1, 1, 1, 1
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
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
|
||||
--DISPLAY
|
||||
function()
|
||||
local mana = UnitPower("player")
|
||||
local maxmana = UnitPowerMax("player")
|
||||
return string.format("%.f%%", (mana / maxmana) * 100)
|
||||
end
|
||||
|
||||
--NAME
|
||||
function()
|
||||
local mana = UnitPower("player")
|
||||
local maxmana = UnitPowerMax("player")
|
||||
return aura_env.shorten(mana)
|
||||
end
|
||||
|
||||
--UNIT_POWER
|
||||
function()
|
||||
return true
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
local mana = UnitPower("player")
|
||||
local maxmana = UnitPowerMax("player")
|
||||
return maxmana - mana, maxmana, 1
|
||||
end
|
||||
|
||||
--SPELL_UPDATE_COOLDOWN
|
||||
function()
|
||||
return true
|
||||
end
|
||||
|
||||
--DURATION
|
||||
function()
|
||||
local id = 109132
|
||||
if IsPlayerSpell(115008) then id = 115008 end
|
||||
local charges, maxCharges, start, duration = GetSpellCharges(id)
|
||||
if charges >= 2 then
|
||||
return 0, 1, 1, 1
|
||||
elseif charges == 1 then
|
||||
expirationTime = start + duration
|
||||
return duration, expirationTime
|
||||
elseif charges < 1 then
|
||||
return 1, 1, 1, 1
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
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
|
||||
@@ -1,43 +1,43 @@
|
||||
--TSU
|
||||
--SPELL_UPDATE_COOLDOWN RESET_COOLDOWN_MANAGER_SPELLS COOLDOWN_MANAGER_SWITCH_MODES
|
||||
function(allstates, e)
|
||||
if e == "RESET_COOLDOWN_MANAGER_SPELLS" then
|
||||
for _, state in pairs(allstates) do
|
||||
state.show = false;
|
||||
state.changed = true;
|
||||
end
|
||||
end
|
||||
if not aura_env.mode then aura_env.mode = 1 end
|
||||
if e == "COOLDOWN_MANAGER_SWITCH_MODES" then
|
||||
if aura_env.mode == 0 then
|
||||
aura_env.mode = 1
|
||||
print(aura_env.mode)
|
||||
else
|
||||
aura_env.mode = 0
|
||||
print(aura_env.mode)
|
||||
end
|
||||
end
|
||||
if not aura_env.spells then WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE") end
|
||||
for k,v in pairs(aura_env.spells) do
|
||||
local start, duration = GetSpellCooldown(v)
|
||||
local icon = GetSpellTexture(k)
|
||||
local totalcd = GetSpellBaseCooldown(v)
|
||||
allstates[v] = {
|
||||
changed = true,
|
||||
show = true,
|
||||
resort = true,
|
||||
progressType = "timed",
|
||||
icon = icon,
|
||||
}
|
||||
if aura_env.mode == 0 then allstates[v].index = totalcd end
|
||||
if start > 0 and duration > 1.5 then
|
||||
allstates[v].expirationTime = start + duration
|
||||
allstates[v].duration = duration
|
||||
if not allstates[v].timer and aura_env.mode == 1 then allstates[v].timer = C_Timer.NewTimer(duration, function() WeakAuras.ScanEvents("SPELL_UPDATE_COOLDOWN") end) end
|
||||
if aura_env.mode == 1 then allstates[v].index = start + duration end
|
||||
else
|
||||
if aura_env.mode == 1 then allstates[v].index = 0 end
|
||||
end
|
||||
end
|
||||
return true
|
||||
--TSU
|
||||
--SPELL_UPDATE_COOLDOWN RESET_COOLDOWN_MANAGER_SPELLS COOLDOWN_MANAGER_SWITCH_MODES
|
||||
function(allstates, e)
|
||||
if e == "RESET_COOLDOWN_MANAGER_SPELLS" then
|
||||
for _, state in pairs(allstates) do
|
||||
state.show = false;
|
||||
state.changed = true;
|
||||
end
|
||||
end
|
||||
if not aura_env.mode then aura_env.mode = 1 end
|
||||
if e == "COOLDOWN_MANAGER_SWITCH_MODES" then
|
||||
if aura_env.mode == 0 then
|
||||
aura_env.mode = 1
|
||||
print(aura_env.mode)
|
||||
else
|
||||
aura_env.mode = 0
|
||||
print(aura_env.mode)
|
||||
end
|
||||
end
|
||||
if not aura_env.spells then WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE") end
|
||||
for k,v in pairs(aura_env.spells) do
|
||||
local start, duration = GetSpellCooldown(v)
|
||||
local icon = GetSpellTexture(k)
|
||||
local totalcd = GetSpellBaseCooldown(v)
|
||||
allstates[v] = {
|
||||
changed = true,
|
||||
show = true,
|
||||
resort = true,
|
||||
progressType = "timed",
|
||||
icon = icon,
|
||||
}
|
||||
if aura_env.mode == 0 then allstates[v].index = totalcd end
|
||||
if start > 0 and duration > 1.5 then
|
||||
allstates[v].expirationTime = start + duration
|
||||
allstates[v].duration = duration
|
||||
if not allstates[v].timer and aura_env.mode == 1 then allstates[v].timer = C_Timer.NewTimer(duration, function() WeakAuras.ScanEvents("SPELL_UPDATE_COOLDOWN") end) end
|
||||
if aura_env.mode == 1 then allstates[v].index = start + duration end
|
||||
else
|
||||
if aura_env.mode == 1 then allstates[v].index = 0 end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
@@ -1,87 +1,87 @@
|
||||
--PLAYER_SPELLBOOK_UPDATE PLAYER_SPELLBOOK_EXCLUSION_ADD PLAYER_SPELLBOOK_EXCLUSION_REMOVE PLAYER_SPELLBOOK_EXCLUSION_LIST COOLDOWN_MANAGER_SWITCH_SCAN_MODES PLAYER_SPELLBOOK_WHITELIST_ADD PLAYER_SPELLBOOK_WHITELIST_REMOVE PLAYER_SPELLBOOK_WHITELIST_LIST
|
||||
function(e, msg)
|
||||
if not aura_env.mode then aura_env.mode = 1 end
|
||||
if e == "COOLDOWN_MANAGER_SWITCH_SCAN_MODES" then
|
||||
if aura_env.mode == 0 then
|
||||
aura_env.mode = 1
|
||||
print(aura_env.mode)
|
||||
else
|
||||
aura_env.mode = 0
|
||||
print(aura_env.mode)
|
||||
end
|
||||
elseif e == "PLAYER_SPELLBOOK_UPDATE" then
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.SpellExclusion then WeakAurasSaved.CustomTrash.SpellExclusion = {} end
|
||||
if not WeakAurasSaved.CustomTrash.SpellWhitelist then WeakAurasSaved.CustomTrash.SpellWhitelist = {
|
||||
["Fortifying Brew"] = 1,
|
||||
["Life Cocoon"] = 1,
|
||||
["Revival"] = 1,
|
||||
["Paralysis"] = 1,
|
||||
} end
|
||||
aura_env.spells = {}
|
||||
if aura_env.mode == 0 then
|
||||
local index = 1
|
||||
while GetSpellBookItemName(index, "spell") do
|
||||
local name = GetSpellInfo(index, "spell")
|
||||
local id = select(7, GetSpellInfo(index, "spell"))
|
||||
if IsPlayerSpell(id) == true and GetSpellBaseCooldown(id) > 10000 and (not (WeakAurasSaved.CustomTrash.SpellExclusion[name] or WeakAurasSaved.CustomTrash.SpellExclusion[id])) then
|
||||
aura_env.spells[name] = id
|
||||
end
|
||||
index = index + 1
|
||||
end
|
||||
else
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.SpellWhitelist) do
|
||||
local name = GetSpellInfo(k)
|
||||
local id = select(7, GetSpellInfo(k))
|
||||
if id and IsPlayerSpell(id) == true then
|
||||
aura_env.spells[name] = id
|
||||
end
|
||||
end
|
||||
end
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_EXCLUSION_ADD" then
|
||||
if GetSpellInfo(msg) then
|
||||
if not WeakAurasSaved.CustomTrash.SpellExclusion[msg] then WeakAurasSaved.CustomTrash.SpellExclusion[msg] = 1 end
|
||||
print("Spell <", msg, "> added")
|
||||
else
|
||||
print("Spell <", msg, "> is invalid")
|
||||
end
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_EXCLUSION_REMOVE" then
|
||||
if GetSpellInfo(msg) then
|
||||
if WeakAurasSaved.CustomTrash.SpellExclusion[msg] then WeakAurasSaved.CustomTrash.SpellExclusion[msg] = nil else print("Spell <", msg, "> is not excluded"); return end
|
||||
print("Spell <", msg, "> removed")
|
||||
else
|
||||
print("Spell <", msg, "> is invalid")
|
||||
end
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_EXCLUSION_LIST" then
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.SpellExclusion) do
|
||||
print(k,v)
|
||||
end
|
||||
elseif e == "PLAYER_SPELLBOOK_WHITELIST_ADD" then
|
||||
if GetSpellInfo(msg) then
|
||||
if not WeakAurasSaved.CustomTrash.SpellWhitelist[msg] then WeakAurasSaved.CustomTrash.SpellWhitelist[msg] = 1 end
|
||||
print("Spell <", msg, "> added")
|
||||
else
|
||||
print("Spell <", msg, "> is invalid")
|
||||
end
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_WHITELIST_REMOVE" then
|
||||
if GetSpellInfo(msg) then
|
||||
if WeakAurasSaved.CustomTrash.SpellWhitelist[msg] then WeakAurasSaved.CustomTrash.SpellWhitelist[msg] = nil else print("Spell <", msg, "> is not excluded"); return end
|
||||
print("Spell <", msg, "> removed")
|
||||
else
|
||||
print("Spell <", msg, "> is invalid")
|
||||
end
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_WHITELIST_LIST" then
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.SpellWhitelist) do
|
||||
print(k,v)
|
||||
end
|
||||
end
|
||||
--PLAYER_SPELLBOOK_UPDATE PLAYER_SPELLBOOK_EXCLUSION_ADD PLAYER_SPELLBOOK_EXCLUSION_REMOVE PLAYER_SPELLBOOK_EXCLUSION_LIST COOLDOWN_MANAGER_SWITCH_SCAN_MODES PLAYER_SPELLBOOK_WHITELIST_ADD PLAYER_SPELLBOOK_WHITELIST_REMOVE PLAYER_SPELLBOOK_WHITELIST_LIST
|
||||
function(e, msg)
|
||||
if not aura_env.mode then aura_env.mode = 1 end
|
||||
if e == "COOLDOWN_MANAGER_SWITCH_SCAN_MODES" then
|
||||
if aura_env.mode == 0 then
|
||||
aura_env.mode = 1
|
||||
print(aura_env.mode)
|
||||
else
|
||||
aura_env.mode = 0
|
||||
print(aura_env.mode)
|
||||
end
|
||||
elseif e == "PLAYER_SPELLBOOK_UPDATE" then
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.SpellExclusion then WeakAurasSaved.CustomTrash.SpellExclusion = {} end
|
||||
if not WeakAurasSaved.CustomTrash.SpellWhitelist then WeakAurasSaved.CustomTrash.SpellWhitelist = {
|
||||
["Fortifying Brew"] = 1,
|
||||
["Life Cocoon"] = 1,
|
||||
["Revival"] = 1,
|
||||
["Paralysis"] = 1,
|
||||
} end
|
||||
aura_env.spells = {}
|
||||
if aura_env.mode == 0 then
|
||||
local index = 1
|
||||
while GetSpellBookItemName(index, "spell") do
|
||||
local name = GetSpellInfo(index, "spell")
|
||||
local id = select(7, GetSpellInfo(index, "spell"))
|
||||
if IsPlayerSpell(id) == true and GetSpellBaseCooldown(id) > 10000 and (not (WeakAurasSaved.CustomTrash.SpellExclusion[name] or WeakAurasSaved.CustomTrash.SpellExclusion[id])) then
|
||||
aura_env.spells[name] = id
|
||||
end
|
||||
index = index + 1
|
||||
end
|
||||
else
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.SpellWhitelist) do
|
||||
local name = GetSpellInfo(k)
|
||||
local id = select(7, GetSpellInfo(k))
|
||||
if id and IsPlayerSpell(id) == true then
|
||||
aura_env.spells[name] = id
|
||||
end
|
||||
end
|
||||
end
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_EXCLUSION_ADD" then
|
||||
if GetSpellInfo(msg) then
|
||||
if not WeakAurasSaved.CustomTrash.SpellExclusion[msg] then WeakAurasSaved.CustomTrash.SpellExclusion[msg] = 1 end
|
||||
print("Spell <", msg, "> added")
|
||||
else
|
||||
print("Spell <", msg, "> is invalid")
|
||||
end
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_EXCLUSION_REMOVE" then
|
||||
if GetSpellInfo(msg) then
|
||||
if WeakAurasSaved.CustomTrash.SpellExclusion[msg] then WeakAurasSaved.CustomTrash.SpellExclusion[msg] = nil else print("Spell <", msg, "> is not excluded"); return end
|
||||
print("Spell <", msg, "> removed")
|
||||
else
|
||||
print("Spell <", msg, "> is invalid")
|
||||
end
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_EXCLUSION_LIST" then
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.SpellExclusion) do
|
||||
print(k,v)
|
||||
end
|
||||
elseif e == "PLAYER_SPELLBOOK_WHITELIST_ADD" then
|
||||
if GetSpellInfo(msg) then
|
||||
if not WeakAurasSaved.CustomTrash.SpellWhitelist[msg] then WeakAurasSaved.CustomTrash.SpellWhitelist[msg] = 1 end
|
||||
print("Spell <", msg, "> added")
|
||||
else
|
||||
print("Spell <", msg, "> is invalid")
|
||||
end
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_WHITELIST_REMOVE" then
|
||||
if GetSpellInfo(msg) then
|
||||
if WeakAurasSaved.CustomTrash.SpellWhitelist[msg] then WeakAurasSaved.CustomTrash.SpellWhitelist[msg] = nil else print("Spell <", msg, "> is not excluded"); return end
|
||||
print("Spell <", msg, "> removed")
|
||||
else
|
||||
print("Spell <", msg, "> is invalid")
|
||||
end
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
elseif e == "PLAYER_SPELLBOOK_WHITELIST_LIST" then
|
||||
for k,v in pairs(WeakAurasSaved.CustomTrash.SpellWhitelist) do
|
||||
print(k,v)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,31 +1,31 @@
|
||||
--TSU
|
||||
--SPELL_UPDATE_COOLDOWN RESET_COOLDOWN_MANAGER
|
||||
function(allstates, e)
|
||||
if e == "RESET_COOLDOWN_MANAGER" then
|
||||
for _, state in pairs(allstates) do
|
||||
state.show = false;
|
||||
state.changed = true;
|
||||
end
|
||||
end
|
||||
if not aura_env.talents then WeakAuras.ScanEvents("PLAYER_TALENT_UPDATE") end
|
||||
for k,v in pairs(aura_env.talents) do
|
||||
local start, duration = GetSpellCooldown(v)
|
||||
local icon = GetSpellTexture(k)
|
||||
local enable = 0
|
||||
if start == 0 then enable = 1 else enable = 0 end
|
||||
allstates[v] = {
|
||||
changed = true,
|
||||
show = true,
|
||||
resort = true,
|
||||
progressType = "timed",
|
||||
icon = icon,
|
||||
enable = enable,
|
||||
}
|
||||
if start > 0 and duration > 1.5 then
|
||||
allstates[v].expirationTime = start + duration
|
||||
allstates[v].duration = duration
|
||||
allstates[v].index = duration
|
||||
end
|
||||
end
|
||||
return true
|
||||
--TSU
|
||||
--SPELL_UPDATE_COOLDOWN RESET_COOLDOWN_MANAGER
|
||||
function(allstates, e)
|
||||
if e == "RESET_COOLDOWN_MANAGER" then
|
||||
for _, state in pairs(allstates) do
|
||||
state.show = false;
|
||||
state.changed = true;
|
||||
end
|
||||
end
|
||||
if not aura_env.talents then WeakAuras.ScanEvents("PLAYER_TALENT_UPDATE") end
|
||||
for k,v in pairs(aura_env.talents) do
|
||||
local start, duration = GetSpellCooldown(v)
|
||||
local icon = GetSpellTexture(k)
|
||||
local enable = 0
|
||||
if start == 0 then enable = 1 else enable = 0 end
|
||||
allstates[v] = {
|
||||
changed = true,
|
||||
show = true,
|
||||
resort = true,
|
||||
progressType = "timed",
|
||||
icon = icon,
|
||||
enable = enable,
|
||||
}
|
||||
if start > 0 and duration > 1.5 then
|
||||
allstates[v].expirationTime = start + duration
|
||||
allstates[v].duration = duration
|
||||
allstates[v].index = duration
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
@@ -1,17 +1,17 @@
|
||||
--PLAYER_TALENT_UPDATE
|
||||
function(e, msg)
|
||||
aura_env.talents = {}
|
||||
for row = 1, 7 do
|
||||
for column = 1, 3 do
|
||||
local id, name = GetTalentInfo(row, column, 1)
|
||||
local sel = select(10, GetTalentInfoByID(id))
|
||||
local sid = select(6, GetTalentInfoByID(id))
|
||||
if GetSpellBaseCooldown(sid) > 0 and sel == true then
|
||||
aura_env.talents[name] = sid
|
||||
end
|
||||
end
|
||||
end
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
--PLAYER_TALENT_UPDATE
|
||||
function(e, msg)
|
||||
aura_env.talents = {}
|
||||
for row = 1, 7 do
|
||||
for column = 1, 3 do
|
||||
local id, name = GetTalentInfo(row, column, 1)
|
||||
local sel = select(10, GetTalentInfoByID(id))
|
||||
local sid = select(6, GetTalentInfoByID(id))
|
||||
if GetSpellBaseCooldown(sid) > 0 and sel == true then
|
||||
aura_env.talents[name] = sid
|
||||
end
|
||||
end
|
||||
end
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER")
|
||||
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
|
||||
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
|
||||
end
|
||||
@@ -1,239 +1,239 @@
|
||||
--UPDATE_BIND_TABLE UPDATE_BINDS UPDATE_BAR_TABLE UPDATE_BARS DELETE_SET LIST_SETS
|
||||
--[[
|
||||
UPDATE_BIND_TABLE saves current binds
|
||||
UPDATE_BINDS restores saved binds
|
||||
UPDATE_BAR_TABLE saves current bar layout also supports sets
|
||||
UPDATE_BARS restores bar layout; defaults to the "default" set
|
||||
DELETE_SET deletes a specified set
|
||||
LIST_SETS lists all sets
|
||||
DELETE and LIST only work for bar layouts
|
||||
|
||||
|
||||
|
||||
/run WeakAuras.ScanEvents("UPDATE_BINDS")
|
||||
/run WeakAuras.ScanEvents("UPDATE_BIND_TABLE")
|
||||
|
||||
]]
|
||||
function(e, ...)
|
||||
if InCombatLockdown() ~= 1 then
|
||||
if e == "UPDATE_BIND_TABLE" then
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BindTableTwo then WeakAurasSaved.CustomTrash.BindTableTwo = {} end
|
||||
for i = 1, GetNumBindings() do
|
||||
local comm, bind, bind2 = GetBinding(i)
|
||||
if comm and bind2 and not WeakAurasSaved.CustomTrash.BindTableTwo[comm] then
|
||||
print("Adding", comm, "with bind", bind2, "to bind table")
|
||||
WeakAurasSaved.CustomTrash.BindTableTwo[comm] = {}
|
||||
WeakAurasSaved.CustomTrash.BindTableTwo[comm].bind = bind2
|
||||
WeakAurasSaved.CustomTrash.BindTableTwo[comm].index = i
|
||||
end
|
||||
if comm and not bind2 and WeakAurasSaved.CustomTrash.BindTableTwo[comm] then
|
||||
print("Removing", comm, "with no bind from the bind table")
|
||||
WeakAurasSaved.CustomTrash.BindTableTwo[comm] = nil
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE_BINDS" then
|
||||
for k, v in pairs(WeakAurasSaved.CustomTrash.BindTableTwo) do
|
||||
local command, bind, bind2 = GetBinding(v.index)
|
||||
if bind2 ~= v.bind then
|
||||
--The key should be aura_env.keyBinds[command] but the key is bind2
|
||||
print("Key", command, "has bind", bind2, "but should have", v.bind)
|
||||
if bind2 then SetBinding(bind2) end
|
||||
if v.bind then SetBinding(v.bind, command) end
|
||||
end
|
||||
end
|
||||
SaveBindings(1)
|
||||
elseif e == "UPDATE_BAR_TABLE" then
|
||||
local arg2 = "default"
|
||||
if ... then arg2 = ... end
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BarTable then WeakAurasSaved.CustomTrash.BarTable = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BarTable[arg2] then WeakAurasSaved.CustomTrash.BarTable[arg2] = {} end
|
||||
for i = 1, 72 do
|
||||
PickupAction(i)
|
||||
if GetCursorInfo() then
|
||||
local type = GetCursorInfo()
|
||||
local id, name = nil, nil
|
||||
if not type then WeakAurasSaved.CustomTrash.BarTable[arg2][i] = nil end
|
||||
if type == "spell" then
|
||||
id = select(4, GetCursorInfo())
|
||||
elseif type == "mount" then
|
||||
id = select(2, GetCursorInfo())
|
||||
elseif type == "macro" then
|
||||
id = select(2, GetCursorInfo())
|
||||
name = select(1, GetMacroInfo(id))
|
||||
elseif type == "item" then
|
||||
id = select(2, GetCursorInfo())
|
||||
elseif type == "equipmentset" then
|
||||
name = select(2, GetCursorInfo())
|
||||
end --elseif end
|
||||
if not WeakAurasSaved.CustomTrash.BarTable[arg2][i] then WeakAurasSaved.CustomTrash.BarTable[arg2][i] = {} end
|
||||
if id ~= WeakAurasSaved.CustomTrash.BarTable[arg2][i].id or type ~= WeakAurasSaved.CustomTrash.BarTable[arg2][i].type then
|
||||
WeakAurasSaved.CustomTrash.BarTable[arg2][i].type = type
|
||||
WeakAurasSaved.CustomTrash.BarTable[arg2][i].id = id
|
||||
WeakAurasSaved.CustomTrash.BarTable[arg2][i].name = name
|
||||
if not name then
|
||||
print("Adding", type, "by id", id, "on slot", i, "to the table")
|
||||
elseif name then
|
||||
print("Adding", type, "by id", id, "and name", name, "on slot", i, "to the table")
|
||||
end
|
||||
end
|
||||
end
|
||||
PickupAction(i)
|
||||
end
|
||||
elseif e == "UPDATE_BARS" then
|
||||
local arg2 = "default"
|
||||
if ... then arg2 = ... end
|
||||
for k, v in pairs(WeakAurasSaved.CustomTrash.BarTable[arg2]) do
|
||||
if v.type == "spell" then
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local id = select(4, GetCursorInfo())
|
||||
if id ~= v.id then
|
||||
ClearCursor()
|
||||
PickupSpell(v.id)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
else
|
||||
ClearCursor()
|
||||
PickupSpell(v.id)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
elseif v.type == "mount" then
|
||||
local mid, mindex
|
||||
--Looking for mount in mount journal
|
||||
for i = 1, C_MountJournal.GetNumMounts() do
|
||||
mid = select(12, C_MountJournal.GetDisplayedMountInfo(i))
|
||||
local ishave = select(11, C_MountJournal.GetDisplayedMountInfo(i))
|
||||
if mid == v.id then
|
||||
mindex = i
|
||||
break
|
||||
end
|
||||
if ishave == false then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
--Checking what's on the bar
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local id = select(2, GetCursorInfo())
|
||||
if id ~= v.id and mindex then
|
||||
ClearCursor()
|
||||
C_MountJournal.Pickup(mindex)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
elseif not GetCursorInfo() and mindex then
|
||||
ClearCursor()
|
||||
C_MountJournal.Pickup(mindex)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
elseif v.type == "macro" then
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local id = select(2, GetCursorInfo())
|
||||
local name = select(1, GetMacroInfo(id))
|
||||
if id ~= v.id or name ~= v.name then
|
||||
ClearCursor()
|
||||
PickupMacro(v.id)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
else
|
||||
ClearCursor()
|
||||
local name = GetMacroInfo(v.id)
|
||||
if name == v.name then
|
||||
PickupMacro(v.id)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
end
|
||||
elseif v.type == "equipmentset" then
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
local eqindex
|
||||
for i = 1, GetNumEquipmentSets() do
|
||||
local nam = GetEquipmentSetInfo(i)
|
||||
if nam == v.name then
|
||||
eqindex = i
|
||||
break
|
||||
end
|
||||
end
|
||||
if eqindex then
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local name = select(2, GetCursorInfo())
|
||||
if name ~= v.name then
|
||||
ClearCursor()
|
||||
PickupEquipmentSet(eqindex)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
else
|
||||
ClearCursor()
|
||||
PickupEquipmentSet(eqindex)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
end
|
||||
elseif v.type == "item" then
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
local ios, jos
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local link = select(7, GetContainerItemInfo(i, j))
|
||||
if link then
|
||||
local id = link:match("item:(%d+):")
|
||||
if id then
|
||||
id = tonumber(id)
|
||||
if id == v.id then
|
||||
ios = i
|
||||
jos = j
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if ios and jos then
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local id = select(2, GetCursorInfo())
|
||||
if id ~= v.id then
|
||||
ClearCursor()
|
||||
PickupContainerItem(ios, jos)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
else
|
||||
ClearCursor()
|
||||
PickupContainerItem(ios, jos)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
end
|
||||
end --elseif end
|
||||
end
|
||||
elseif e == "DELETE_SET" then
|
||||
local arg2 = ...
|
||||
if arg2 and WeakAurasSaved.CustomTrash.BarTable[arg2] then
|
||||
WeakAurasSaved.CustomTrash.BarTable[arg2] = nil
|
||||
end
|
||||
elseif e == "LIST_SETS" then
|
||||
for k, v in pairs(WeakAurasSaved.CustomTrash.BarTable) do
|
||||
print(k)
|
||||
end
|
||||
end --elseif end
|
||||
end
|
||||
end
|
||||
--UPDATE_BIND_TABLE UPDATE_BINDS UPDATE_BAR_TABLE UPDATE_BARS DELETE_SET LIST_SETS
|
||||
--[[
|
||||
UPDATE_BIND_TABLE saves current binds
|
||||
UPDATE_BINDS restores saved binds
|
||||
UPDATE_BAR_TABLE saves current bar layout also supports sets
|
||||
UPDATE_BARS restores bar layout; defaults to the "default" set
|
||||
DELETE_SET deletes a specified set
|
||||
LIST_SETS lists all sets
|
||||
DELETE and LIST only work for bar layouts
|
||||
|
||||
|
||||
|
||||
/run WeakAuras.ScanEvents("UPDATE_BINDS")
|
||||
/run WeakAuras.ScanEvents("UPDATE_BIND_TABLE")
|
||||
|
||||
]]
|
||||
function(e, ...)
|
||||
if InCombatLockdown() ~= 1 then
|
||||
if e == "UPDATE_BIND_TABLE" then
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BindTableTwo then WeakAurasSaved.CustomTrash.BindTableTwo = {} end
|
||||
for i = 1, GetNumBindings() do
|
||||
local comm, bind, bind2 = GetBinding(i)
|
||||
if comm and bind2 and not WeakAurasSaved.CustomTrash.BindTableTwo[comm] then
|
||||
print("Adding", comm, "with bind", bind2, "to bind table")
|
||||
WeakAurasSaved.CustomTrash.BindTableTwo[comm] = {}
|
||||
WeakAurasSaved.CustomTrash.BindTableTwo[comm].bind = bind2
|
||||
WeakAurasSaved.CustomTrash.BindTableTwo[comm].index = i
|
||||
end
|
||||
if comm and not bind2 and WeakAurasSaved.CustomTrash.BindTableTwo[comm] then
|
||||
print("Removing", comm, "with no bind from the bind table")
|
||||
WeakAurasSaved.CustomTrash.BindTableTwo[comm] = nil
|
||||
end
|
||||
end
|
||||
elseif e == "UPDATE_BINDS" then
|
||||
for k, v in pairs(WeakAurasSaved.CustomTrash.BindTableTwo) do
|
||||
local command, bind, bind2 = GetBinding(v.index)
|
||||
if bind2 ~= v.bind then
|
||||
--The key should be aura_env.keyBinds[command] but the key is bind2
|
||||
print("Key", command, "has bind", bind2, "but should have", v.bind)
|
||||
if bind2 then SetBinding(bind2) end
|
||||
if v.bind then SetBinding(v.bind, command) end
|
||||
end
|
||||
end
|
||||
SaveBindings(1)
|
||||
elseif e == "UPDATE_BAR_TABLE" then
|
||||
local arg2 = "default"
|
||||
if ... then arg2 = ... end
|
||||
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BarTable then WeakAurasSaved.CustomTrash.BarTable = {} end
|
||||
if not WeakAurasSaved.CustomTrash.BarTable[arg2] then WeakAurasSaved.CustomTrash.BarTable[arg2] = {} end
|
||||
for i = 1, 72 do
|
||||
PickupAction(i)
|
||||
if GetCursorInfo() then
|
||||
local type = GetCursorInfo()
|
||||
local id, name = nil, nil
|
||||
if not type then WeakAurasSaved.CustomTrash.BarTable[arg2][i] = nil end
|
||||
if type == "spell" then
|
||||
id = select(4, GetCursorInfo())
|
||||
elseif type == "mount" then
|
||||
id = select(2, GetCursorInfo())
|
||||
elseif type == "macro" then
|
||||
id = select(2, GetCursorInfo())
|
||||
name = select(1, GetMacroInfo(id))
|
||||
elseif type == "item" then
|
||||
id = select(2, GetCursorInfo())
|
||||
elseif type == "equipmentset" then
|
||||
name = select(2, GetCursorInfo())
|
||||
end --elseif end
|
||||
if not WeakAurasSaved.CustomTrash.BarTable[arg2][i] then WeakAurasSaved.CustomTrash.BarTable[arg2][i] = {} end
|
||||
if id ~= WeakAurasSaved.CustomTrash.BarTable[arg2][i].id or type ~= WeakAurasSaved.CustomTrash.BarTable[arg2][i].type then
|
||||
WeakAurasSaved.CustomTrash.BarTable[arg2][i].type = type
|
||||
WeakAurasSaved.CustomTrash.BarTable[arg2][i].id = id
|
||||
WeakAurasSaved.CustomTrash.BarTable[arg2][i].name = name
|
||||
if not name then
|
||||
print("Adding", type, "by id", id, "on slot", i, "to the table")
|
||||
elseif name then
|
||||
print("Adding", type, "by id", id, "and name", name, "on slot", i, "to the table")
|
||||
end
|
||||
end
|
||||
end
|
||||
PickupAction(i)
|
||||
end
|
||||
elseif e == "UPDATE_BARS" then
|
||||
local arg2 = "default"
|
||||
if ... then arg2 = ... end
|
||||
for k, v in pairs(WeakAurasSaved.CustomTrash.BarTable[arg2]) do
|
||||
if v.type == "spell" then
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local id = select(4, GetCursorInfo())
|
||||
if id ~= v.id then
|
||||
ClearCursor()
|
||||
PickupSpell(v.id)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
else
|
||||
ClearCursor()
|
||||
PickupSpell(v.id)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
elseif v.type == "mount" then
|
||||
local mid, mindex
|
||||
--Looking for mount in mount journal
|
||||
for i = 1, C_MountJournal.GetNumMounts() do
|
||||
mid = select(12, C_MountJournal.GetDisplayedMountInfo(i))
|
||||
local ishave = select(11, C_MountJournal.GetDisplayedMountInfo(i))
|
||||
if mid == v.id then
|
||||
mindex = i
|
||||
break
|
||||
end
|
||||
if ishave == false then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
--Checking what's on the bar
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local id = select(2, GetCursorInfo())
|
||||
if id ~= v.id and mindex then
|
||||
ClearCursor()
|
||||
C_MountJournal.Pickup(mindex)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
elseif not GetCursorInfo() and mindex then
|
||||
ClearCursor()
|
||||
C_MountJournal.Pickup(mindex)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
elseif v.type == "macro" then
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local id = select(2, GetCursorInfo())
|
||||
local name = select(1, GetMacroInfo(id))
|
||||
if id ~= v.id or name ~= v.name then
|
||||
ClearCursor()
|
||||
PickupMacro(v.id)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
else
|
||||
ClearCursor()
|
||||
local name = GetMacroInfo(v.id)
|
||||
if name == v.name then
|
||||
PickupMacro(v.id)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
end
|
||||
elseif v.type == "equipmentset" then
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
local eqindex
|
||||
for i = 1, GetNumEquipmentSets() do
|
||||
local nam = GetEquipmentSetInfo(i)
|
||||
if nam == v.name then
|
||||
eqindex = i
|
||||
break
|
||||
end
|
||||
end
|
||||
if eqindex then
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local name = select(2, GetCursorInfo())
|
||||
if name ~= v.name then
|
||||
ClearCursor()
|
||||
PickupEquipmentSet(eqindex)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
else
|
||||
ClearCursor()
|
||||
PickupEquipmentSet(eqindex)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
end
|
||||
elseif v.type == "item" then
|
||||
if GetCursorInfo() then ClearCursor() end
|
||||
local ios, jos
|
||||
for i = 0, 4 do
|
||||
for j = 1, GetContainerNumSlots(i) do
|
||||
local link = select(7, GetContainerItemInfo(i, j))
|
||||
if link then
|
||||
local id = link:match("item:(%d+):")
|
||||
if id then
|
||||
id = tonumber(id)
|
||||
if id == v.id then
|
||||
ios = i
|
||||
jos = j
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if ios and jos then
|
||||
PickupAction(k)
|
||||
if GetCursorInfo() then
|
||||
local id = select(2, GetCursorInfo())
|
||||
if id ~= v.id then
|
||||
ClearCursor()
|
||||
PickupContainerItem(ios, jos)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
PickupAction(k)
|
||||
else
|
||||
ClearCursor()
|
||||
PickupContainerItem(ios, jos)
|
||||
PickupAction(k)
|
||||
ClearCursor()
|
||||
end
|
||||
end
|
||||
end --elseif end
|
||||
end
|
||||
elseif e == "DELETE_SET" then
|
||||
local arg2 = ...
|
||||
if arg2 and WeakAurasSaved.CustomTrash.BarTable[arg2] then
|
||||
WeakAurasSaved.CustomTrash.BarTable[arg2] = nil
|
||||
end
|
||||
elseif e == "LIST_SETS" then
|
||||
for k, v in pairs(WeakAurasSaved.CustomTrash.BarTable) do
|
||||
print(k)
|
||||
end
|
||||
end --elseif end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,318 +1,318 @@
|
||||
--UPDATE_MOUSEOVER_UNIT PLAYER_TARGET_CHANGED
|
||||
function()
|
||||
if not UnitExists("target") and UnitExists("mouseover") and UnitIsPlayer("mouseover") then
|
||||
aura_env.output = "Boss RF NM HC Myth" .. "\n"
|
||||
bossKills =
|
||||
{
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
}
|
||||
SetAchievementComparisonUnit("mouseover")
|
||||
end
|
||||
if not UnitExists("mouseover") and UnitExists("target") and UnitIsPlayer("target") then
|
||||
aura_env.output = "Boss RF NM HC Myth" .. "\n"
|
||||
bossKills =
|
||||
{
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
}
|
||||
SetAchievementComparisonUnit("target")
|
||||
end
|
||||
end
|
||||
|
||||
--INSPECT_ACHIEVEMENT_READY
|
||||
function()
|
||||
aura_env.output = "Boss RF NM HC Myth" .. "\n"
|
||||
for k,v in ipairs(aura_env.TOS) do
|
||||
if GetComparisonStatistic(aura_env.TOS[k][1]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][2]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][3]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][4]) ~= "--" then
|
||||
local bossname = select(2, GetAchievementInfo(aura_env.TOS[k][1]))
|
||||
bossname = bossname:match("[a-zA-Z' ]*kills")
|
||||
bossname = bossname:gsub(" kills", "")
|
||||
aura_env.output = aura_env.output .. bossname .. "\n"
|
||||
if GetComparisonStatistic(aura_env.TOS[k][1]) ~= "--" then
|
||||
bossKills[k][1] = GetComparisonStatistic(aura_env.TOS[k][1])
|
||||
end
|
||||
if GetComparisonStatistic(aura_env.TOS[k][2]) ~= "--" then
|
||||
bossKills[k][2] = GetComparisonStatistic(aura_env.TOS[k][2])
|
||||
end
|
||||
if GetComparisonStatistic(aura_env.TOS[k][3]) ~= "--" then
|
||||
bossKills[k][3] = GetComparisonStatistic(aura_env.TOS[k][3])
|
||||
end
|
||||
if GetComparisonStatistic(aura_env.TOS[k][4]) ~= "--" then
|
||||
bossKills[k][4] = GetComparisonStatistic(aura_env.TOS[k][4])
|
||||
end
|
||||
end
|
||||
end
|
||||
ClearAchievementComparisonUnit()
|
||||
end
|
||||
|
||||
--WEAKAURA 2 DISPLAY -- RF BOSSES
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(bossKills) do
|
||||
if tonumber(bossKills[k][1]) > 0 then
|
||||
output = output .. bossKills[k][1] .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--WEAKAURA 2 DISPLAY -- NM BOSSES
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(bossKills) do
|
||||
if tonumber(bossKills[k][2]) > 0 then
|
||||
output = output .. bossKills[k][2] .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--WEAKAURA 2 DISPLAY -- HC BOSSES
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(bossKills) do
|
||||
if tonumber(bossKills[k][3]) > 0 then
|
||||
output = output .. bossKills[k][3] .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--WEAKAURA 2 DISPLAY -- Myth BOSSES
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(bossKills) do
|
||||
if tonumber(bossKills[k][4]) > 0 then
|
||||
output = output .. bossKills[k][4] .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.TOS =
|
||||
{
|
||||
{ --Goroth
|
||||
11877, -- [1]
|
||||
11878, -- [2]
|
||||
11879, -- [3]
|
||||
11880, -- [4]
|
||||
}, -- [1]
|
||||
{ --Inquisition
|
||||
11881, -- [1]
|
||||
11882, -- [2]
|
||||
11883, -- [3]
|
||||
11884, -- [4]
|
||||
}, -- [2]
|
||||
{ --Harjatan
|
||||
11885, -- [1]
|
||||
11886, -- [2]
|
||||
11887, -- [3]
|
||||
11888, -- [4]
|
||||
}, -- [3]
|
||||
{ --Sisters
|
||||
11889, -- [1]
|
||||
11890, -- [2]
|
||||
11891, -- [3]
|
||||
11892, -- [4]
|
||||
}, -- [4]
|
||||
{ --Mistress
|
||||
11893, -- [1]
|
||||
11894, -- [2]
|
||||
11895, -- [3]
|
||||
11896, -- [4]
|
||||
}, -- [5]
|
||||
{ --Host
|
||||
11897, -- [1]
|
||||
11898, -- [2]
|
||||
11899, -- [3]
|
||||
11900, -- [4]
|
||||
}, -- [6]
|
||||
{ --Maiden
|
||||
11901, -- [1]
|
||||
11902, -- [2]
|
||||
11903, -- [3]
|
||||
11904, -- [4]
|
||||
}, -- [7]
|
||||
{ --Avatar
|
||||
11905, -- [1]
|
||||
11906, -- [2]
|
||||
11907, -- [3]
|
||||
11908, -- [4]
|
||||
}, -- [8]
|
||||
{ --Kil'jaeden
|
||||
11909, -- [1]
|
||||
11910, -- [2]
|
||||
11911, -- [3]
|
||||
11912, -- [4]
|
||||
}, -- [9]
|
||||
}
|
||||
aura_env.NH =
|
||||
{
|
||||
{ --Skorp
|
||||
10940, -- [1]
|
||||
10941, -- [2]
|
||||
10942, -- [3]
|
||||
10943, -- [4]
|
||||
}, -- [1]
|
||||
{ --Anomaly
|
||||
10944, -- [1]
|
||||
10945, -- [2]
|
||||
10946, -- [3]
|
||||
10947, -- [4]
|
||||
}, -- [2]
|
||||
{ --Trilliax
|
||||
10948, -- [1]
|
||||
10949, -- [2]
|
||||
10950, -- [3]
|
||||
10951, -- [4]
|
||||
}, -- [3]
|
||||
{ --Aluriel
|
||||
10952, -- [1]
|
||||
10953, -- [2]
|
||||
10954, -- [3]
|
||||
10955, -- [4]
|
||||
}, -- [4]
|
||||
{ --Augur
|
||||
10956, -- [1]
|
||||
10957, -- [2]
|
||||
10959, -- [3]
|
||||
10960, -- [4]
|
||||
}, -- [5]
|
||||
{ --Botanist
|
||||
10961, -- [1]
|
||||
10962, -- [2]
|
||||
10963, -- [3]
|
||||
10964, -- [4]
|
||||
}, -- [6]
|
||||
{ --Tich
|
||||
10965, -- [1]
|
||||
10966, -- [2]
|
||||
10967, -- [3]
|
||||
10968, -- [4]
|
||||
}, -- [7]
|
||||
{ --Krosus
|
||||
10969, -- [1]
|
||||
10970, -- [2]
|
||||
10971, -- [3]
|
||||
10972, -- [4]
|
||||
}, -- [8]
|
||||
{ --Elisande
|
||||
10973, -- [1]
|
||||
10974, -- [2]
|
||||
10975, -- [3]
|
||||
10976, -- [4]
|
||||
}, -- [9]
|
||||
{ --Gul'dan
|
||||
10977, -- [1]
|
||||
10978, -- [2]
|
||||
10979, -- [3]
|
||||
10980, -- [4]
|
||||
}, -- [10]
|
||||
}
|
||||
--UPDATE_MOUSEOVER_UNIT PLAYER_TARGET_CHANGED
|
||||
function()
|
||||
if not UnitExists("target") and UnitExists("mouseover") and UnitIsPlayer("mouseover") then
|
||||
aura_env.output = "Boss RF NM HC Myth" .. "\n"
|
||||
bossKills =
|
||||
{
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
}
|
||||
SetAchievementComparisonUnit("mouseover")
|
||||
end
|
||||
if not UnitExists("mouseover") and UnitExists("target") and UnitIsPlayer("target") then
|
||||
aura_env.output = "Boss RF NM HC Myth" .. "\n"
|
||||
bossKills =
|
||||
{
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
{
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0
|
||||
},
|
||||
}
|
||||
SetAchievementComparisonUnit("target")
|
||||
end
|
||||
end
|
||||
|
||||
--INSPECT_ACHIEVEMENT_READY
|
||||
function()
|
||||
aura_env.output = "Boss RF NM HC Myth" .. "\n"
|
||||
for k,v in ipairs(aura_env.TOS) do
|
||||
if GetComparisonStatistic(aura_env.TOS[k][1]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][2]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][3]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][4]) ~= "--" then
|
||||
local bossname = select(2, GetAchievementInfo(aura_env.TOS[k][1]))
|
||||
bossname = bossname:match("[a-zA-Z' ]*kills")
|
||||
bossname = bossname:gsub(" kills", "")
|
||||
aura_env.output = aura_env.output .. bossname .. "\n"
|
||||
if GetComparisonStatistic(aura_env.TOS[k][1]) ~= "--" then
|
||||
bossKills[k][1] = GetComparisonStatistic(aura_env.TOS[k][1])
|
||||
end
|
||||
if GetComparisonStatistic(aura_env.TOS[k][2]) ~= "--" then
|
||||
bossKills[k][2] = GetComparisonStatistic(aura_env.TOS[k][2])
|
||||
end
|
||||
if GetComparisonStatistic(aura_env.TOS[k][3]) ~= "--" then
|
||||
bossKills[k][3] = GetComparisonStatistic(aura_env.TOS[k][3])
|
||||
end
|
||||
if GetComparisonStatistic(aura_env.TOS[k][4]) ~= "--" then
|
||||
bossKills[k][4] = GetComparisonStatistic(aura_env.TOS[k][4])
|
||||
end
|
||||
end
|
||||
end
|
||||
ClearAchievementComparisonUnit()
|
||||
end
|
||||
|
||||
--WEAKAURA 2 DISPLAY -- RF BOSSES
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(bossKills) do
|
||||
if tonumber(bossKills[k][1]) > 0 then
|
||||
output = output .. bossKills[k][1] .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--WEAKAURA 2 DISPLAY -- NM BOSSES
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(bossKills) do
|
||||
if tonumber(bossKills[k][2]) > 0 then
|
||||
output = output .. bossKills[k][2] .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--WEAKAURA 2 DISPLAY -- HC BOSSES
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(bossKills) do
|
||||
if tonumber(bossKills[k][3]) > 0 then
|
||||
output = output .. bossKills[k][3] .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--WEAKAURA 2 DISPLAY -- Myth BOSSES
|
||||
function()
|
||||
local output = ""
|
||||
for k,v in ipairs(bossKills) do
|
||||
if tonumber(bossKills[k][4]) > 0 then
|
||||
output = output .. bossKills[k][4] .. "\n"
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.TOS =
|
||||
{
|
||||
{ --Goroth
|
||||
11877, -- [1]
|
||||
11878, -- [2]
|
||||
11879, -- [3]
|
||||
11880, -- [4]
|
||||
}, -- [1]
|
||||
{ --Inquisition
|
||||
11881, -- [1]
|
||||
11882, -- [2]
|
||||
11883, -- [3]
|
||||
11884, -- [4]
|
||||
}, -- [2]
|
||||
{ --Harjatan
|
||||
11885, -- [1]
|
||||
11886, -- [2]
|
||||
11887, -- [3]
|
||||
11888, -- [4]
|
||||
}, -- [3]
|
||||
{ --Sisters
|
||||
11889, -- [1]
|
||||
11890, -- [2]
|
||||
11891, -- [3]
|
||||
11892, -- [4]
|
||||
}, -- [4]
|
||||
{ --Mistress
|
||||
11893, -- [1]
|
||||
11894, -- [2]
|
||||
11895, -- [3]
|
||||
11896, -- [4]
|
||||
}, -- [5]
|
||||
{ --Host
|
||||
11897, -- [1]
|
||||
11898, -- [2]
|
||||
11899, -- [3]
|
||||
11900, -- [4]
|
||||
}, -- [6]
|
||||
{ --Maiden
|
||||
11901, -- [1]
|
||||
11902, -- [2]
|
||||
11903, -- [3]
|
||||
11904, -- [4]
|
||||
}, -- [7]
|
||||
{ --Avatar
|
||||
11905, -- [1]
|
||||
11906, -- [2]
|
||||
11907, -- [3]
|
||||
11908, -- [4]
|
||||
}, -- [8]
|
||||
{ --Kil'jaeden
|
||||
11909, -- [1]
|
||||
11910, -- [2]
|
||||
11911, -- [3]
|
||||
11912, -- [4]
|
||||
}, -- [9]
|
||||
}
|
||||
aura_env.NH =
|
||||
{
|
||||
{ --Skorp
|
||||
10940, -- [1]
|
||||
10941, -- [2]
|
||||
10942, -- [3]
|
||||
10943, -- [4]
|
||||
}, -- [1]
|
||||
{ --Anomaly
|
||||
10944, -- [1]
|
||||
10945, -- [2]
|
||||
10946, -- [3]
|
||||
10947, -- [4]
|
||||
}, -- [2]
|
||||
{ --Trilliax
|
||||
10948, -- [1]
|
||||
10949, -- [2]
|
||||
10950, -- [3]
|
||||
10951, -- [4]
|
||||
}, -- [3]
|
||||
{ --Aluriel
|
||||
10952, -- [1]
|
||||
10953, -- [2]
|
||||
10954, -- [3]
|
||||
10955, -- [4]
|
||||
}, -- [4]
|
||||
{ --Augur
|
||||
10956, -- [1]
|
||||
10957, -- [2]
|
||||
10959, -- [3]
|
||||
10960, -- [4]
|
||||
}, -- [5]
|
||||
{ --Botanist
|
||||
10961, -- [1]
|
||||
10962, -- [2]
|
||||
10963, -- [3]
|
||||
10964, -- [4]
|
||||
}, -- [6]
|
||||
{ --Tich
|
||||
10965, -- [1]
|
||||
10966, -- [2]
|
||||
10967, -- [3]
|
||||
10968, -- [4]
|
||||
}, -- [7]
|
||||
{ --Krosus
|
||||
10969, -- [1]
|
||||
10970, -- [2]
|
||||
10971, -- [3]
|
||||
10972, -- [4]
|
||||
}, -- [8]
|
||||
{ --Elisande
|
||||
10973, -- [1]
|
||||
10974, -- [2]
|
||||
10975, -- [3]
|
||||
10976, -- [4]
|
||||
}, -- [9]
|
||||
{ --Gul'dan
|
||||
10977, -- [1]
|
||||
10978, -- [2]
|
||||
10979, -- [3]
|
||||
10980, -- [4]
|
||||
}, -- [10]
|
||||
}
|
||||
aura_env.output = ""
|
||||
@@ -1,9 +1,9 @@
|
||||
function()
|
||||
local seeds = 0
|
||||
for i = 1, 100 do
|
||||
if UnitDebuff("nameplate" .. i, "Seed of Corruption") then
|
||||
seeds = seeds + 1
|
||||
end
|
||||
end
|
||||
return seeds
|
||||
function()
|
||||
local seeds = 0
|
||||
for i = 1, 100 do
|
||||
if UnitDebuff("nameplate" .. i, "Seed of Corruption") then
|
||||
seeds = seeds + 1
|
||||
end
|
||||
end
|
||||
return seeds
|
||||
end
|
||||
@@ -1,305 +1,305 @@
|
||||
--QUEST_ACCEPTED QUEST_TURNED_IN
|
||||
function(e)
|
||||
for k, v in ipairs(aura_env.questDatabase) do
|
||||
if IsQuestFlaggedCompleted(v) == false then
|
||||
--print(aura_env.TESTCOMPLETION[k])
|
||||
--if aura_env.TESTCOMPLETION[k] == false then
|
||||
--print(k, IsQuestFlaggedCompleted(v))
|
||||
if k < 36 or k > 37 then
|
||||
aura_env.currentQuest = k
|
||||
break
|
||||
elseif (k == 36 and IsQuestFlaggedCompleted(aura_env.questDatabase[37]) == true) or (k == 37 and IsQuestFlaggedCompleted(aura_env.questDatabase[36]) == true) then
|
||||
--elseif (k == 36 and aura_env.TESTCOMPLETION[37] == true) or (k == 37 and aura_env.TESTCOMPLETION[36] == true) then
|
||||
k = 38
|
||||
end
|
||||
end
|
||||
end
|
||||
--print(aura_env.currentQuest)
|
||||
return true
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.currentQuest < 89 then
|
||||
return "Progress: " .. aura_env.currentQuest .. "/" .. #aura_env.questDatabase .. "\nCurrent quest: " .. aura_env.questNames[aura_env.currentQuest] .. "\nNext Quest: " .. aura_env.questNames[aura_env.currentQuest + 1]
|
||||
else
|
||||
return "Progress: " .. aura_env.currentQuest .. "/" .. #aura_env.questDatabase .. "\nCurrent quest: " .. aura_env.questNames[aura_env.currentQuest]
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.currentQuest = 1
|
||||
aura_env.questDatabase = {
|
||||
[1] = 47835,
|
||||
[2] = 47867,
|
||||
[3] = 47223,
|
||||
[4] = 47224,
|
||||
[5] = 48440,
|
||||
[6] = 46938,
|
||||
[7] = 47589,
|
||||
[8] = 46297,
|
||||
[9] = 48483,
|
||||
[10] = 47627,
|
||||
[11] = 47641,
|
||||
[12] = 46732,
|
||||
[13] = 46816,
|
||||
[14] = 46839,
|
||||
[15] = 46840,
|
||||
[16] = 46841,
|
||||
[17] = 46842,
|
||||
[18] = 46843,
|
||||
[19] = 48500,
|
||||
[20] = 47431,
|
||||
[21] = 46213,
|
||||
[22] = 40238,
|
||||
[23] = 47541,
|
||||
[24] = 47508,
|
||||
[25] = 47771,
|
||||
[26] = 47526,
|
||||
[27] = 47754,
|
||||
[28] = 47652,
|
||||
[29] = 47653,
|
||||
[30] = 47743,
|
||||
[31] = 49143,
|
||||
[32] = 47287,
|
||||
[33] = 48559,
|
||||
[34] = 48199,
|
||||
[35] = 48200,
|
||||
[36] = 48201,
|
||||
[37] = 48202,
|
||||
[38] = 47473,
|
||||
[39] = 47889,
|
||||
[40] = 47890,
|
||||
[41] = 47891,
|
||||
[42] = 47892,
|
||||
[43] = 47986,
|
||||
[44] = 47987,
|
||||
[45] = 47988,
|
||||
[46] = 47991,
|
||||
[47] = 47990,
|
||||
[48] = 47989,
|
||||
[49] = 47992,
|
||||
[50] = 47993,
|
||||
[51] = 47994,
|
||||
[52] = 48081,
|
||||
[53] = 46815,
|
||||
[54] = 46818,
|
||||
[55] = 46834,
|
||||
[56] = 47066,
|
||||
[57] = 46941,
|
||||
[58] = 47686,
|
||||
[59] = 47882,
|
||||
[60] = 47688,
|
||||
[61] = 47883,
|
||||
[62] = 47689,
|
||||
[63] = 47685,
|
||||
[64] = 47687,
|
||||
[65] = 47690,
|
||||
[66] = 48107,
|
||||
[67] = 48461,
|
||||
[68] = 48344,
|
||||
[69] = 47691,
|
||||
[70] = 47854,
|
||||
[71] = 47995,
|
||||
[72] = 47853,
|
||||
[73] = 48345,
|
||||
[74] = 47855,
|
||||
[75] = 47856,
|
||||
[76] = 47416,
|
||||
[77] = 47238,
|
||||
[78] = 40761,
|
||||
[79] = 47101,
|
||||
[80] = 47180,
|
||||
[81] = 47100,
|
||||
[82] = 47183,
|
||||
[83] = 47184,
|
||||
[84] = 47203,
|
||||
[85] = 47217,
|
||||
[86] = 47218,
|
||||
[87] = 47219,
|
||||
[88] = 47220,
|
||||
[89] = 48560,
|
||||
}
|
||||
aura_env.questNames = {
|
||||
[1] = "The Hand of Fate",
|
||||
[2] = "Two If By Sea",
|
||||
[3] = "Light's Exodus",
|
||||
[4] = "The Vindicaar",
|
||||
[5] = "Into the Night",
|
||||
[6] = "Alone in the Abyss",
|
||||
[7] = "Righteous Fury",
|
||||
[8] = "Overwhelming Power",
|
||||
[9] = "A Stranger's Plea",
|
||||
[10] = "Vengeance",
|
||||
[11] = "Sign of Resistance",
|
||||
[12] = "The Prophet's Gambit",
|
||||
[13] = "Rendezvous",
|
||||
[14] = "From Darkness",
|
||||
[15] = "Prisoners No More",
|
||||
[16] = "Threat Reduction",
|
||||
[17] = "A Strike at the Heart",
|
||||
[18] = "Return to the Vindicaar",
|
||||
[19] = "A Moment of Respite",
|
||||
[20] = "Gathering Light",
|
||||
[21] = "Crystals Not Included",
|
||||
[22] = "A Grim Equation",
|
||||
[23] = "The Best Prevention",
|
||||
[24] = "Fire at Will",
|
||||
[25] = "Locating the Longshot",
|
||||
[26] = "Bringing the Big Guns",
|
||||
[27] = "Lightly Roasted",
|
||||
[28] = "The Light Mother",
|
||||
[29] = "Light's Return",
|
||||
[30] = "The Child of Light and Shadow",
|
||||
[31] = "Essence of the Light Mother",
|
||||
[32] = "The Vindicaar Matrix Core",
|
||||
[33] = "An Offering of Light",
|
||||
[34] = "The Burning Heart",
|
||||
[35] = "Securing a Foothold",
|
||||
[36] = "Reinforce Light's Purchase",
|
||||
[37] = "Reinforce the Veiled Den",
|
||||
[38] = "Sizing Up The Opposition",
|
||||
[39] = "The Speaker Calls",
|
||||
[40] = "Visions of Torment",
|
||||
[41] = "Dire News",
|
||||
[42] = "Storming the Citadel",
|
||||
[43] = "Scars of the Past",
|
||||
[44] = "Preventive Measures",
|
||||
[45] = "Chaos Theory",
|
||||
[46] = "Dark Machinations",
|
||||
[47] = "A Touch of Fel",
|
||||
[48] = "Heralds of Apocalypse",
|
||||
[49] = "Dawn of Justice",
|
||||
[50] = "Lord of the Spire",
|
||||
[51] = "Forming a Bond",
|
||||
[52] = "A Floating Ruin",
|
||||
[53] = "Mac'Aree, Jewel of Argus",
|
||||
[54] = "Defenseless and Afraid",
|
||||
[55] = "Khazaduum, First of His Name",
|
||||
[56] = "Consecrating Ground",
|
||||
[57] = "The Path Forward",
|
||||
[58] = "Not-So-Humble Beginnings",
|
||||
[59] = "Conservation of Magic",
|
||||
[60] = "Invasive Species",
|
||||
[61] = "The Longest Vigil",
|
||||
[62] = "Gatekeeper's Challenge: Tenacity",
|
||||
[63] = "Gatekeeper's Challenge: Cunning",
|
||||
[64] = "Gatekeeper's Challenge: Mastery",
|
||||
[65] = "The Defiler's Legacy",
|
||||
[66] = "The Sigil of Awakening",
|
||||
[67] = "Where They Least Expect It",
|
||||
[68] = "We Have a Problem",
|
||||
[69] = "A Non-Prophet Organization",
|
||||
[70] = "Wrath of the Hight Exarch",
|
||||
[71] = "Overt Ops",
|
||||
[72] = "Flanking Maneuvers",
|
||||
[73] = "Talgath's Forces",
|
||||
[74] = "What Might Have Been",
|
||||
[75] = "Across the Universe",
|
||||
[76] = "Shadow of the Triumvirate",
|
||||
[77] = "The Seat of the Triumvirate",
|
||||
[78] = "Whispers from Oronaar",
|
||||
[79] = "Arkhaan's Prayers",
|
||||
[80] = "The Pulsing Madness",
|
||||
[81] = "Arkhaan's Pain",
|
||||
[82] = "Arkhaan's Plan",
|
||||
[83] = "Arkhaan's Peril",
|
||||
[84] = "Throwing Shade",
|
||||
[85] = "Sources of Darkness",
|
||||
[86] = "The Shadowguard Incursion",
|
||||
[87] = "A Vessel Made Ready",
|
||||
[88] = "A Beacon in the Dark",
|
||||
[89] = "An Offering of Shadow",
|
||||
}
|
||||
aura_env.TESTCOMPLETION = {
|
||||
[1] = true,
|
||||
[2] = true,
|
||||
[3] = true,
|
||||
[4] = true,
|
||||
[5] = true,
|
||||
[6] = true,
|
||||
[7] = true,
|
||||
[8] = true,
|
||||
[9] = true,
|
||||
[10] = true,
|
||||
[11] = true,
|
||||
[12] = true,
|
||||
[13] = true,
|
||||
[14] = true,
|
||||
[15] = true,
|
||||
[16] = true,
|
||||
[17] = true,
|
||||
[18] = true,
|
||||
[19] = true,
|
||||
[20] = true,
|
||||
[21] = true,
|
||||
[22] = true,
|
||||
[23] = true,
|
||||
[24] = true,
|
||||
[25] = true,
|
||||
[26] = true,
|
||||
[27] = true,
|
||||
[28] = true,
|
||||
[29] = true,
|
||||
[30] = true,
|
||||
[31] = true,
|
||||
[32] = true,
|
||||
[33] = true,
|
||||
[34] = true,
|
||||
[35] = true,
|
||||
[36] = false,
|
||||
[37] = true,
|
||||
[38] = true,
|
||||
[39] = true,
|
||||
[40] = true,
|
||||
[41] = true,
|
||||
[42] = true,
|
||||
[43] = true,
|
||||
[44] = true,
|
||||
[45] = true,
|
||||
[46] = true,
|
||||
[47] = true,
|
||||
[48] = true,
|
||||
[49] = false,
|
||||
[50] = false,
|
||||
[51] = false,
|
||||
[52] = false,
|
||||
[53] = false,
|
||||
[54] = false,
|
||||
[55] = false,
|
||||
[56] = false,
|
||||
[57] = false,
|
||||
[58] = false,
|
||||
[59] = false,
|
||||
[60] = false,
|
||||
[61] = false,
|
||||
[62] = false,
|
||||
[63] = false,
|
||||
[64] = false,
|
||||
[65] = false,
|
||||
[66] = false,
|
||||
[67] = false,
|
||||
[68] = false,
|
||||
[69] = false,
|
||||
[70] = false,
|
||||
[71] = false,
|
||||
[72] = false,
|
||||
[73] = false,
|
||||
[74] = false,
|
||||
[75] = false,
|
||||
[76] = false,
|
||||
[77] = false,
|
||||
[78] = false,
|
||||
[79] = false,
|
||||
[80] = false,
|
||||
[81] = false,
|
||||
[82] = false,
|
||||
[83] = false,
|
||||
[84] = false,
|
||||
[85] = false,
|
||||
[86] = false,
|
||||
[87] = false,
|
||||
[88] = false,
|
||||
[89] = false,
|
||||
}
|
||||
WeakAuras.ScanEvents("QUEST_TURNED_IN")
|
||||
--QUEST_ACCEPTED QUEST_TURNED_IN
|
||||
function(e)
|
||||
for k, v in ipairs(aura_env.questDatabase) do
|
||||
if IsQuestFlaggedCompleted(v) == false then
|
||||
--print(aura_env.TESTCOMPLETION[k])
|
||||
--if aura_env.TESTCOMPLETION[k] == false then
|
||||
--print(k, IsQuestFlaggedCompleted(v))
|
||||
if k < 36 or k > 37 then
|
||||
aura_env.currentQuest = k
|
||||
break
|
||||
elseif (k == 36 and IsQuestFlaggedCompleted(aura_env.questDatabase[37]) == true) or (k == 37 and IsQuestFlaggedCompleted(aura_env.questDatabase[36]) == true) then
|
||||
--elseif (k == 36 and aura_env.TESTCOMPLETION[37] == true) or (k == 37 and aura_env.TESTCOMPLETION[36] == true) then
|
||||
k = 38
|
||||
end
|
||||
end
|
||||
end
|
||||
--print(aura_env.currentQuest)
|
||||
return true
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
if aura_env.currentQuest < 89 then
|
||||
return "Progress: " .. aura_env.currentQuest .. "/" .. #aura_env.questDatabase .. "\nCurrent quest: " .. aura_env.questNames[aura_env.currentQuest] .. "\nNext Quest: " .. aura_env.questNames[aura_env.currentQuest + 1]
|
||||
else
|
||||
return "Progress: " .. aura_env.currentQuest .. "/" .. #aura_env.questDatabase .. "\nCurrent quest: " .. aura_env.questNames[aura_env.currentQuest]
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.currentQuest = 1
|
||||
aura_env.questDatabase = {
|
||||
[1] = 47835,
|
||||
[2] = 47867,
|
||||
[3] = 47223,
|
||||
[4] = 47224,
|
||||
[5] = 48440,
|
||||
[6] = 46938,
|
||||
[7] = 47589,
|
||||
[8] = 46297,
|
||||
[9] = 48483,
|
||||
[10] = 47627,
|
||||
[11] = 47641,
|
||||
[12] = 46732,
|
||||
[13] = 46816,
|
||||
[14] = 46839,
|
||||
[15] = 46840,
|
||||
[16] = 46841,
|
||||
[17] = 46842,
|
||||
[18] = 46843,
|
||||
[19] = 48500,
|
||||
[20] = 47431,
|
||||
[21] = 46213,
|
||||
[22] = 40238,
|
||||
[23] = 47541,
|
||||
[24] = 47508,
|
||||
[25] = 47771,
|
||||
[26] = 47526,
|
||||
[27] = 47754,
|
||||
[28] = 47652,
|
||||
[29] = 47653,
|
||||
[30] = 47743,
|
||||
[31] = 49143,
|
||||
[32] = 47287,
|
||||
[33] = 48559,
|
||||
[34] = 48199,
|
||||
[35] = 48200,
|
||||
[36] = 48201,
|
||||
[37] = 48202,
|
||||
[38] = 47473,
|
||||
[39] = 47889,
|
||||
[40] = 47890,
|
||||
[41] = 47891,
|
||||
[42] = 47892,
|
||||
[43] = 47986,
|
||||
[44] = 47987,
|
||||
[45] = 47988,
|
||||
[46] = 47991,
|
||||
[47] = 47990,
|
||||
[48] = 47989,
|
||||
[49] = 47992,
|
||||
[50] = 47993,
|
||||
[51] = 47994,
|
||||
[52] = 48081,
|
||||
[53] = 46815,
|
||||
[54] = 46818,
|
||||
[55] = 46834,
|
||||
[56] = 47066,
|
||||
[57] = 46941,
|
||||
[58] = 47686,
|
||||
[59] = 47882,
|
||||
[60] = 47688,
|
||||
[61] = 47883,
|
||||
[62] = 47689,
|
||||
[63] = 47685,
|
||||
[64] = 47687,
|
||||
[65] = 47690,
|
||||
[66] = 48107,
|
||||
[67] = 48461,
|
||||
[68] = 48344,
|
||||
[69] = 47691,
|
||||
[70] = 47854,
|
||||
[71] = 47995,
|
||||
[72] = 47853,
|
||||
[73] = 48345,
|
||||
[74] = 47855,
|
||||
[75] = 47856,
|
||||
[76] = 47416,
|
||||
[77] = 47238,
|
||||
[78] = 40761,
|
||||
[79] = 47101,
|
||||
[80] = 47180,
|
||||
[81] = 47100,
|
||||
[82] = 47183,
|
||||
[83] = 47184,
|
||||
[84] = 47203,
|
||||
[85] = 47217,
|
||||
[86] = 47218,
|
||||
[87] = 47219,
|
||||
[88] = 47220,
|
||||
[89] = 48560,
|
||||
}
|
||||
aura_env.questNames = {
|
||||
[1] = "The Hand of Fate",
|
||||
[2] = "Two If By Sea",
|
||||
[3] = "Light's Exodus",
|
||||
[4] = "The Vindicaar",
|
||||
[5] = "Into the Night",
|
||||
[6] = "Alone in the Abyss",
|
||||
[7] = "Righteous Fury",
|
||||
[8] = "Overwhelming Power",
|
||||
[9] = "A Stranger's Plea",
|
||||
[10] = "Vengeance",
|
||||
[11] = "Sign of Resistance",
|
||||
[12] = "The Prophet's Gambit",
|
||||
[13] = "Rendezvous",
|
||||
[14] = "From Darkness",
|
||||
[15] = "Prisoners No More",
|
||||
[16] = "Threat Reduction",
|
||||
[17] = "A Strike at the Heart",
|
||||
[18] = "Return to the Vindicaar",
|
||||
[19] = "A Moment of Respite",
|
||||
[20] = "Gathering Light",
|
||||
[21] = "Crystals Not Included",
|
||||
[22] = "A Grim Equation",
|
||||
[23] = "The Best Prevention",
|
||||
[24] = "Fire at Will",
|
||||
[25] = "Locating the Longshot",
|
||||
[26] = "Bringing the Big Guns",
|
||||
[27] = "Lightly Roasted",
|
||||
[28] = "The Light Mother",
|
||||
[29] = "Light's Return",
|
||||
[30] = "The Child of Light and Shadow",
|
||||
[31] = "Essence of the Light Mother",
|
||||
[32] = "The Vindicaar Matrix Core",
|
||||
[33] = "An Offering of Light",
|
||||
[34] = "The Burning Heart",
|
||||
[35] = "Securing a Foothold",
|
||||
[36] = "Reinforce Light's Purchase",
|
||||
[37] = "Reinforce the Veiled Den",
|
||||
[38] = "Sizing Up The Opposition",
|
||||
[39] = "The Speaker Calls",
|
||||
[40] = "Visions of Torment",
|
||||
[41] = "Dire News",
|
||||
[42] = "Storming the Citadel",
|
||||
[43] = "Scars of the Past",
|
||||
[44] = "Preventive Measures",
|
||||
[45] = "Chaos Theory",
|
||||
[46] = "Dark Machinations",
|
||||
[47] = "A Touch of Fel",
|
||||
[48] = "Heralds of Apocalypse",
|
||||
[49] = "Dawn of Justice",
|
||||
[50] = "Lord of the Spire",
|
||||
[51] = "Forming a Bond",
|
||||
[52] = "A Floating Ruin",
|
||||
[53] = "Mac'Aree, Jewel of Argus",
|
||||
[54] = "Defenseless and Afraid",
|
||||
[55] = "Khazaduum, First of His Name",
|
||||
[56] = "Consecrating Ground",
|
||||
[57] = "The Path Forward",
|
||||
[58] = "Not-So-Humble Beginnings",
|
||||
[59] = "Conservation of Magic",
|
||||
[60] = "Invasive Species",
|
||||
[61] = "The Longest Vigil",
|
||||
[62] = "Gatekeeper's Challenge: Tenacity",
|
||||
[63] = "Gatekeeper's Challenge: Cunning",
|
||||
[64] = "Gatekeeper's Challenge: Mastery",
|
||||
[65] = "The Defiler's Legacy",
|
||||
[66] = "The Sigil of Awakening",
|
||||
[67] = "Where They Least Expect It",
|
||||
[68] = "We Have a Problem",
|
||||
[69] = "A Non-Prophet Organization",
|
||||
[70] = "Wrath of the Hight Exarch",
|
||||
[71] = "Overt Ops",
|
||||
[72] = "Flanking Maneuvers",
|
||||
[73] = "Talgath's Forces",
|
||||
[74] = "What Might Have Been",
|
||||
[75] = "Across the Universe",
|
||||
[76] = "Shadow of the Triumvirate",
|
||||
[77] = "The Seat of the Triumvirate",
|
||||
[78] = "Whispers from Oronaar",
|
||||
[79] = "Arkhaan's Prayers",
|
||||
[80] = "The Pulsing Madness",
|
||||
[81] = "Arkhaan's Pain",
|
||||
[82] = "Arkhaan's Plan",
|
||||
[83] = "Arkhaan's Peril",
|
||||
[84] = "Throwing Shade",
|
||||
[85] = "Sources of Darkness",
|
||||
[86] = "The Shadowguard Incursion",
|
||||
[87] = "A Vessel Made Ready",
|
||||
[88] = "A Beacon in the Dark",
|
||||
[89] = "An Offering of Shadow",
|
||||
}
|
||||
aura_env.TESTCOMPLETION = {
|
||||
[1] = true,
|
||||
[2] = true,
|
||||
[3] = true,
|
||||
[4] = true,
|
||||
[5] = true,
|
||||
[6] = true,
|
||||
[7] = true,
|
||||
[8] = true,
|
||||
[9] = true,
|
||||
[10] = true,
|
||||
[11] = true,
|
||||
[12] = true,
|
||||
[13] = true,
|
||||
[14] = true,
|
||||
[15] = true,
|
||||
[16] = true,
|
||||
[17] = true,
|
||||
[18] = true,
|
||||
[19] = true,
|
||||
[20] = true,
|
||||
[21] = true,
|
||||
[22] = true,
|
||||
[23] = true,
|
||||
[24] = true,
|
||||
[25] = true,
|
||||
[26] = true,
|
||||
[27] = true,
|
||||
[28] = true,
|
||||
[29] = true,
|
||||
[30] = true,
|
||||
[31] = true,
|
||||
[32] = true,
|
||||
[33] = true,
|
||||
[34] = true,
|
||||
[35] = true,
|
||||
[36] = false,
|
||||
[37] = true,
|
||||
[38] = true,
|
||||
[39] = true,
|
||||
[40] = true,
|
||||
[41] = true,
|
||||
[42] = true,
|
||||
[43] = true,
|
||||
[44] = true,
|
||||
[45] = true,
|
||||
[46] = true,
|
||||
[47] = true,
|
||||
[48] = true,
|
||||
[49] = false,
|
||||
[50] = false,
|
||||
[51] = false,
|
||||
[52] = false,
|
||||
[53] = false,
|
||||
[54] = false,
|
||||
[55] = false,
|
||||
[56] = false,
|
||||
[57] = false,
|
||||
[58] = false,
|
||||
[59] = false,
|
||||
[60] = false,
|
||||
[61] = false,
|
||||
[62] = false,
|
||||
[63] = false,
|
||||
[64] = false,
|
||||
[65] = false,
|
||||
[66] = false,
|
||||
[67] = false,
|
||||
[68] = false,
|
||||
[69] = false,
|
||||
[70] = false,
|
||||
[71] = false,
|
||||
[72] = false,
|
||||
[73] = false,
|
||||
[74] = false,
|
||||
[75] = false,
|
||||
[76] = false,
|
||||
[77] = false,
|
||||
[78] = false,
|
||||
[79] = false,
|
||||
[80] = false,
|
||||
[81] = false,
|
||||
[82] = false,
|
||||
[83] = false,
|
||||
[84] = false,
|
||||
[85] = false,
|
||||
[86] = false,
|
||||
[87] = false,
|
||||
[88] = false,
|
||||
[89] = false,
|
||||
}
|
||||
WeakAuras.ScanEvents("QUEST_TURNED_IN")
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
--make auto attack speed predictor thing please
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED
|
||||
function(allstates, e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local time = debugprofilestop()
|
||||
local subevent = select(2, ...)
|
||||
if subevent == "SWING_DAMAGE" or subevent == "SWING_MISSED" then
|
||||
local source = select(4, ...)
|
||||
local destination = select(9, ...)
|
||||
if source == UnitGUID("target") and destination == UnitName("player") then
|
||||
if #aura_env.swings == aura_env.lines * 2 then
|
||||
for k,v in ipairs(aura_env.swings) do
|
||||
if k > 1 then
|
||||
aura_env.swings[k - 1] = v
|
||||
end
|
||||
end
|
||||
table.remove(aura_env.swings, (aura_env.lines * 2))
|
||||
table.insert(aura_env.swings, time)
|
||||
else
|
||||
table.insert(aura_env.swings, time)
|
||||
end
|
||||
local avgTime = 0
|
||||
for k,v in ipairs(aura_env.swings) do
|
||||
if k > 1 then
|
||||
if avgTime == 0 then
|
||||
avgTime = aura_env.swings[k] - aura_env.swings[k - 1]
|
||||
else
|
||||
avgTime = (avgTime + (aura_env.swings[k] - aura_env.swings[k - 1])) / 2
|
||||
end
|
||||
end
|
||||
end
|
||||
allstates[1] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
progressType = "timed",
|
||||
avgTime = string.format("%.2f", avgTime / 1000),
|
||||
expirationTime = GetTime() + (avgTime / 1000),
|
||||
duration = avgTime / 1000,
|
||||
}
|
||||
print("return true", allstates[1].expirationTime, allstates[1].duration)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_DISABLED" or e == "PLAYER_REGEN_ENABLED" then
|
||||
aura_env.swings = {}
|
||||
if allstates[1] then
|
||||
allstates[1].show = false
|
||||
allstates[1].changed = true
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.swings = {}
|
||||
--make auto attack speed predictor thing please
|
||||
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED
|
||||
function(allstates, e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local time = debugprofilestop()
|
||||
local subevent = select(2, ...)
|
||||
if subevent == "SWING_DAMAGE" or subevent == "SWING_MISSED" then
|
||||
local source = select(4, ...)
|
||||
local destination = select(9, ...)
|
||||
if source == UnitGUID("target") and destination == UnitName("player") then
|
||||
if #aura_env.swings == aura_env.lines * 2 then
|
||||
for k,v in ipairs(aura_env.swings) do
|
||||
if k > 1 then
|
||||
aura_env.swings[k - 1] = v
|
||||
end
|
||||
end
|
||||
table.remove(aura_env.swings, (aura_env.lines * 2))
|
||||
table.insert(aura_env.swings, time)
|
||||
else
|
||||
table.insert(aura_env.swings, time)
|
||||
end
|
||||
local avgTime = 0
|
||||
for k,v in ipairs(aura_env.swings) do
|
||||
if k > 1 then
|
||||
if avgTime == 0 then
|
||||
avgTime = aura_env.swings[k] - aura_env.swings[k - 1]
|
||||
else
|
||||
avgTime = (avgTime + (aura_env.swings[k] - aura_env.swings[k - 1])) / 2
|
||||
end
|
||||
end
|
||||
end
|
||||
allstates[1] = {
|
||||
show = true,
|
||||
changed = true,
|
||||
progressType = "timed",
|
||||
avgTime = string.format("%.2f", avgTime / 1000),
|
||||
expirationTime = GetTime() + (avgTime / 1000),
|
||||
duration = avgTime / 1000,
|
||||
}
|
||||
print("return true", allstates[1].expirationTime, allstates[1].duration)
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif e == "PLAYER_REGEN_DISABLED" or e == "PLAYER_REGEN_ENABLED" then
|
||||
aura_env.swings = {}
|
||||
if allstates[1] then
|
||||
allstates[1].show = false
|
||||
allstates[1].changed = true
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.swings = {}
|
||||
aura_env.lines = 2
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,40 +1,40 @@
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.output
|
||||
end
|
||||
|
||||
--Try SPELL_RESSURECT -- RESSURECT event??
|
||||
--UNIT_HEALTH
|
||||
function()
|
||||
local healthP = 0
|
||||
local aliveMembers = GetNumGroupMembers()
|
||||
if IsInRaid("player") == true then
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
if UnitIsDeadOrGhost("raid" .. i) == false and UnitIsConnected("raid" .. i) == true then
|
||||
healthP = healthP + math.floor(UnitHealth("raid" .. i) / UnitHealthMax("raid" .. i) * 10000) / 100
|
||||
end
|
||||
if UnitIsDeadOrGhost("raid" .. i) == true or UnitIsConnected("raid" .. i) == false then
|
||||
aliveMembers = aliveMembers - 1
|
||||
end
|
||||
end
|
||||
else
|
||||
for i = 1, GetNumGroupMembers() - 1 do
|
||||
if UnitIsDeadOrGhost("party" .. i) == false and UnitIsConnected("party" .. i) == true then
|
||||
healthP = healthP + math.floor(UnitHealth("party" .. i) / UnitHealthMax("party" .. i) * 10000) / 100
|
||||
end
|
||||
if UnitIsDeadOrGhost("party" .. i) == true or UnitIsConnected("party" .. i) == false then
|
||||
aliveMembers = aliveMembers - 1
|
||||
end
|
||||
end
|
||||
if UnitIsDeadOrGhost("player") == false and UnitIsConnected("player") == true then
|
||||
healthP = healthP + math.floor(UnitHealth("player") / UnitHealthMax("player") * 10000) / 100
|
||||
end
|
||||
if UnitIsDeadOrGhost("player") == true or UnitIsConnected("player") == false then
|
||||
aliveMembers = aliveMembers - 1
|
||||
end
|
||||
end
|
||||
aura_env.output = math.floor(healthP / aliveMembers * 100) / 100 .. "%%"
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.output = 0
|
||||
--DISPLAY
|
||||
function()
|
||||
return aura_env.output
|
||||
end
|
||||
|
||||
--Try SPELL_RESSURECT -- RESSURECT event??
|
||||
--UNIT_HEALTH
|
||||
function()
|
||||
local healthP = 0
|
||||
local aliveMembers = GetNumGroupMembers()
|
||||
if IsInRaid("player") == true then
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
if UnitIsDeadOrGhost("raid" .. i) == false and UnitIsConnected("raid" .. i) == true then
|
||||
healthP = healthP + math.floor(UnitHealth("raid" .. i) / UnitHealthMax("raid" .. i) * 10000) / 100
|
||||
end
|
||||
if UnitIsDeadOrGhost("raid" .. i) == true or UnitIsConnected("raid" .. i) == false then
|
||||
aliveMembers = aliveMembers - 1
|
||||
end
|
||||
end
|
||||
else
|
||||
for i = 1, GetNumGroupMembers() - 1 do
|
||||
if UnitIsDeadOrGhost("party" .. i) == false and UnitIsConnected("party" .. i) == true then
|
||||
healthP = healthP + math.floor(UnitHealth("party" .. i) / UnitHealthMax("party" .. i) * 10000) / 100
|
||||
end
|
||||
if UnitIsDeadOrGhost("party" .. i) == true or UnitIsConnected("party" .. i) == false then
|
||||
aliveMembers = aliveMembers - 1
|
||||
end
|
||||
end
|
||||
if UnitIsDeadOrGhost("player") == false and UnitIsConnected("player") == true then
|
||||
healthP = healthP + math.floor(UnitHealth("player") / UnitHealthMax("player") * 10000) / 100
|
||||
end
|
||||
if UnitIsDeadOrGhost("player") == true or UnitIsConnected("player") == false then
|
||||
aliveMembers = aliveMembers - 1
|
||||
end
|
||||
end
|
||||
aura_env.output = math.floor(healthP / aliveMembers * 100) / 100 .. "%%"
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.output = 0
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
-- DISPLAY
|
||||
function aa()
|
||||
if UnitDebuff("focus", "Paralytic Poison") then -- application for stun
|
||||
local stacks = select(4, UnitDebuff("focus", "Paralytic Poison"))
|
||||
return stacks
|
||||
end
|
||||
if UnitDebuff("focus", "Partial Paralysis") then return "ROOT'D" end
|
||||
if UnitDebuff("focus", "Paralysis") then return "PLS HELP" end
|
||||
end
|
||||
-- TRIGGER
|
||||
function bb()
|
||||
if UnitDebuff("focus", "Paralytic Poison") or
|
||||
UnitDebuff("focus", "Partial Paralysis") or
|
||||
UnitDebuff("focus", "Paralysis") then -- application for stun
|
||||
return true
|
||||
end
|
||||
end
|
||||
-- UNTRIGGER
|
||||
function cc()
|
||||
if UnitDebuff("focus", "Paralytic Poison") == nil and
|
||||
UnitDebuff("focus", "Partial Paralysis") == nil and
|
||||
UnitDebuff("focus", "Paralysis") == nil then -- application for stun
|
||||
return true
|
||||
end
|
||||
end
|
||||
-- DISPLAY
|
||||
function aa()
|
||||
if UnitDebuff("focus", "Paralytic Poison") then -- application for stun
|
||||
local stacks = select(4, UnitDebuff("focus", "Paralytic Poison"))
|
||||
return stacks
|
||||
end
|
||||
if UnitDebuff("focus", "Partial Paralysis") then return "ROOT'D" end
|
||||
if UnitDebuff("focus", "Paralysis") then return "PLS HELP" end
|
||||
end
|
||||
-- TRIGGER
|
||||
function bb()
|
||||
if UnitDebuff("focus", "Paralytic Poison") or
|
||||
UnitDebuff("focus", "Partial Paralysis") or
|
||||
UnitDebuff("focus", "Paralysis") then -- application for stun
|
||||
return true
|
||||
end
|
||||
end
|
||||
-- UNTRIGGER
|
||||
function cc()
|
||||
if UnitDebuff("focus", "Paralytic Poison") == nil and
|
||||
UnitDebuff("focus", "Partial Paralysis") == nil and
|
||||
UnitDebuff("focus", "Paralysis") == nil then -- application for stun
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
LOOT_OPENED
|
||||
function()
|
||||
aura_env.lootTime = math.floor(GetTime()) + 300
|
||||
end
|
||||
|
||||
DISPLAY
|
||||
function()
|
||||
local currentTime = math.floor(GetTime())
|
||||
if currentTime > aura_env.lootTime and aura_env.lootTime > 0 then
|
||||
return "FISHING BOAT MOTHERFUCKERS"
|
||||
else
|
||||
return aura_env.lootTime - currentTime
|
||||
end
|
||||
end
|
||||
|
||||
INTI
|
||||
aura_env.lootTime = 0
|
||||
LOOT_OPENED
|
||||
function()
|
||||
aura_env.lootTime = math.floor(GetTime()) + 300
|
||||
end
|
||||
|
||||
DISPLAY
|
||||
function()
|
||||
local currentTime = math.floor(GetTime())
|
||||
if currentTime > aura_env.lootTime and aura_env.lootTime > 0 then
|
||||
return "FISHING BOAT MOTHERFUCKERS"
|
||||
else
|
||||
return aura_env.lootTime - currentTime
|
||||
end
|
||||
end
|
||||
|
||||
INTI
|
||||
aura_env.lootTime = 0
|
||||
|
||||
@@ -1,275 +1,275 @@
|
||||
--TODO: FIX THE FUCKING THING
|
||||
--I had no idea what I was doing lol
|
||||
|
||||
TRIGGER FOR HP
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
local output = ""
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
--if UnitName("nameplate" .. i) == bossList[j] then
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
TRIGGER FOR POWER
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
--if UnitName("nameplate" .. i) == bossList[j] then
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
if UnitPower("nameplate" .. i) > 0 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
TRIGGER FOR CASTBAR
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
local output = ""
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
if UnitCastingInfo("nameplate" .. i) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
DISPLAY FOR HP
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
local output = ""
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
--if UnitName("nameplate" .. i) == bossList[j] then
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
aura_env.bossHp = UnitHealth("nameplate" .. i)
|
||||
aura_env.bossMaxHp = UnitHealthMax("nameplate" .. i)
|
||||
aura_env.bossPer = math.floor((aura_env.bossHp / aura_env.bossMaxHp) * 100)
|
||||
output = math.floor(aura_env.bossHp / 1e6) .. "M%/" .. math.floor(aura_env.bossMaxHp / 1e6) .. "M - " .. aura_env.bossPer .. "%%"
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
DISPLAY FOR POWER
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
local output = ""
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
--if UnitName("nameplate" .. i) == bossList[j] then
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
if UnitPower("nameplate" .. i) > 0 then
|
||||
aura_env.bossPower = UnitPower("nameplate" .. i)
|
||||
aura_env.bossPowerMax = UnitPowerMax("nameplate" .. i)
|
||||
aura_env.bossPer = math.floor((aura_env.bossPower / aura_env.bossPowerMax) * 100)
|
||||
output = aura_env.bossPower .. "%/" .. aura_env.bossPowerMax .. " " .. aura_env.bossPer .. "%%"
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
DISPLAY FOR CASTBAR
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
local output = ""
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
if UnitCastingInfo("nameplate" .. i) then
|
||||
aura_env.bossCast = UnitCastingInfo("nameplate" .. i)
|
||||
aura_env.castEnd = select(6, UnitCastingInfo("nameplate" .. i))
|
||||
aura_env.castStart = select(5, UnitCastingInfo("nameplate" .. i))
|
||||
output = aura_env.bossCast .. " - " .. math.floor(((aura_env.castEnd - GetTime() * 1000) / 1000) * 100) / 100
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
DURATION FOR HP
|
||||
function()
|
||||
return aura_env.bossHp, aura_env.bossMaxHp, 1
|
||||
end
|
||||
|
||||
DURATION FOR POWER
|
||||
function()
|
||||
return aura_env.bossPower, aura_env.bossPowerMax, 1
|
||||
end
|
||||
|
||||
DURATION FOR CASTBAR
|
||||
function()
|
||||
return aura_env.castEnd - GetTime() * 1000, aura_env.castEnd - aura_env.castStart, 1
|
||||
end
|
||||
|
||||
DISPLAY FOR NAME
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
local output = ""
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
--if UnitName("nameplate" .. i) == bossList[j] then
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
output = UnitName("nameplate" .. i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
ANIMATION FOR HP
|
||||
function()
|
||||
local function range (val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
end
|
||||
local c = aura_env.bossHp / aura_env.bossMaxHp
|
||||
c = 1 - 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
|
||||
|
||||
INIT FOR HP
|
||||
aura_env.bossHp = 1
|
||||
aura_env.bossMaxHp = 1
|
||||
aura_env.bossPer = 1
|
||||
|
||||
INIT FOR POWER
|
||||
aura_env.bossPower = 1
|
||||
aura_env.bossPowerMax = 1
|
||||
aura_env.bossPer = 1
|
||||
|
||||
INIT FOR CASTBAR
|
||||
aura_env.castEnd = 0
|
||||
aura_env.castStart = 0
|
||||
aura_env.bossCast = ""
|
||||
--TODO: FIX THE FUCKING THING
|
||||
--I had no idea what I was doing lol
|
||||
|
||||
TRIGGER FOR HP
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
local output = ""
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
--if UnitName("nameplate" .. i) == bossList[j] then
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
TRIGGER FOR POWER
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
--if UnitName("nameplate" .. i) == bossList[j] then
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
if UnitPower("nameplate" .. i) > 0 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
TRIGGER FOR CASTBAR
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
local output = ""
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
if UnitCastingInfo("nameplate" .. i) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
DISPLAY FOR HP
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
local output = ""
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
--if UnitName("nameplate" .. i) == bossList[j] then
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
aura_env.bossHp = UnitHealth("nameplate" .. i)
|
||||
aura_env.bossMaxHp = UnitHealthMax("nameplate" .. i)
|
||||
aura_env.bossPer = math.floor((aura_env.bossHp / aura_env.bossMaxHp) * 100)
|
||||
output = math.floor(aura_env.bossHp / 1e6) .. "M%/" .. math.floor(aura_env.bossMaxHp / 1e6) .. "M - " .. aura_env.bossPer .. "%%"
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
DISPLAY FOR POWER
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
local output = ""
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
--if UnitName("nameplate" .. i) == bossList[j] then
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
if UnitPower("nameplate" .. i) > 0 then
|
||||
aura_env.bossPower = UnitPower("nameplate" .. i)
|
||||
aura_env.bossPowerMax = UnitPowerMax("nameplate" .. i)
|
||||
aura_env.bossPer = math.floor((aura_env.bossPower / aura_env.bossPowerMax) * 100)
|
||||
output = aura_env.bossPower .. "%/" .. aura_env.bossPowerMax .. " " .. aura_env.bossPer .. "%%"
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
DISPLAY FOR CASTBAR
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
local output = ""
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
if UnitCastingInfo("nameplate" .. i) then
|
||||
aura_env.bossCast = UnitCastingInfo("nameplate" .. i)
|
||||
aura_env.castEnd = select(6, UnitCastingInfo("nameplate" .. i))
|
||||
aura_env.castStart = select(5, UnitCastingInfo("nameplate" .. i))
|
||||
output = aura_env.bossCast .. " - " .. math.floor(((aura_env.castEnd - GetTime() * 1000) / 1000) * 100) / 100
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
DURATION FOR HP
|
||||
function()
|
||||
return aura_env.bossHp, aura_env.bossMaxHp, 1
|
||||
end
|
||||
|
||||
DURATION FOR POWER
|
||||
function()
|
||||
return aura_env.bossPower, aura_env.bossPowerMax, 1
|
||||
end
|
||||
|
||||
DURATION FOR CASTBAR
|
||||
function()
|
||||
return aura_env.castEnd - GetTime() * 1000, aura_env.castEnd - aura_env.castStart, 1
|
||||
end
|
||||
|
||||
DISPLAY FOR NAME
|
||||
function()
|
||||
local bossList =
|
||||
{
|
||||
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
|
||||
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
|
||||
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
|
||||
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
|
||||
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
|
||||
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
|
||||
"Ymiron", "Harbaron", "Helya", --MoS
|
||||
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
|
||||
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
|
||||
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
|
||||
}
|
||||
local output = ""
|
||||
|
||||
for i = 1, 40 do
|
||||
for j = 1, table.getn(bossList) do
|
||||
--if UnitName("nameplate" .. i) == bossList[j] then
|
||||
if UnitExists("nameplate" .. i) then
|
||||
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
|
||||
output = UnitName("nameplate" .. i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
ANIMATION FOR HP
|
||||
function()
|
||||
local function range (val, min, max, max2)
|
||||
val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
end
|
||||
local c = aura_env.bossHp / aura_env.bossMaxHp
|
||||
c = 1 - 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
|
||||
|
||||
INIT FOR HP
|
||||
aura_env.bossHp = 1
|
||||
aura_env.bossMaxHp = 1
|
||||
aura_env.bossPer = 1
|
||||
|
||||
INIT FOR POWER
|
||||
aura_env.bossPower = 1
|
||||
aura_env.bossPowerMax = 1
|
||||
aura_env.bossPer = 1
|
||||
|
||||
INIT FOR CASTBAR
|
||||
aura_env.castEnd = 0
|
||||
aura_env.castStart = 0
|
||||
aura_env.bossCast = ""
|
||||
|
||||
@@ -1,67 +1,67 @@
|
||||
--GET MAX SHIELD ABSORB AND BAR FOR ABSORB
|
||||
TRIGGER
|
||||
function()
|
||||
local buff = UnitBuff("player", "Bulwark of Order") or ""
|
||||
if buff ~= "" then return true else return false end
|
||||
end
|
||||
|
||||
DURATION
|
||||
function()
|
||||
local shieldAmount = select(17, UnitBuff("player", "Bulwark of Order"))
|
||||
if shieldAmount > aura_env.maxShield then
|
||||
aura_env.maxShield = shieldAmount
|
||||
end
|
||||
return shieldAmount, aura_env.maxShield, 1
|
||||
end
|
||||
|
||||
DISPLAY
|
||||
function()
|
||||
local shield = select(17, UnitBuff("player", "Bulwark of Order")) or 0
|
||||
return math.floor(shield / 1000) .. "k"
|
||||
end
|
||||
|
||||
ANIMATION
|
||||
function()
|
||||
local function range(val, min, max, max2)
|
||||
local val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
end
|
||||
|
||||
local endTime = select(7, UnitBuff("player", "Bulwark of Order")) * 1000
|
||||
local time = GetTime() * 1000
|
||||
local maxDur = select(6, UnitBuff("player", "Bulwark of Order")) * 1000
|
||||
local duration = endTime - time
|
||||
local c = range(duration, 0, maxDur, 1)
|
||||
--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
|
||||
|
||||
ON SHOW
|
||||
aura_env.maxShield = 0
|
||||
|
||||
TRIGGER
|
||||
function()
|
||||
local buff = UnitBuff("player", "Bulwark of Order") or ""
|
||||
if buff ~= "" then return true else return false end
|
||||
end
|
||||
|
||||
DURATION
|
||||
function()
|
||||
local shieldAmount = select(17, UnitBuff("player", "Bulwark of Order"))
|
||||
local maxShield = UnitHealth("player") / 5
|
||||
return shieldAmount, maxShield, 1
|
||||
end
|
||||
|
||||
DISPLAY
|
||||
function()
|
||||
local shield = select(17, UnitBuff("player", "Bulwark of Order")) or 0
|
||||
local maxShield = UnitHealth("player") / 5
|
||||
local pp = (shield / maxShield) * 20
|
||||
return string.format("%2.1f", pp)
|
||||
end
|
||||
--GET MAX SHIELD ABSORB AND BAR FOR ABSORB
|
||||
TRIGGER
|
||||
function()
|
||||
local buff = UnitBuff("player", "Bulwark of Order") or ""
|
||||
if buff ~= "" then return true else return false end
|
||||
end
|
||||
|
||||
DURATION
|
||||
function()
|
||||
local shieldAmount = select(17, UnitBuff("player", "Bulwark of Order"))
|
||||
if shieldAmount > aura_env.maxShield then
|
||||
aura_env.maxShield = shieldAmount
|
||||
end
|
||||
return shieldAmount, aura_env.maxShield, 1
|
||||
end
|
||||
|
||||
DISPLAY
|
||||
function()
|
||||
local shield = select(17, UnitBuff("player", "Bulwark of Order")) or 0
|
||||
return math.floor(shield / 1000) .. "k"
|
||||
end
|
||||
|
||||
ANIMATION
|
||||
function()
|
||||
local function range(val, min, max, max2)
|
||||
local val = 1 - (((max - val) / (max - min)) * max2)
|
||||
return val
|
||||
end
|
||||
|
||||
local endTime = select(7, UnitBuff("player", "Bulwark of Order")) * 1000
|
||||
local time = GetTime() * 1000
|
||||
local maxDur = select(6, UnitBuff("player", "Bulwark of Order")) * 1000
|
||||
local duration = endTime - time
|
||||
local c = range(duration, 0, maxDur, 1)
|
||||
--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
|
||||
|
||||
ON SHOW
|
||||
aura_env.maxShield = 0
|
||||
|
||||
TRIGGER
|
||||
function()
|
||||
local buff = UnitBuff("player", "Bulwark of Order") or ""
|
||||
if buff ~= "" then return true else return false end
|
||||
end
|
||||
|
||||
DURATION
|
||||
function()
|
||||
local shieldAmount = select(17, UnitBuff("player", "Bulwark of Order"))
|
||||
local maxShield = UnitHealth("player") / 5
|
||||
return shieldAmount, maxShield, 1
|
||||
end
|
||||
|
||||
DISPLAY
|
||||
function()
|
||||
local shield = select(17, UnitBuff("player", "Bulwark of Order")) or 0
|
||||
local maxShield = UnitHealth("player") / 5
|
||||
local pp = (shield / maxShield) * 20
|
||||
return string.format("%2.1f", pp)
|
||||
end
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
PLAYER_ENTERING_WORLD
|
||||
function()
|
||||
if aura_env.enabled == 1 then
|
||||
local r = WeakAuras.regions['julijabutton0'].region
|
||||
local b = CreateFrame("Button", "JulijaButton", r, "SecureActionButtonTemplate")
|
||||
if aura_env.type:match("spell") then
|
||||
b:SetAllPoints()
|
||||
b:SetAttribute("unit", aura_env.target)
|
||||
b:SetAttribute("spell", aura_env.name)
|
||||
b:SetAttribute("type", "spell")
|
||||
end
|
||||
if aura_env.type:match("macro") then
|
||||
b:SetAllPoints()
|
||||
b:SetAttribute("macro", aura_env.name)
|
||||
b:SetAttribute("type", "macro")
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
INIT
|
||||
aura_env.enabled = 0
|
||||
aura_env.target = "player" --UnitID; player, focus, target, partyn (where n is the number in order of the party member), raidn (For more elaborate UnitIDs look up UnitID API Wiki thing; NO DYNAMIC INFO); I don't think it works for macros though.... So I've disabled it for macros
|
||||
aura_env.type = "spell" --"spell" or "macro" CASE SENSITIVE
|
||||
aura_env.name = "Hand of the Protector" --Spell or Macro name CASE SENSITIVE
|
||||
|
||||
if aura_env.enabled == 1 then
|
||||
if not aura_env.type:match("spell") and not aura_env.type:match("macro") then
|
||||
print("|cFFFF0000Error 'type' on julijabutton0")
|
||||
aura_env.enabled = 0
|
||||
end
|
||||
if aura_env.name == "" then
|
||||
print("|cFFFF0000Error 'name' on julijabutton0")
|
||||
end
|
||||
if aura_env.target == "" and not aura_env.type:match("macro") then
|
||||
print("|cFFFF0000Error 'target' on julijabutton0")
|
||||
end
|
||||
end
|
||||
PLAYER_ENTERING_WORLD
|
||||
function()
|
||||
if aura_env.enabled == 1 then
|
||||
local r = WeakAuras.regions['julijabutton0'].region
|
||||
local b = CreateFrame("Button", "JulijaButton", r, "SecureActionButtonTemplate")
|
||||
if aura_env.type:match("spell") then
|
||||
b:SetAllPoints()
|
||||
b:SetAttribute("unit", aura_env.target)
|
||||
b:SetAttribute("spell", aura_env.name)
|
||||
b:SetAttribute("type", "spell")
|
||||
end
|
||||
if aura_env.type:match("macro") then
|
||||
b:SetAllPoints()
|
||||
b:SetAttribute("macro", aura_env.name)
|
||||
b:SetAttribute("type", "macro")
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
INIT
|
||||
aura_env.enabled = 0
|
||||
aura_env.target = "player" --UnitID; player, focus, target, partyn (where n is the number in order of the party member), raidn (For more elaborate UnitIDs look up UnitID API Wiki thing; NO DYNAMIC INFO); I don't think it works for macros though.... So I've disabled it for macros
|
||||
aura_env.type = "spell" --"spell" or "macro" CASE SENSITIVE
|
||||
aura_env.name = "Hand of the Protector" --Spell or Macro name CASE SENSITIVE
|
||||
|
||||
if aura_env.enabled == 1 then
|
||||
if not aura_env.type:match("spell") and not aura_env.type:match("macro") then
|
||||
print("|cFFFF0000Error 'type' on julijabutton0")
|
||||
aura_env.enabled = 0
|
||||
end
|
||||
if aura_env.name == "" then
|
||||
print("|cFFFF0000Error 'name' on julijabutton0")
|
||||
end
|
||||
if aura_env.target == "" and not aura_env.type:match("macro") then
|
||||
print("|cFFFF0000Error 'target' on julijabutton0")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
--DISPLAY
|
||||
function()
|
||||
time = GetTime() - starttime
|
||||
local mastery_ppm = celestial_map_mastery / (time / 60)
|
||||
local haste_ppm = celestial_map_haste / (time / 60)
|
||||
local crit_ppm = celestial_map_crit / (time / 60)
|
||||
local map_ppm = celestial_map_procs / (time / 60)
|
||||
|
||||
local mastery_ppm = math.floor(mastery_ppm * 100) / 100
|
||||
local haste_ppm = math.floor(haste_ppm * 100) / 100
|
||||
local crit_ppm = math.floor(crit_ppm * 100) / 100
|
||||
local map_ppm = math.floor(map_ppm * 100) / 100
|
||||
return celestial_map_mastery .. " " .. mastery_ppm .. " mastery" .. "\n" .. celestial_map_haste .. " " .. haste_ppm .. " haste" .. "\n" .. celestial_map_crit .. " " .. crit_ppm .. " crit" .. "\n" .. celestial_map_procs .. " " .. map_ppm .. " total"
|
||||
end
|
||||
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(_, _, subEvent, _, _, sourceName, _, _, _, _, _, _, ...)
|
||||
if subEvent == "SPELL_AURA_APPLIED" and sourceName == UnitName("player") then
|
||||
local spellId = select(1, ...)
|
||||
if spellId == 225752 then
|
||||
celestial_map_mastery = celestial_map_mastery + 1
|
||||
end
|
||||
if spellId == 225753 then
|
||||
celestial_map_haste = celestial_map_haste + 1
|
||||
end
|
||||
if spellId == 225749 then
|
||||
celestial_map_crit = celestial_map_crit + 1
|
||||
end
|
||||
if spellId == 225752 or spellId == 225753 or spellId == 225749 then
|
||||
celestial_map_procs = celestial_map_procs + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
--DISPLAY
|
||||
function()
|
||||
time = GetTime() - starttime
|
||||
local mastery_ppm = celestial_map_mastery / (time / 60)
|
||||
local haste_ppm = celestial_map_haste / (time / 60)
|
||||
local crit_ppm = celestial_map_crit / (time / 60)
|
||||
local map_ppm = celestial_map_procs / (time / 60)
|
||||
|
||||
local mastery_ppm = math.floor(mastery_ppm * 100) / 100
|
||||
local haste_ppm = math.floor(haste_ppm * 100) / 100
|
||||
local crit_ppm = math.floor(crit_ppm * 100) / 100
|
||||
local map_ppm = math.floor(map_ppm * 100) / 100
|
||||
return celestial_map_mastery .. " " .. mastery_ppm .. " mastery" .. "\n" .. celestial_map_haste .. " " .. haste_ppm .. " haste" .. "\n" .. celestial_map_crit .. " " .. crit_ppm .. " crit" .. "\n" .. celestial_map_procs .. " " .. map_ppm .. " total"
|
||||
end
|
||||
|
||||
--COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(_, _, subEvent, _, _, sourceName, _, _, _, _, _, _, ...)
|
||||
if subEvent == "SPELL_AURA_APPLIED" and sourceName == UnitName("player") then
|
||||
local spellId = select(1, ...)
|
||||
if spellId == 225752 then
|
||||
celestial_map_mastery = celestial_map_mastery + 1
|
||||
end
|
||||
if spellId == 225753 then
|
||||
celestial_map_haste = celestial_map_haste + 1
|
||||
end
|
||||
if spellId == 225749 then
|
||||
celestial_map_crit = celestial_map_crit + 1
|
||||
end
|
||||
if spellId == 225752 or spellId == 225753 or spellId == 225749 then
|
||||
celestial_map_procs = celestial_map_procs + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user