Преглед на файлове

Fix target type ENEMY.

Fixed a bug where you can attack yourself with skills which have the
target type ENEMY.
HorridoJoho преди 3 години
родител
ревизия
0331336ee4
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/main/java/com/l2jserver/gameserver/model/skills/targets/TargetType.java

+ 1 - 1
src/main/java/com/l2jserver/gameserver/model/skills/targets/TargetType.java

@@ -90,7 +90,7 @@ public enum TargetType {
 	ENEMY {
 		@Override
 		public L2Object getTarget(Skill skill, L2Character caster, L2Object target) {
-			if ((target == null) || !target.isCharacter()) {
+			if ((target == null) || (caster.getObjectId() == target.getObjectId()) || !target.isCharacter()) {
 				return null;
 			}