Limit cooldowns to a minimum of 1 tick and replace armour cooldown reductions with correct values, fixes #603
This commit is contained in:
@@ -251,6 +251,7 @@ public final class WandHelper {
|
||||
|
||||
for(int i = 0; i < cooldowns.length; i++){
|
||||
if(cooldowns[i] > 0) cooldowns[i]--;
|
||||
if(cooldowns[i] < 0) cooldowns[i] = 0; // In case it got broken
|
||||
}
|
||||
|
||||
setCooldowns(wand, cooldowns);
|
||||
@@ -312,6 +313,8 @@ public final class WandHelper {
|
||||
// cast, which is impossible if there are no spells.
|
||||
if(cooldowns.length <= selectedSpell) cooldowns = new int[spellCount];
|
||||
|
||||
if(cooldown <= 0) cooldown = 1;
|
||||
|
||||
cooldowns[selectedSpell] = cooldown;
|
||||
|
||||
setCooldowns(wand, cooldowns);
|
||||
|
||||
Reference in New Issue
Block a user