1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2025-07-04 06:34:44 +02:00

Merge pull request from Glitchfinder/master

Fixing an issue where players repaired items a hundred times better than they should be able to.
This commit is contained in:
Glitchfinder
2012-12-30 09:39:05 -08:00

@ -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);