Should not be able to charge yourself.

This commit is contained in:
MobiusDevelopment
2019-03-31 00:44:02 +00:00
parent e75b660e91
commit 67acc58701

View File

@@ -1571,6 +1571,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
return; 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 // Check if the skill is psychical and if the Creature is not psychical_muted
if (!skill.isMagic() && _isPsychicalMuted && !skill.isPotion()) if (!skill.isMagic() && _isPsychicalMuted && !skill.isPotion())
{ {