Showing 2 charges of charge even though the warrior is playing storm bolt
SweepyBoop opened this issue ยท 8 comments
Possible repro step, use charge, and spam it so it's used as soon as it comes off cd
Hopefully fixed by #15
This is still happening with fury warriors. I might be missing something that reduces charge cd in the game.
Possible workaround is to decrease the cd of charge by like 0.1s, or do a check like this to determine spell is used again before previous usage timer expires
if allstates[guid] and GetTime() >= allstates[guid].expirationTime
This is how gladiusEx handles it, it seems to have a margin of error 2s when detecting opt_charges
local on_cd = tps.cooldown_end and (tps.cooldown_end - 2) > now
Imagine a spell has 20s cooldown and you press it at time 0, in theory the expirationTime should be 20.
But we check whether the second press is earlier than 18 (instead of 20) to detect the charge.