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

Minor fix for Target target handler

Reported by: @m443556
parent d9acb9ee
No related branches found
No related tags found
No related merge requests found
......@@ -40,9 +40,12 @@ public class Target implements ITargetTypeHandler {
}
final var player = activeChar.getActingPlayer();
if ((player != null) && !player.getCurrentSkill().isCtrlPressed() && target.isAutoAttackable(activeChar)) {
activeChar.sendPacket(INCORRECT_TARGET);
return EMPTY_TARGET_LIST;
if (player != null) {
final var currentSkill = player.getCurrentSkill();
if ((currentSkill != null) && !currentSkill.isCtrlPressed() && target.isAutoAttackable(activeChar)) {
activeChar.sendPacket(INCORRECT_TARGET);
return EMPTY_TARGET_LIST;
}
}
return skill.getAffectScope().affectTargets(activeChar, target, skill).toArray(EMPTY_TARGET_LIST);
......
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