For now I use the following replacement:
Lua Code:
em=EVENT_MANAGER
em:RegisterForEvent(CMX.name.."custom", EVENT_COMBAT_EVENT, CMX.onCustomCombatEventDmg)
em:AddFilterForEvent(CMX.name.."custom", EVENT_COMBAT_EVENT, REGISTER_FILTER_COMBAT_RESULT , ACTION_RESULT_EFFECT_GAINED_DURATION, REGISTER_FILTER_IS_ERROR, false)
em:RegisterForEvent(CMX.name.."custom2", EVENT_COMBAT_EVENT, CMX.onCustomCombatEventDmg)
em:AddFilterForEvent(CMX.name.."custom2", EVENT_COMBAT_EVENT, REGISTER_FILTER_COMBAT_RESULT , ACTION_RESULT_EFFECT_FADED, REGISTER_FILTER_IS_ERROR, false)
em:RegisterForEvent(CMX.name.."custom3", EVENT_COMBAT_EVENT, CMX.onCustomCombatEventDmg)
em:AddFilterForEvent(CMX.name.."custom3", EVENT_COMBAT_EVENT, REGISTER_FILTER_COMBAT_RESULT , ACTION_RESULT_EFFECT_GAINED, REGISTER_FILTER_IS_ERROR, false)
function CMX.onCustomCombatEventDmg(eventCode, result, isError, abilityName, abilityGraphic, abilityActionSlotType, sourceName, sourceType, targetName, targetType, hitValue, powerType, damageType, log, sourceUnitId, targetUnitId, abilityId)
if (sourceName==nil or sourceName=="") and (targetName==nil or targetName=="") then return end
if BadAbility[abilityId] or GetAbilityDuration(abilityId)<=1000 then return end
local changeType = (result==ACTION_RESULT_EFFECT_GAINED_DURATION or result==ACTION_RESULT_EFFECT_GAINED) and EFFECT_RESULT_GAINED or result == ACTION_RESULT_EFFECT_FADED and EFFECT_RESULT_FADED or nil
local buffType = abilityId==17906 and BUFF_EFFECT_TYPE_DEBUFF or BUFF_EFFECT_TYPE_BUFF
CMX.onEffectChanged(_, changeType, _, _, _, _, _, _, _, _, buffType, ABILITY_TYPE_BONUS, _, targetName, targetUnitId, abilityId)
end
Here CMX.onEffectChanged is the function that used to take on the Event EVENT_EFFECT_CHANGED
It tracks a bit more (like all dots are shown as a debuff as well) but at least for my usecase it's quite good. For buff trackers there might be issues as some buffs only have "gained" events.
Note that for EVENT_COMBAT_EVENT it is good to use the "player" filter via the
AddFilterForEvent function. This is because Combat events have both source and target which means that the event will be fired when at least one of them is the player, which works nicely.
As I wrote before doing the same with EVENT_EFFECT_CHANGED will limit it to buffs/debuffs that are active on the player only.
One Drawback though: As you can see by that bufftype line, you cannot differentiate easily between buffs and debuffs
I'm going to test this for a bit.