can no longer run to invalid targets

This commit is contained in:
FatBoy committed 2023-09-10 16:45:17 -05:00
1 parent ca6e079053
commit 426ef989f8
2 files changed
+33 -12

No files matched your search

@@ -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