Copy-pasta code is bad.

This commit is contained in:
GJ
2013-01-21 20:01:33 -05:00
parent 67fd45ef25
commit ddbf5a559a
16 changed files with 69 additions and 149 deletions

View File

@ -132,14 +132,9 @@ public class MiningManager extends SkillManager{
return;
}
int randomChance = 100;
if (Permissions.luckyMining(player)) {
randomChance = 75;
}
float chance = ((float) Mining.DOUBLE_DROPS_MAX_CHANCE / Mining.DOUBLE_DROPS_MAX_BONUS_LEVEL) * eventHandler.skillModifier;
if (chance > Misc.getRandom().nextInt(randomChance)) {
if (chance > Misc.getRandom().nextInt(activationChance)) {
eventHandler.processDrops();
}
}