Twintop's Resource Bar

Twintop's Resource Bar

670k Downloads

Resource is off-by-1 sometimes

Twintop opened this issue ยท 0 comments

commented

Resource for Shadow, especially when out of combat, is off by 1 from what is shown in the default UI.

Playing with the behind the scenes values, it looks to be a rounding error from when I changed what resource API was being used. See this GIF for an example of what it actually looks like -- I thought it was a discrete 100 Insanity (out of 10,000) decrease per second but it is more gradual/refined like Focus or Energy gain (or Insanity loss in the old 7.x-8.x Voidform).

https://gfycat.com/alienatedteemingcoyote

Need to change this for all currently supported specs to allow users to customize how many decimals to see (if applicable, may only apply to Shadow right now?) and to use math.floor() when calculating the value for thresholding purposes.

Reported by caketown16, confirmed by Nana_is_Bae, on Curse.

caketown16 wrote:
I'm experiencing this issue where sometimes the $insanity amount is very often 1 insanity more than what my character actually has. https://i.imgur.com/E0T7L6e.png

...

I noticed this happens when I drop out of combat with left over Insanity and then as it passively decreases overtime out of combat, the Insanity amount is not perfectly in sync with my actual character. If I get into combat at that exact moment of desync, that's when it'll show one more Insanity than I have.

Nana_is_Bae wrote:
I noticed this too. It happens in both out of combat and in combat scenarios. Outside of combat you can recreate it when Insanity starts to drain just go in combat to stop the drain (you have like 0,5sec window to desync the actual Insanity value from the value that your addon shows). - You have to have actual Blizzard UI insanity to see the real value of your insanity for all of this.

In combat the easiest way to recreate is to pick FotM talent and just cast Mind Blast. Addon will give you 10 Insanity while the actual Insanity is 9 HOWEVER the second spell or mind blast after this Desync (I think everytime) will give you the correct value. Then the one after wrong and so on... so my guess would be its a bug with rounding while using Fotm?

However sometimes even the blizzard actual Insanity gain doesnt work with FotM. Because sometimes full channel Mind Flay only gives you 21 Insanity instead of 22 (dunno how to reproduce that easily other than just casting mind flays and hoping it bugs out).

I remember I somehow could recreate this even without FotM talent selected by just "fake casting" first tick of Mind Flay but now I can't seem to recreate this (that was like month ago)

This desync issue isnt really an issue since you would have to cast spell in such a specific/unrealistic order to get into situation where you end up at 50 insanity shown by addon but your real would be 49 which is pretty hard but it is how I first discovered it that I couldnt cast DP even tho addon said 50.