mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-28 11:37:39 +01:00
Merge pull request #369 from Glitchfinder/master
Repairing the Repair skill.
This commit is contained in:
commit
f6bc473eb4
@ -212,10 +212,10 @@ public class Repair {
|
|||||||
protected static short repairCalculate(Player player, int skillLevel, short durability, int repairAmount) {
|
protected static short repairCalculate(Player player, int skillLevel, short durability, int repairAmount) {
|
||||||
float bonus;
|
float bonus;
|
||||||
if(skillLevel >= repairMasteryMaxBonusLevel) bonus = repairMasteryChanceMax;
|
if(skillLevel >= repairMasteryMaxBonusLevel) bonus = repairMasteryChanceMax;
|
||||||
else bonus = (skillLevel / repairMasteryMaxBonusLevel) * repairMasteryChanceMax;
|
else bonus = (((float) skillLevel) / ((float) repairMasteryMaxBonusLevel)) * ((float) repairMasteryChanceMax);
|
||||||
|
|
||||||
if (permInstance.repairMastery(player)) {
|
if (permInstance.repairMastery(player)) {
|
||||||
bonus = (repairAmount * bonus);
|
bonus = (((float) repairAmount) * bonus);
|
||||||
repairAmount += (int) bonus;
|
repairAmount += (int) bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user