A Deviate Faerie Dragon
Join Date: Jul 2009
Posts: 11
|
Attempting to update Procodile to 4.2
I really enjoyed using Procodile, but as of this last patch, the addon has been unusable. I've managed to get it to kinda work, however the main uptime tracking of the addon is not working at all. While it will now track the amount of mana granted by replenishment, no other data or procs seem to come up.
Currently this is the code i'm using for the proc scanner:
Code:
function Procodile:COMBAT_LOG_EVENT_UNFILTERED(...)
local obj = select(1, ...)
local match = false
if self.db.profile.enabled then
if dstName and UnitIsUnit(dstName,"player") then
-- Example: Majestic Dragon Figurine
--1/13 22:03:07.582 SPELL_AURA_APPLIED_DOSE,0x0000000000000000,nil,0x80000000,0x0000000000356636,"Zandy",0x511,60525,"Majestic Dragon Figurine",0x1,BUFF,6
if eventtype == 'SPELL_AURA_APPLIED_DOSE' then
local proc = self:GetTrackedSpell(obj)
if proc then
local duration, count = self:GetAuraDuration(dstName,select(2,...))
if proc.aurabars or (self.db.profile.aurabars and (proc.aurabars ~= false or proc.aurabars == nil)) and duration > 0 then
self:UpdateAuraBar(proc, duration, count)
end
end
end
if eventtype == 'SPELL_AURA_REFRESH' then
local proc = self:GetTrackedSpell(obj)
if proc then
self:HandleProc(proc, true, duration, count)
-- local duration, count = self:GetAuraDuration(dstName,select(2,...))
-- if proc.aurabars or (self.db.profile.aurabars and (proc.aurabars ~= false or proc.aurabars == nil)) and duration > 0 then
-- self:UpdateAuraBar(proc, duration, count)
-- end
end
end
end
if dstName and srcName and UnitIsUnit(srcName,"player") then
-- Instant/periodic dmg by you on target
if eventtype == 'SPELL_DAMAGE' or eventtype == 'SPELL_PERIODIC_DAMAGE' then
--12/2 19:44:04.312 SPELL_DAMAGE,0x00000000004518D2,"Zo",0x512,0xF13000402D0060F6,"Soul Weaver",0x100a48,60488,"Extract of Necromatic Power",0x20,2065,0,32,0,0,0,1,nil,nil
--12/2 19:50:46.765 SPELL_DAMAGE,0x0000000000426DC0,"Ladybah",0x512,0xF13000402B006472,"Soldier of the Frozen Wastes",0xa48,55637,"Lightweave Bolt",0x2,1955,293,2,0,0,0,1,nil,nil
local amount = select(4,...)
local proc = self:GetTrackedSpell(obj)
if proc then
-- DPS measurement.
if proc.damage == nil then
proc.damage = amount
proc.maxdamage = amount
proc.mindamage = amount
else
proc.damage = proc.damage + amount
if amount > proc.maxdamage then
proc.maxdamage = amount
end
if amount < proc.mindamage then
proc.mindamage = amount
end
end
self:HandleProc(proc, false)
elseif self.db.profile.showspells then
self:Print("Spell "..select(2, ...).." ("..obj..") hit enemy.")
end
end
-- Periodic damage - just damage measurement
if eventtype == 'SPELL_PERIODIC_DAMAGE' then
--12/2 19:44:04.312 SPELL_DAMAGE,0x00000000004518D2,"Zo",0x512,0xF13000402D0060F6,"Soul Weaver",0x100a48,60488,"Extract of Necromatic Power",0x20,2065,0,32,0,0,0,1,nil,nil
--12/2 19:50:46.765 SPELL_DAMAGE,0x0000000000426DC0,"Ladybah",0x512,0xF13000402B006472,"Soldier of the Frozen Wastes",0xa48,55637,"Lightweave Bolt",0x2,1955,293,2,0,0,0,1,nil,nil
local amount = select(4,...)
local proc = self:GetTrackedSpell(obj)
if proc then
-- DPS measurement.
if proc.damage == nil then
proc.damage = amount
proc.maxdamage = amount
proc.mindamage = amount
else
proc.damage = proc.damage + amount
if amount > proc.maxdamage then
proc.maxdamage = amount
end
if amount < proc.mindamage then
proc.mindamage = amount
end
end
elseif self.db.profile.showspells then
self:Print("Spell "..select(2, ...).." ("..obj..") hit enemy for periodic damage.")
end
end
-- Mana/energy regen tracking only
if eventtype == 'SPELL_PERIODIC_ENERGIZE' then
local proc = self:GetTrackedSpell(obj)
if proc then
if UnitIsUnit(dstName,"player") then
if not proc.selfregen then
proc.selfregen = select(4, ...)
else
proc.selfregen = proc.selfregen + select(4, ...)
end
else
if not proc.regen then
proc.regen = select(4, ...)
else
proc.regen = proc.regen + select(4, ...)
end
end
elseif self.db.profile.showspells then
self:Print("Spell "..select(2, ...).." ("..obj..") hit enemy.")
end
end
--12/2 18:53:02.890 SPELL_PERIODIC_ENERGIZE,0x00000000003671B0,"Lightyear",0x514,0x00000000002DDB46,"Zarnivoop",0x512,57669,"Replenishment",0x8,32,0
--12/2 18:53:02.890 SPELL_PERIODIC_ENERGIZE,0x00000000003671B0,"Lightyear",0x514,0xF14060529300001F,"Flaaghun",0x1114,57669,"Replenishment",0x8,25,0
-- Instant energize on self/target
if eventtype == 'SPELL_ENERGIZE' then
--12/2 19:43:19.578 SPELL_ENERGIZE,0x000000000035F51C,"Dimqroy",0x514,0x000000000035F51C,"Dimqroy",0x514,60538,"Soul of the Dead",0x40,900,0
local proc = self:GetTrackedSpell(obj)
if proc then
self:HandleProc(proc, false)
if UnitIsUnit(dstName,"player") then
if not proc.selfregen then
proc.selfregen = select(4, ...)
else
proc.selfregen = proc.selfregen + select(4, ...)
end
else
if not proc.regen then
proc.regen = select(4, ...)
else
proc.regen = proc.regen + select(4, ...)
end
end
elseif self.db.profile.showspells then
self:Print("Spell "..select(2, ...).." ("..obj..") energized.")
end
end
-- Aura applied on self/target
--12/2 18:53:03.937 SPELL_AURA_APPLIED,0xF14018E46D000022,"Sturm",0x1114,0xF14018E46D000022,"Sturm",0x1114,34456,"Ferocious Inspiration",0x1,BUFF
--event, timestamp, eventtype, srcGUID, srcName, srcFlags, dstGUID, dstName, dstFlags, ...
if eventtype == 'SPELL_AURA_APPLIED' then
--self:Print(obj.." aura applied, name "..select(2, ...))
local proc = self:GetTrackedSpell(obj)
if proc then
local duration, count = self:GetAuraDuration(dstName,select(2,...))
-- Record the aura name for future usage
if proc.auraname == nil then
proc.auraname = select(2,...)
end
self:HandleProc(proc, true, duration, count)
elseif self.db.profile.showspells then
self:Print("Spell "..select(2, ...).." ("..obj..") applied.")
end
end
-- Aura removed on self/target
if eventtype == 'SPELL_AURA_REMOVED' then
local proc = self:GetTrackedSpell(obj)
if proc then
proc.started = 0
if self.db.profile.verbose then
self:Print("|cff22ff22"..proc.name.." effect ended")
end
-- Remove any aura bar
local bar = self.auras:GetBar(proc.name)
if bar then
self.auras:RemoveBar(bar)
end
elseif self.db.profile.showspells then
self:Print("Spell "..select(2, ...).." ("..obj..") removed.")
end
end
end
end
end
It kinda works, however I can't seem to get it to properly pick up the procs other then anything that is granting mana return. Any help or guidance to fixing this addon is greatly appreciated.
|