Browse Source

null check

combat-2
FatBoy-DOTC 1 year ago
parent
commit
c3e206e3b1
  1. 3
      src/engine/net/client/handlers/MoveToPointHandler.java

3
src/engine/net/client/handlers/MoveToPointHandler.java

@ -37,6 +37,7 @@ public class MoveToPointHandler extends AbstractClientMsgHandler { @@ -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 { @@ -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;
}

Loading…
Cancel
Save