can no longer run to invalid targets

This commit is contained in:
2023-09-10 16:45:17 -05:00
parent ca6e079053
commit 426ef989f8
2 changed files with 33 additions and 12 deletions
@@ -56,9 +56,12 @@ public class AttackCmdMsgHandler extends AbstractClientMsgHandler {
case Building:
target = BuildingManager.getBuilding(msg.getTargetID());
break;
case NPC:
target = NPC.getNPC(msg.getTargetID());
break;
}
if(target == null) {
playerCharacter.setCombatTarget(null);
return true; // cannot attack a null target
}
//set sources target