Update
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user