Create time bar on event
I am looking for a way to track internal cooldown of Rapture (discipline priest talent which procs on shield's break) within OpenRDX framework. I know there are addons out there who already do this, but i want to have the rapture bar as part of my RDX-managed desktop.
In terms of mechanics, Rapture bar is a bar which counts down 12 seconds, when the Combat Log fires a SPELL_ENERGISE event with local player being both the source and the target, and spellid being equal to 47755.
How do i go about making such bar in OpenRDX?
--------
Included for reference is a lua abstract from Ingela's Rapture addon, which seems to handle the combat log event and fire up the bar creation procedure.
function Rapture:SPELL_ENERGIZE(timestamp, event, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, spellId, spellName, spellSchool, auraType, amount)
local player_name = UnitName("player")
if destName == player_name and sourceName == player_name and spellId == 47755 then
Rapture:Runbar()
end
end
function Rapture:COMBAT_LOG_EVENT_UNFILTERED(_, timestamp, event, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, amount, spellID, ...)
local func = self[event]
if (func) then
func(self, timestamp, event, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, amount, spellID, ...)
end
end
|