Question about filters
Mishio595 opened this issue ยท 1 comments
I've looked through the wiki and tons of forums to try and find out. How can I filter unit auras based on duration? I know how to create a white/black list, but I haven't seen any filtering examples that hide/show an aura based on its duration. My goal is to limit buff display on player to only buffs that have less than a minute left, hiding everything over and buffs with no duration. I'd also like my debuffs to show only ones with no duration or duration less than a minute.
This is not the place for questions, you're better off asking in the subforums over at wowinterface.
However, I will answer your question.
If your goal is to only show buffs with a total duration less than X seconds you can use the CustomFilter
override for auras. The 10th parameter in CustomFilter is expriation
, which shows the time when the aura will expire. If you remove the current time from that (timeLeft = expiration - GetTime()
) you get the total time until it expires. If I remember right, expiration
will be 0 if it has no expiration.
https://github.com/oUF-wow/oUF/blob/development/elements/auras.lua#L162-L171
If you have further questions, please use the forums instead.