Minor cleanup

This commit is contained in:
bm01 2013-03-08 10:33:20 +01:00
parent 57e33bbf39
commit 1633617006
2 changed files with 5 additions and 3 deletions

View File

@ -77,7 +77,7 @@ public class HerbalismManager extends SkillManager {
* @return the modified change in hunger for the event
*/
public int farmersDiet(int rankChange, int eventFoodLevel) {
return SkillUtils.handleFoodSkills(getPlayer(), SkillType.HERBALISM, eventFoodLevel, Herbalism.farmersDietRankLevel1, Herbalism.farmersDietMaxLevel, rankChange);
return SkillUtils.handleFoodSkills(getPlayer(), skill, eventFoodLevel, Herbalism.farmersDietRankLevel1, Herbalism.farmersDietMaxLevel, rankChange);
}
/**
@ -342,6 +342,6 @@ public class HerbalismManager extends SkillManager {
}
private byte getGreenThumbStage() {
return (byte) Math.min(Math.min(getProfile().getSkillLevel(SkillType.HERBALISM), Herbalism.greenThumbStageMaxLevel) / Herbalism.greenThumbStageChangeLevel, 4);
return (byte) Math.min(Math.min(getProfile().getSkillLevel(skill), Herbalism.greenThumbStageMaxLevel) / Herbalism.greenThumbStageChangeLevel, 4);
}
}

View File

@ -66,9 +66,11 @@ public class MiningManager extends SkillManager{
return;
}
boolean skillTouch = player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH);
for (int i = mcMMOPlayer.getAbilityMode(skill.getAbility()) ? 2 : 1; i != 0; i--) {
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Mining.doubleDropsMaxChance, Mining.doubleDropsMaxLevel)) {
if (player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
if (skillTouch) {
Mining.handleSilkTouchDrops(blockState);
}
else {