Skip to content
Snippets Groups Projects
Commit 298bc039 authored by Zoey76's avatar Zoey76
Browse files

Enemy Only target handler should not work on non-attackable NPC

Reported by: @ShinichiYao
Fixes #312
parent 97c2a3a7
No related branches found
No related tags found
No related merge requests found
...@@ -51,10 +51,14 @@ public class EnemyOnly implements ITargetTypeHandler { ...@@ -51,10 +51,14 @@ public class EnemyOnly implements ITargetTypeHandler {
return EMPTY_TARGET_LIST; return EMPTY_TARGET_LIST;
} }
if (target.isAttackable()) { if (target.isNpc()) {
return new L2Character[] { if (target.isAttackable()) {
target return new L2Character[] {
}; target
};
}
activeChar.sendPacket(INCORRECT_TARGET);
return EMPTY_TARGET_LIST;
} }
final var player = activeChar.getActingPlayer(); final var player = activeChar.getActingPlayer();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment