Track a debuff and start a timer when it's removed
Hello,
I am trying to build a simple function which will track a certain debuffs, that is to track moments when debuffs are applied and when they are removed. Then I would like to start a simple timer when the debuff which I track is over. First I tried using UNIT_AURA but it gets fired every time a debuff changes or do damage to a unit. Then I came across COMBAT_LOG_EVENT, which is quite complicated. I have a simple function which I tried to create based on wowpedia and some code from WoW Interface: Lua Code:
So the above function is run such that I pass all parameters COMBAT_LOG_EVENT returns. Is this function any close to do what I need it to do? I am simply need to know what aura is applied to a target and when it is over. Then I would like to start a timer. Thanks. |
CLEU doesn't tell aura durations, so you'll either have to use static values or use UNIT_AURA anyway, which is still complicated because combat log events happen before updated auras become available to UnitAura
Also i'm pretty sure that since 8.0 you have to use CombatLogGetCurrentEventInfo() function to get CLEU args. Like this: Quote:
|
Ok. Thanks for this. I’ll try to find how to work with UNIT_AURA. I just don’t how to distinguish between start, end of aura. UNIT_AURA also is triggered when Debuffs / DoTs tick.
|
Ok. Thanks for this. I’ll try to find how to work with UNIT_AURA. I just don’t how to distinguish between start, end of aura. UNIT_AURA also is triggered when Debuffs / DoTs tick.
|
If you are using UNIT_AURA to track unit debuffs, you will need to keep track of the debuffs that you see when UNIT_AURA is received so that the next time you receive UNIT_AURA, you can figure out what was added, removed, or refreshed. It's a decent amount of state that you have to track.
|
You are on the right track. Though watching auras with UnitAura on units by GUID requires that unit to have a token(player, target, raid1-40, party1-5, nameplate1-40, etc...) at nearly all times. Caching the duration on UNIT_AURA can help circumvent this while waiting for the CLEU_AURA_REMOVED trigger for fall off. That CLEU event can also be used to start the timer when the aura is removed.
Since your goal is to watch the aura AND a time period afterward your best bet is to register the CLEU event in UNIT_AURA if you cache any auras. Un-registering CLEU after all auras fall off will prevent excessive overhead from scanning the combat log continuously. |
All times are GMT -6. The time now is 02:20 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI