Browse Source

Merge pull request #395 from Glitchfinder/master

Fixing an issue where players repaired items a hundred times better than they should be able to.
Glitchfinder 12 years ago
parent
commit
c0bba7dead
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main/java/com/gmail/nossr50/skills/repair/Repair.java

+ 2 - 2
src/main/java/com/gmail/nossr50/skills/repair/Repair.java

@@ -211,8 +211,8 @@ public class Repair {
      */
     protected static short repairCalculate(Player player, int skillLevel, short durability, int repairAmount) {
         float  bonus;
-        if(skillLevel >= repairMasteryMaxBonusLevel) bonus = repairMasteryChanceMax;
-        else bonus = (((float) skillLevel) / ((float) repairMasteryMaxBonusLevel)) * ((float) repairMasteryChanceMax);
+        if(skillLevel >= repairMasteryMaxBonusLevel) bonus = ((float) repairMasteryChanceMax / 100F);
+        else bonus = (((float) skillLevel) / ((float) repairMasteryMaxBonusLevel)) * (((float) repairMasteryChanceMax) / 100F);
 
         if (permInstance.repairMastery(player)) {
             bonus = (((float) repairAmount) * bonus);