diff --git a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java index b183377791..062dba1ee7 100644 --- a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java +++ b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java @@ -230,7 +230,7 @@ public class SkillCaster implements Runnable return false; } - _coolTime = Formulas.calcAtkSpd(caster, _skill, _skill.getCoolTime()); // TODO Get proper fomula of this. + _coolTime = Formulas.calcAtkSpd(caster, _skill, _skill.getCoolTime()); // TODO Get proper formula of this. final int displayedCastTime = _castTime + Formulas.SKILL_LAUNCH_TIME; // For client purposes, it must be displayed to player the skill casting time + launch time. final boolean instantCast = (_castingType == SkillCastingType.SIMULTANEOUS) || _skill.isAbnormalInstant() || _skill.isWithoutAction(); @@ -934,6 +934,15 @@ public class SkillCaster implements Runnable player.sendPacket(sm); return false; } + + // Check for skill reuse (fixes macro right click press exploit). + if (caster.hasSkillReuse(skill.getReuseHashCode())) + { + final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_IS_NOT_AVAILABLE_AT_THIS_TIME_BEING_PREPARED_FOR_REUSE); + sm.addSkillName(skill); + caster.sendPacket(sm); + return false; + } } return true; diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java index b183377791..062dba1ee7 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/skills/SkillCaster.java @@ -230,7 +230,7 @@ public class SkillCaster implements Runnable return false; } - _coolTime = Formulas.calcAtkSpd(caster, _skill, _skill.getCoolTime()); // TODO Get proper fomula of this. + _coolTime = Formulas.calcAtkSpd(caster, _skill, _skill.getCoolTime()); // TODO Get proper formula of this. final int displayedCastTime = _castTime + Formulas.SKILL_LAUNCH_TIME; // For client purposes, it must be displayed to player the skill casting time + launch time. final boolean instantCast = (_castingType == SkillCastingType.SIMULTANEOUS) || _skill.isAbnormalInstant() || _skill.isWithoutAction(); @@ -934,6 +934,15 @@ public class SkillCaster implements Runnable player.sendPacket(sm); return false; } + + // Check for skill reuse (fixes macro right click press exploit). + if (caster.hasSkillReuse(skill.getReuseHashCode())) + { + final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_IS_NOT_AVAILABLE_AT_THIS_TIME_BEING_PREPARED_FOR_REUSE); + sm.addSkillName(skill); + caster.sendPacket(sm); + return false; + } } return true;