ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   Need help with Duration Display in "Tank" Addon by Criscal (https://www.esoui.com/forums/showthread.php?t=8583)

Actosh 06/05/19 10:10 AM

Need help with Duration Display in "Tank" Addon by Criscal
 
Hey since the addonauthor seems inactive for over a year, i need some help.

The Addon does display a countdown when u taunted a mob and counts down for each taunted mob seperatly.

I need to change that 15 Seconds duration thats displayed to 12 seconds (as long as the armor debuff runs).

Last year Letho helped me to change it, but the files got lost and so am i =).


We changed something inside this line of Code :
local duration = zo_roundToNearest(self.ending - GetFrameTimeSeconds(), 1)

I cant remember exactly what we´ve changed but any help would be appreciatet, i think we had somewhere "12000" added and it worked then ingame.

Hope someone can help. THANKS!

Baertram 06/05/19 04:15 PM

For me self.ending seems to be the time the taunt huff runs in total where GetFrameTimeSeconds() returns the current seconds of the game client's frame. This calculates the duration (or time left?) and if duration is <=0 I guess the huff will be gone and the taunt expired.
The zo_round functions rounds the calculated subtraction to a value then, but here I'm not sure if it only rounds to 0 or 1 this way or any other value like a floating one.

But I assume you should check what value the self.ending is and change it then to 12s = 12000ms.
Try this in the line AFTER local duration =...

d("ending: ".. tostring(self.ending).. ", duration: ".. tostring(duration))

It should print the value of self.ending & duration to chat so you can see them, and react on them to alter the code.
E.g. before the line of local duration =...
maybe insert self.ending = 12000 (only a guess!)


All times are GMT -6. The time now is 01:15 AM.

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