Create a utility method in SkillUtils to easily check ability cooldowns

This commit is contained in:
riking
2013-10-19 15:59:58 -07:00
parent 95f15e68fe
commit c6ca65f5c9
5 changed files with 22 additions and 8 deletions

View File

@ -288,7 +288,7 @@ public class MiningManager extends SkillManager {
private boolean blastMiningCooldownOver() {
Player player = getPlayer();
PlayerProfile profile = getProfile();
int timeRemaining = SkillUtils.calculateTimeLeft(profile.getSkillDATS(AbilityType.BLAST_MINING) * Misc.TIME_CONVERSION_FACTOR, AbilityType.BLAST_MINING.getCooldown(), player);
int timeRemaining = SkillUtils.calculateTimeLeft(AbilityType.BLAST_MINING, profile, player);
if (timeRemaining > 0) {
player.sendMessage(LocaleLoader.getString("Skills.TooTired", timeRemaining));