mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 13:46:46 +01:00
Fixing an issue where players repaired items a hundred times better than they should be able to.
This commit is contained in:
parent
aa70c82824
commit
7fc8d432b5
@ -211,8 +211,8 @@ 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 = ((float) repairMasteryChanceMax / 100F);
|
||||||
else bonus = (((float) skillLevel) / ((float) repairMasteryMaxBonusLevel)) * ((float) repairMasteryChanceMax);
|
else bonus = (((float) skillLevel) / ((float) repairMasteryMaxBonusLevel)) * (((float) repairMasteryChanceMax) / 100F);
|
||||||
|
|
||||||
if (permInstance.repairMastery(player)) {
|
if (permInstance.repairMastery(player)) {
|
||||||
bonus = (((float) repairAmount) * bonus);
|
bonus = (((float) repairAmount) * bonus);
|
||||||
|
Loading…
Reference in New Issue
Block a user