mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-01 05:04:43 +02:00
Fiuxing merge issue.
This commit is contained in:
@ -210,20 +210,20 @@ public class Repair {
|
||||
* @return The final amount of durability repaired to the item
|
||||
*/
|
||||
protected static short repairCalculate(Player player, int skillLevel, short durability, int repairAmount) {
|
||||
// float bonus = (float) skillLevel / 500;
|
||||
float bonus;
|
||||
if(skillLevel >= repairMasteryMaxBonusLevel) bonus = repairMasteryChanceMax;
|
||||
else bonus = ((float) skillLevel / (float) repairMasteryMaxBonusLevel) * (float) repairMasteryChanceMax;
|
||||
double bonus = (double) skillLevel / 500F;
|
||||
|
||||
if (permInstance.repairMastery(player)) {
|
||||
bonus = (repairAmount * bonus);
|
||||
repairAmount += bonus;
|
||||
bonus = ((double) repairAmount * bonus);
|
||||
repairAmount += (int) bonus;
|
||||
}
|
||||
|
||||
if (checkPlayerProcRepair(player)) {
|
||||
repairAmount = (short) (repairAmount * 2);
|
||||
repairAmount = (int) (repairAmount * 2);
|
||||
}
|
||||
|
||||
if(repairAmount <= 0 || repairAmount > 32767)
|
||||
repairAmount = 32767;
|
||||
|
||||
durability -= repairAmount;
|
||||
|
||||
if (durability < 0) {
|
||||
|
Reference in New Issue
Block a user