Limit cooldowns to a minimum of 1 tick and replace armour cooldown reductions with correct values, fixes #603
This commit is contained in:
@@ -59,8 +59,8 @@ public class ItemWizardArmour extends ItemArmor implements IWorkbenchItem, IMana
|
|||||||
|
|
||||||
WIZARD(Materials.SILK, () -> null, "wizard", 0.1f, 0, "hat", "robe", "leggings", "boots"),
|
WIZARD(Materials.SILK, () -> null, "wizard", 0.1f, 0, "hat", "robe", "leggings", "boots"),
|
||||||
SAGE(Materials.SAGE, () -> WizardryItems.resplendent_thread, "sage", 0.2f, 0, "hat", "robe", "leggings", "boots"),
|
SAGE(Materials.SAGE, () -> WizardryItems.resplendent_thread, "sage", 0.2f, 0, "hat", "robe", "leggings", "boots"),
|
||||||
BATTLEMAGE(Materials.BATTLEMAGE, () -> WizardryItems.crystal_silver_plating, "battlemage", 0.05f, 0.15f, "helmet", "chestplate", "leggings", "boots"),
|
BATTLEMAGE(Materials.BATTLEMAGE, () -> WizardryItems.crystal_silver_plating, "battlemage", 0.05f, 0.05f, "helmet", "chestplate", "leggings", "boots"),
|
||||||
WARLOCK(Materials.WARLOCK, () -> WizardryItems.ethereal_crystalweave, "warlock", 0.1f, 0.3f, "hood", "robe", "leggings", "boots");
|
WARLOCK(Materials.WARLOCK, () -> WizardryItems.ethereal_crystalweave, "warlock", 0.1f, 0.1f, "hood", "robe", "leggings", "boots");
|
||||||
|
|
||||||
/** The armour material to use for this armour class. */
|
/** The armour material to use for this armour class. */
|
||||||
final ArmorMaterial material;
|
final ArmorMaterial material;
|
||||||
|
|||||||
@@ -251,6 +251,7 @@ public final class WandHelper {
|
|||||||
|
|
||||||
for(int i = 0; i < cooldowns.length; i++){
|
for(int i = 0; i < cooldowns.length; i++){
|
||||||
if(cooldowns[i] > 0) cooldowns[i]--;
|
if(cooldowns[i] > 0) cooldowns[i]--;
|
||||||
|
if(cooldowns[i] < 0) cooldowns[i] = 0; // In case it got broken
|
||||||
}
|
}
|
||||||
|
|
||||||
setCooldowns(wand, cooldowns);
|
setCooldowns(wand, cooldowns);
|
||||||
@@ -312,6 +313,8 @@ public final class WandHelper {
|
|||||||
// cast, which is impossible if there are no spells.
|
// cast, which is impossible if there are no spells.
|
||||||
if(cooldowns.length <= selectedSpell) cooldowns = new int[spellCount];
|
if(cooldowns.length <= selectedSpell) cooldowns = new int[spellCount];
|
||||||
|
|
||||||
|
if(cooldown <= 0) cooldown = 1;
|
||||||
|
|
||||||
cooldowns[selectedSpell] = cooldown;
|
cooldowns[selectedSpell] = cooldown;
|
||||||
|
|
||||||
setCooldowns(wand, cooldowns);
|
setCooldowns(wand, cooldowns);
|
||||||
|
|||||||
Reference in New Issue
Block a user