Sidoine / Ovale

An add-on for World of Warcraft that displays icons based on scripts
MIT License
46 stars 46 forks source link

[9.0.13] GCDRemaining() only works for Instant cast spells #605

Open sirTribble opened 5 years ago

sirTribble commented 5 years ago

It's also only woks with ">" and ">=" comparators "<" and "<=" not working

Hemario commented 5 years ago

Which class and spec? Can you provide a sample script?

sirTribble commented 5 years ago

any class or spec last tested on elemental shaman script below is working when GCD triggered by instant cast spell, but not working when GCD triggered by casting spell

AddIcon { if GCDRemaining() > 0.5 Texture(spell_chargenegative) }

script below not working with all type of spells

AddIcon { if GCDRemaining() < 1 Texture(spell_chargenegative) }

sirTribble commented 3 years ago

checked again, bug is still there

Sidoine commented 3 years ago

I don't understand the bug. There shouldn't be any global cooldown after a spell has been cast if it isn't an instant cast

sirTribble commented 3 years ago

Here is example script for any pally. so basically i want to cast avenging wrath on last 0.5 second of gcd since it off gcd but it will be be shown for the next action even when gcd remaining is more then 0.5

may be i misusing this function?

Define(avenging_wrath 31884) SpellInfo(avenging_wrath cd=120 offgcd=1) Define(flash_of_light 19750)

AddIcon { if GCDRemaining() < 0.5 spell(avenging_wrath) spell(flash_of_light) }

Sidoine commented 3 years ago

The functions are always computed at the end of the current cast. It means that if there isn't any global cooldown after the current cast (which is always the case for spells with a cast time), GCDRemaining will be always 0.

sirTribble commented 3 years ago

but example script does not work even when i use instant cast spell to trigger GCD . avenging wrath seen as next action full GCD duration

Sidoine commented 3 years ago

Ok, I'll check into this

radix-pro commented 3 years ago

RemainingCastTime also buged. RemainingCastTime()<1 works sometime and then never return true. RemainingCastTime(less 1) - same result. not RemainingCastTime()>1 will work (idk correct or not)