OnBuffGain and OnBuffLost callback
heroes only
cpu friendly (cost ~0.003 clock in 5v5 game)
Usage:
require "BuffManager" OnBuffGain(function(unit,buff) --print("BuffGain "..unit.charName.." "..buff.name) end) OnBuffLost(function(unit,buff) --print("BuffLost "..unit.charName.." "..buff.name) end)
Meeboo version can't detect onBufflost correctly. Hence i fix it.
Credit : Meeboo