PDA

View Full Version : LICH: Spellsong.timleft vs. Spell.timeleft



Danical
05-21-2008, 02:46 PM
Spellsong.timeleft updates constantly.



>;e echo Spellsong.timeleft
--- Lich: exec1 active.
[exec1: 2.23333333333333]
--- Lich: exec1 has finished.
>;e echo Spellsong.timeleft
--- Lich: exec1 active.
[exec1: 2.22343333333333]
--- Lich: exec1 has finished.
>;e echo Spellsong.timeleft
--- Lich: exec1 active.
[exec1: 2.21353333333333]
--- Lich: exec1 has finished.
>;e echo Spellsong.timeleft
--- Lich: exec1 active.
[exec1: 2.20468333333333]
--- Lich: exec1 has finished.
>;e echo Spellsong.timeleft
--- Lich: exec1 active.
[exec1: 2.19635]
--- Lich: exec1 has finished.
>;e echo Spellsong.timeleft
--- Lich: exec1 active.
[exec1: 2.18985]
--- Lich: exec1 has finished.
>;e echo Spellsong.timeleft
--- Lich: exec1 active.
[exec1: 2.18515]
--- Lich: exec1 has finished.
>;e echo Spellsong.timeleft
--- Lich: exec1 active.
[exec1: 2.18151666666667]
--- Lich: exec1 has finished.
>;e echo Spellsong.timeleft
--- Lich: exec1 active.
[exec1: 2.17811666666667]
--- Lich: exec1 has finished.
>;e echo Spellsong.timeleft
--- Lich: exec1 active.
[exec1: 2.175]
--- Lich: exec1 has finished.
>;e echo Spellsong.timeleft
--- Lich: exec1 active.
[exec1: 2.1724]
--- Lich: exec1 has finished.
>;e echo Spellsong.timeleft
--- Lich: exec1 active.
[exec1: 2.16901666666667]


Spell[spellnumber].timeleft updates slowly at best.

Is it possible to have Spell.timeleft update as frequently as Spellsong.timeleft?

Shaelun
05-21-2008, 03:13 PM
Actually, that's a bug... I just looked it up, and Spell[401].timeleft (401 is just an example of course) is bypassing the code that updates the duration of a spell -- it's supposed to calculate the time left and return the value whenever it's checked, which is what Spellsong.timeleft is properly doing. I did it that way because there's no reason to waste CPU time updating the duration of spells when nothing is even paying attention to that information.

I fixed it for the next update, but for the time being, you can use Spell[401].minsleft or Spell[401].secsleft instead. Both of those are working properly:



;e echo Spell[401].timeleft
--- Lich: exec1 active.
[exec1: 4.46164881666667]
--- Lich: exec1 has finished.
;e echo Spell[401].minsleft
--- Lich: exec1 active.
[exec1: 4.22727866666667]
--- Lich: exec1 has finished.
;e echo Spell[401].timeleft
--- Lich: exec1 active.
[exec1: 4.22727866666667]
--- Lich: exec1 has finished.
;e echo Spell[401].minsleft
--- Lich: exec1 active.
[exec1: 4.059945]
--- Lich: exec1 has finished.

Danical
05-21-2008, 03:18 PM
Holy Hellballs.

That's a quick turn around.

A thousand Thanks Yous!

Shaelun
05-21-2008, 03:20 PM
No prob... I just happened to check the forums at the right time :)