mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
Fix Repair Mastery zero initialize
This commit is contained in:
parent
f2945569fb
commit
234a31d283
@ -350,12 +350,13 @@ public class AdvancedConfig extends ConfigValidated {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* REPAIR */
|
/* REPAIR */
|
||||||
if (getRepairMasteryMaxBonus() < 1) {
|
/*
|
||||||
reason.add(SKILLS + "." + REPAIR + "." + REPAIR_MASTERY + "." + MAX_BONUS_PERCENTAGE + " should be at least 1!");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (getRepairMasteryMaxLevel() < 1) {
|
if (getRepairMasteryMaxLevel() < 1) {
|
||||||
reason.add(SKILLS + "." + REPAIR + "." + REPAIR_MASTERY + "." + MAX_BONUS_LEVEL + " should be at least 1!");
|
reason.add(SKILLS + "." + REPAIR + "." + REPAIR_MASTERY + "." + MAX_BONUS_LEVEL + " should be at least 1!");
|
||||||
|
}*/
|
||||||
|
|
||||||
|
if (getRepairMasteryMaxBonus() < 1) {
|
||||||
|
reason.add(SKILLS + "." + REPAIR + "." + REPAIR_MASTERY + "." + MAX_BONUS_PERCENTAGE + " should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getMaximumProbability(SubSkillType.REPAIR_SUPER_REPAIR) < 1) {
|
if (getMaximumProbability(SubSkillType.REPAIR_SUPER_REPAIR) < 1) {
|
||||||
@ -671,7 +672,7 @@ public class AdvancedConfig extends ConfigValidated {
|
|||||||
|
|
||||||
/* REPAIR */
|
/* REPAIR */
|
||||||
public double getRepairMasteryMaxBonus() { return getDoubleValue(SKILLS, REPAIR, REPAIR_MASTERY, MAX_BONUS_PERCENTAGE); }
|
public double getRepairMasteryMaxBonus() { return getDoubleValue(SKILLS, REPAIR, REPAIR_MASTERY, MAX_BONUS_PERCENTAGE); }
|
||||||
public int getRepairMasteryMaxLevel() { return getIntValue(SKILLS, REPAIR, REPAIR_MASTERY, MAX_BONUS_LEVEL); }
|
//public int getRepairMasteryMaxLevel() { return getIntValue(SKILLS, REPAIR, REPAIR_MASTERY, MAX_BONUS_LEVEL); }
|
||||||
|
|
||||||
/* Arcane Forging */
|
/* Arcane Forging */
|
||||||
public boolean getArcaneForgingEnchantLossEnabled() { return getBooleanValue(SKILLS, REPAIR, ARCANE_FORGING, MAY_LOSE_ENCHANTS); }
|
public boolean getArcaneForgingEnchantLossEnabled() { return getBooleanValue(SKILLS, REPAIR, ARCANE_FORGING, MAY_LOSE_ENCHANTS); }
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
package com.gmail.nossr50.skills.repair;
|
package com.gmail.nossr50.skills.repair;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
|
||||||
import com.gmail.nossr50.config.MainConfig;
|
import com.gmail.nossr50.config.MainConfig;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
|
||||||
public class Repair {
|
public class Repair {
|
||||||
public static int repairMasteryMaxBonusLevel = AdvancedConfig.getInstance().getMaxBonusLevel(SubSkillType.REPAIR_REPAIR_MASTERY);
|
//public static int repairMasteryMaxBonusLevel = AdvancedConfig.getInstance().getRepairMasteryMaxLevel();
|
||||||
public static double repairMasteryMaxBonus = AdvancedConfig.getInstance().getRepairMasteryMaxBonus();
|
//public static double repairMasteryMaxBonus = AdvancedConfig.getInstance().getRepairMasteryMaxBonus();
|
||||||
|
|
||||||
public static Material anvilMaterial = MainConfig.getInstance().getRepairAnvilMaterial();
|
//public static Material anvilMaterial = MainConfig.getInstance().getRepairAnvilMaterial();
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,6 @@ public class RepairManager extends SkillManager {
|
|||||||
double skillLevelBonusCalc = (Repair.repairMasteryMaxBonus / Repair.repairMasteryMaxBonusLevel) * (getSkillLevel() / 100.0D);
|
double skillLevelBonusCalc = (Repair.repairMasteryMaxBonus / Repair.repairMasteryMaxBonusLevel) * (getSkillLevel() / 100.0D);
|
||||||
double bonus = repairAmount * Math.min(skillLevelBonusCalc, maxBonusCalc);
|
double bonus = repairAmount * Math.min(skillLevelBonusCalc, maxBonusCalc);
|
||||||
|
|
||||||
|
|
||||||
repairAmount += bonus;
|
repairAmount += bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user