Dealing with type conversion issues in the skill commands.

This commit is contained in:
Glitchfinder
2012-11-25 16:18:30 -08:00
parent b1cf9d139a
commit 082fa2ca0d
13 changed files with 232 additions and 232 deletions

View File

@ -329,7 +329,7 @@ public class Mining {
int skillCheck = Misc.skillCheck(skillLevel, MAX_BONUS_LEVEL);
int randomChance = 100;
int chance = (MAX_CHANCE / MAX_BONUS_LEVEL) * skillLevel;
int chance = (int) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * (double) skillLevel);
if (player.hasPermission("mcmmo.perks.lucky.mining")) {
randomChance = (int) (randomChance * 0.75);