/** * @param cooldownId * @return */ public boolean isSkillDisabled(SkillTemplate template) { if (skillCoolDowns == null) return false; int cooldownId = template.getCooldownId(); Long coolDown = skillCoolDowns.get(cooldownId); if (coolDown == null) { return false; } if (coolDown < System.currentTimeMillis()) { removeSkillCoolDown(cooldownId); return false; } /* * Some shared cooldown skills have indipendent and different cooldown they must not be blocked */ if (skillCoolDownsBase != null && skillCoolDownsBase.get(cooldownId) != null) { if ((template.getDuration() + template.getCooldown() * 100 + skillCoolDownsBase.get(cooldownId)) < System.currentTimeMillis()) return false; } return true; }