|
|
@ -33,23 +33,17 @@ public class MoveToPointHandler extends AbstractClientMsgHandler { |
|
|
|
if (pc == null) |
|
|
|
if (pc == null) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
AbstractWorldObject target; |
|
|
|
AbstractWorldObject target = null; |
|
|
|
Enum.GameObjectType targetType; |
|
|
|
Enum.GameObjectType targetType; |
|
|
|
|
|
|
|
|
|
|
|
targetType = Enum.GameObjectType.values()[msg.getTargetType()]; |
|
|
|
targetType = Enum.GameObjectType.values()[msg.getTargetType()]; |
|
|
|
|
|
|
|
|
|
|
|
switch(targetType){ |
|
|
|
switch(targetType){ |
|
|
|
case Mob: |
|
|
|
|
|
|
|
target = Mob.getMob(msg.getTargetID()); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case PlayerCharacter: |
|
|
|
|
|
|
|
target = PlayerCharacter.getPlayerCharacter(msg.getTargetID()); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case Building: |
|
|
|
case Building: |
|
|
|
target = BuildingManager.getBuilding(msg.getTargetID()); |
|
|
|
target = BuildingManager.getBuilding(msg.getTargetID()); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
case NPC: |
|
|
|
target = null; |
|
|
|
target = NPC.getNPC(msg.getTargetID()); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|