null check

This commit is contained in:
2023-09-10 14:09:48 -05:00
parent 04147e11cc
commit c3e206e3b1
@@ -37,6 +37,7 @@ public class MoveToPointHandler extends AbstractClientMsgHandler {
Enum.GameObjectType targetType;
targetType = Enum.GameObjectType.values()[msg.getTargetType()];
if(targetType != null) {
switch (targetType) {
case Building:
target = BuildingManager.getBuilding(msg.getTargetID());
@@ -49,7 +50,7 @@ public class MoveToPointHandler extends AbstractClientMsgHandler {
case NPC:
return true;//cannot attack anything other than the 3 above
}
}
MovementManager.movement(msg, pc);
return true;
}