Fixing a null pointer error related to skill cooldowns.

This commit is contained in:
Glitchfinder 2012-11-07 19:04:17 -08:00
parent d1f683b8a5
commit 2c613d5b99

View File

@ -80,6 +80,9 @@ public class Skills {
* @param ability The ability to watch cooldowns for
*/
public static void watchCooldown(Player player, PlayerProfile profile, AbilityType ability) {
if(player == null || profile == null || ability == null)
return;
if (!profile.getAbilityInformed(ability) && cooldownOver(profile.getSkillDATS(ability) * TIME_CONVERSION_FACTOR, ability.getCooldown(), player)) {
profile.setAbilityInformed(ability, true);
player.sendMessage(ability.getAbilityRefresh());