null check for target

This commit is contained in:
2023-09-10 13:26:28 -05:00
parent 18e1f4bd28
commit 8acfff7faa
@@ -63,6 +63,10 @@ public class AttackCmdMsgHandler extends AbstractClientMsgHandler {
return true; //cannot attack other things
}
if(target == null) {
playerCharacter.setCombatTarget(target);
return true; // cannot attack a null target
}
//set sources target
playerCharacter.setCombatTarget(target);