null check for target

This commit is contained in:
FatBoy committed 2023-09-10 13:26:28 -05:00
1 parent 18e1f4bd28
commit 8acfff7faa
1 file changed
+4
@@ -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);