As the title suggest I'm trying to track weapon enchant procs (like Dancing Steel, Colossus, ...) with a tag.
I'm using this code to track all kinds of other "normal" buffs.
for instance, this one tracks the PvP strength trinket proc. The same code also works for things like Sacred Shield, Renew, ...
Code:
oUF.Tags.Methods['GhostSoVTime'] = function(u) -- PvP Trinket Strength Proc
local name, _,_,_,_,_, expirationTime, fromwho = UnitAura(u, GetSpellInfo(126700) or "Surge of Victory")
if(fromwho == "player") then
local spellTimer = (expirationTime-GetTime())
local TimeLeft = format("%.0f", spellTimer)
return "|cfffaaaab"..TimeLeft.."|r"
end
end
oUF.Tags.Events['GhostSoVTime'] = "UNIT_AURA"
When I'm using said code to track, let's say, Dancing Steel. It shows nothing.
I suppose it's because "fromwho" fails to return anything for weapon enchant procs? Since the "casterID" (aka fromwho) can only be player, but even if I use "if fromwho == "none"" or just "if fromwho then". It still returns nothing.
So how do I have to adapt the code to track weapon enchant procs?
Edit: Found a way ... just checking for the name instead of owner.
Code:
oUF.Tags.Methods['GhostDSTime'] = function(u) -- Dancing Steel Enchant Proc id 120032 or 118335
local name, _,_,_,_,_, expirationTime, fromwho = UnitAura(u, GetSpellInfo(120032) or "Dancing Steel")
if (name == "Dancing Steel") then
local spellTimer = (expirationTime-GetTime())
local TimeLeft = format("%.0f", spellTimer)
return "|cff6670FF"..TimeLeft.."|r"
end
end
oUF.Tags.Events['GhostDSTime'] = "UNIT_AURA"