From 67acc58701ca1bb68e45dd55c7095ddf3057aa5c Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 31 Mar 2019 00:44:02 +0000 Subject: [PATCH] Should not be able to charge yourself. --- .../com/l2jmobius/gameserver/model/actor/Creature.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/Creature.java index 6cd470dc17..4fcfac49f9 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/Creature.java @@ -1571,6 +1571,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder return; } + // Should not be able to charge yourself. + if ((skill.getSkillType() == SkillType.CHARGEDAM) && (_target != null) && (_target == this)) + { + if (isPlayer()) + { + getActingPlayer().sendPacket(SystemMessageId.INCORRECT_TARGET); + } + return; + } + // Check if the skill is psychical and if the Creature is not psychical_muted if (!skill.isMagic() && _isPsychicalMuted && !skill.isPotion()) {