[Core] Fix for SpellUsable Reduction of Charge Spells
[Core] Fix for SpellUsable Reduction of Charge Spells

I noticed that the console log was frequently telling me that Phoenix's Flames was used while it was on cooldown, so i went to look at SpellUsable to figure out why.

The way Phoenix's Flames works is it has 3 charges, 45 second cooldown each. And ignire damage has a chance to erupt and reduce the cooldown of Phoenix's Flames by 10 seconds.

I believe the issue is that if multiple charges of Phoenix's Flames are on cooldown, and there is less than 10 seconds left on the cooldown of a charge, then SpellUsable ends the cooldown and grants a charge, and then stops.

But in game, if you have less than 10 seconds left on a Phoenix Flames charge, then it ends the cooldown on that charge, and the remainder of that 10 seconds reduces the next charge. So for example. If i have 3 charges on cooldown and 5 seconds until i gain a charge, and ignite procs. Then it is supposed to reduce the one charge by 5 seconds, gain a charge, and then reduce the cooldown on the next charge by the remaining 5 seconds.

I believe what i have done here fixes it (and it fixed my issue with Phoenix Flames .. or seems to have), but im not sure if this is how ALL charge spells work, nor am i sure if there is a better way to accomplish this.

enragednuke/WoWAnalyzer,anom0ly/WoWAnalyzer,yajinni/WoWAnalyzer,enragednuke/WoWAnalyzer,yajinni/WoWAnalyzer,FaideWW/WoWAnalyzer,sMteX/WoWAnalyzer,hasseboulen/WoWAnalyzer,Juko8/WoWAnalyzer,fyruna/WoWAnalyzer,anom0ly/WoWAnalyzer,fyruna/WoWAnalyzer,Juko8/WoWAnalyzer,sMteX/WoWAnalyzer,yajinni/WoWAnalyzer,sMteX/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,Juko8/WoWAnalyzer,ronaldpereira/WoWAnalyzer,hasseboulen/WoWAnalyzer,enragednuke/WoWAnalyzer,hasseboulen/WoWAnalyzer,ronaldpereira/WoWAnalyzer,anom0ly/WoWAnalyzer,FaideWW/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,yajinni/WoWAnalyzer,fyruna/WoWAnalyzer,FaideWW/WoWAnalyzer,anom0ly/WoWAnalyzer,ronaldpereira/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer