Originally Posted by Phanx
I'm actually considering also removing the endTime and caster info out of callbacks, and have them provide only the target unit like most real events (eg. UNIT_HEALTH).
|
Something like this, perhaps?
Lua Code:
function MyAddon:LibResInfo_ResCastStarted(targetUnit, targetGUID)
local hasIncomingRes, endTime, casterUnit, casterGUID = LibResInfo:UnitHasIncomingRes(targetUnit/targetGUID)
local spellName, _, _, icon = UnitCastingInfo(casterUnit)
-- do stuff
end
That would cut down a great deal of duplication indeed.