WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Tracking targets auras (https://www.wowinterface.com/forums/showthread.php?t=56033)

doofus 02-10-18 02:53 PM

Tracking targets auras
 
I am processing the UNIT_AURA event and it is very weird I wonder...

If I am in Balance and put a Moonfire on one or more targets, I will then receive periodic updates (UNIT_AURA events) which I can then inquire using UnitDebuff. I receive UNIT_AURA for all affected enemies as well as the current targeted enemy (so there I receive double updates). I receive updates when a DOT ticks until it drops off.

Now when am in Resto and put a Moonfire on one or more targets I will receive just the one update. I will not receive updates for multiple targets but only one event for the current target and only when a buff/debuff renews/refreshes but not when it ticks...

So looking at this problem from a higher level I assume that the game makes decisions as to which Units it will update me on, when, and how. For example if I am healer I do not need to know that my Rejuv is about to drop off, but when I am Balance I get told precisely how much time is left on my Moonfire. And I also get told about all targets I have applied Moonfire on and is still ticking.

As a conclusion unless I am doing something wrong, I should assume that the UNIT_AURA event has limitations and it might be better to use it to receive an initial event and then keep an internal (to the addon) table of which unit has been targeted and what has been done to them?

Random thoughts, I am thinking on the go :-)

zork 02-12-18 04:58 AM

That is where filter addons come into play. They help you filter auras per unit conditionally.

Like Weak Auras: https://www.curseforge.com/wow/addons/weakauras-2
I wrote rFilter to do the same task: http://www.wowinterface.com/download...6-rFilter.html

Tracking HOTs on units is normally done by custom filters on the unitframe addon itself.

Another option that I'm currently looking into is tracking personal buffs/debuffs directly on the action button. I have an idea in mind but is not yet finished: http://www.wowinterface.com/download...uttonAura.html

The same idea is used in AdiButtonAuras and InlineAura
https://github.com/AdiAddons/AdiButtonAuras
http://www.wowinterface.com/download...FanUpdate.html

Rainrider 02-12-18 02:00 PM

@doofus

UNIT_AURA (and all other unit events) is triggered only for units with a valid unit id. UNIT_AURA's first (and only) argument is the unit for which the event fired. If you are interested only in the target unit, then register the event by using RegisterUnitEvent('UNIT_AURA', 'target') and your event handler will only be called for the target unit.

doofus 02-19-18 02:52 PM

I inquire unit (player, target) buffs/debuffs on the periodic update of my action engine, so I always have a fresh copy. I also respond to the UNIT_AURA.


All times are GMT -6. The time now is 08:41 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI