View Single Post
02/10/16, 08:43 PM   #9
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by XEVENEX View Post
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:
  1. local function OnEffectChanged(eventCode, changeType, effectSlot, effectName, unitTag, beginTime, endTime, stackCount, iconName, buffType, effectType, abilityType, statusEffectType, unitName, unitId, abilityId)
  2.    ...
  3. end
  4. 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:
  1. 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.
  Reply With Quote