Originally Posted by XEVENEX
I will try looking at IDs later tonight.
I have tried iterating through the target buffs already, printing to chat effectName. It only ever gave me stuff like food, mundus, and vapirism. With that limited testing I assumed that the api would not tell you about active buffs like reflect.
I suppose some things have a null effectName and my test was missing all of those buffs?
Thanks again.
|
I tested it and apparently GetUnitBuffInfo() will only work properly on "player". After that I looked around and found a post where someone said they changed it, it used to work on other unitTags.
You could still do it by monitoring the event
(which would be better anyhow):
Lua Code:
local function OnEffectChanged(eventCode, changeType, effectSlot, effectName, unitTag, beginTime, endTime, stackCount, iconName, buffType, effectType, abilityType, statusEffectType, unitName, unitId, abilityId)
...
end
EVENT_MANAGER:RegisterForEvent(ADDON_NAME, EVENT_EFFECT_CHANGED, OnEffectChanged)
To see when anyone receives or looses the desired effect. If you only care about the target you have your reticle over, you can check to see if that is the unitTag
Lua Code:
if not AreUnitsEqual(unitTag, "reticleover") then return end
Or you could just monitor for all targets that receive the desired effect and display them with their name so you can tell which target is which.