Add new code snippets
This commit is contained in:
33
Complete Projects/Legion/Divine Purpose Procs.lua
Normal file
33
Complete Projects/Legion/Divine Purpose Procs.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
DISPLAY
|
||||
function()
|
||||
if aura_env.cast_spells > 0 then
|
||||
local pp = aura_env.count / aura_env.cast_spells
|
||||
if (2) then
|
||||
pp = math.floor((pp * 10^2) + 0.5) / (10^2)
|
||||
else
|
||||
pp = math.floor(pp+0.5)
|
||||
end
|
||||
pp = pp * 100
|
||||
return "Divine " .. aura_env.count .. " " .. aura_env.cast_spells .. " " .. pp
|
||||
else
|
||||
return "Divine " .. aura_env.count .. " " .. aura_env.cast_spells
|
||||
end
|
||||
end
|
||||
|
||||
COMBAT_LOG_EVENT_UNFILTERED
|
||||
function(_,_,subEvent,_,_,sourceName,_,_,_,_,_,_,spellId)
|
||||
if subEvent == "SPELL_CAST_SUCCESS" and sourceName == UnitName("player") then
|
||||
if spellId == 85256 or spellId == 53385 then
|
||||
aura_env.cast_spells = aura_env.cast_spells + 1
|
||||
end
|
||||
end
|
||||
if subEvent == "SPELL_AURA_APPLIED" and sourceName == UnitName("player") then
|
||||
if spellId == 223819 then
|
||||
aura_env.count = aura_env.count + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
INIT
|
||||
aura_env.count = 0
|
||||
aura_env.cast_spells = 0
|
||||
Reference in New Issue
Block a user