Fishermans diet now uses the FoodChance value from advanced.yml

This commit is contained in:
TfT_02 2013-01-05 00:52:11 +01:00
parent 49fc2a93fa
commit d183b1b940

View File

@ -18,6 +18,9 @@ public class FishingCommand extends SkillCommand {
private String shakeChance; private String shakeChance;
private String fishermansDietRank; private String fishermansDietRank;
private int fishermansDietRankChange = advancedConfig.getFarmerDietRankChange();
private int fishermansDietRankMaxLevel = fishermansDietRankChange * 5;
private boolean canTreasureHunt; private boolean canTreasureHunt;
private boolean canMagicHunt; private boolean canMagicHunt;
private boolean canShake; private boolean canShake;
@ -37,21 +40,9 @@ public class FishingCommand extends SkillCommand {
} }
shakeChance = String.valueOf(dropChance); shakeChance = String.valueOf(dropChance);
if (skillValue >= 1000) { if(skillValue >= fishermansDietRankMaxLevel) fishermansDietRank = "5";
fishermansDietRank = "5"; else fishermansDietRank = String.valueOf((int) ((double) skillValue / (double) fishermansDietRankChange));
}
else if (skillValue >= 800) {
fishermansDietRank = "4";
}
else if (skillValue >= 600) {
fishermansDietRank = "3";
}
else if (skillValue >= 400) {
fishermansDietRank = "2";
}
else {
fishermansDietRank = "1";
}
shakeUnlockLevel = advancedConfig.getShakeUnlockLevel(); shakeUnlockLevel = advancedConfig.getShakeUnlockLevel();
} }