PHP код:
local o, tonumber = UnitBuff, tonumber
local UnitBuff = function(unit,name)
local n, _, t, c, _, d, e, u,_,_,id = o(unit, name);
if n then return n, _, t, c, _, d, e, u end
name = tonumber(name)
if name then
for i=1,100 do
n, _, t, c, _, d, e, u, _, _, id = o(unit, i);
if not n then return end
if id == name then return n, _, t, c, _, d, e, u end
end
end
end
UnitBuff(data.unitId, spn) меняешь на UnitBuff(data.unit, (data.byID and data.spellID or spn))
PHP код:
--Берса
{ spellID = 50334, unit = "player", caster = "player", filter = "BUFF" }
PHP код:
--Берса
{ spellID = 50334, unit = "player", caster = "player", filter = "BUFF", byID = true}
но я сам это не тестил, аддона нет, могут быть ошибки.