Quote Originally Posted by ZorbaTHut View Post
Quote Originally Posted by Naifu View Post
Hi guys While thinking about how to improve the buff counters for nkThings I became unsure if I'm doing the right thing. There's an add and a remove event for buffs which I'm using. However the change event only fires if the buff fundamentally changes. Either I'm blind or I didn't find any event which fires if the remaining duration of a buff changes.
The important number is the time that the buff will end. The change message won't fire unless that changes, because otherwise it would be firing every frame as fractions of a second are shaved off the buff (which sort of defeats the purpose of having an event). Changes in buff ending time are extraordinarily rare, however, they usually just run until they finish. Once you've queried the buff details once, you should be able to store the buff ending time - I believe Inspect.Buff.Detail provides this directly, there isn't even extra math involved - then calculate the duration easily and efficiently without going through the addon system. This is what Zorba's Buff Bars does.
Jump to post...