Fiuxing merge issue.

This commit is contained in:
U-YUE\Sean
2012-11-29 12:18:35 -08:00
parent cc044fe41b
commit 3153973c2b
10 changed files with 51 additions and 46 deletions

View File

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