示例#1
0
 public override void Move(byte face, ushort x, ushort y)
 {
     try
     {
         var u = new MovePluto();
         var result = u.Encode(face, x, y);
         m_tcpWorker.Send(result);
     }
     catch (Exception ex)
     {
         LoggerHelper.Except(ex);
     }
 }
示例#2
0
        private static Pluto GetPluto(MSGIDType msgId)
        {
            if (msgIdToPluto.ContainsKey(msgId))
            {
                return(msgIdToPluto[msgId]);
            }
            Pluto pluto;

            switch (msgId)
            {
            case MSGIDType.BASEAPP_CLIENT_MOVE_REQ:
                pluto = MovePluto.Create();
                break;

            case MSGIDType.BASEAPP_CLIENT_RPCALL:
            case MSGIDType.CLIENT_RPC_RESP:
                pluto = RpcCallPluto.Create();
                break;

            case MSGIDType.LOGINAPP_LOGIN:
            case MSGIDType.CLIENT_LOGIN_RESP:
                pluto = LoginPluto.Create();
                break;

            case MSGIDType.CLIENT_NOTIFY_ATTACH_BASEAPP:
                pluto = BaseLoginPluto.Create();
                break;

            case MSGIDType.CLIENT_ENTITY_ATTACHED:
                pluto = EntityAttachedPluto.Create();
                break;

            case MSGIDType.CLIENT_AOI_NEW_ENTITY:
                pluto = AOINewEntityPluto.Create();
                break;

            case MSGIDType.CLIENT_AOI_DEL_ENTITY:
                pluto = AOIDelEntityPluto.Create();
                break;

            case MSGIDType.CLIENT_OTHER_ENTITY_POS_SYNC:
                pluto = OtherEntityPosSyncPluto.Create();
                break;

            case MSGIDType.CLIENT_OTHER_ENTITY_POS_PULL:
                pluto = OtherEntityPosPullPluto.Create();
                break;

            case MSGIDType.CLIENT_OTHER_ENTITY_TELEPORT:
                pluto = OtherEntityPosTeleportPluto.Create();
                break;

            case MSGIDType.CLIENT_ENTITY_CELL_ATTACHED:
                pluto = EntityCellAttachedPluto.Create();
                break;

            case MSGIDType.CLIENT_AOI_ENTITIES:
                pluto = AOIEntitiesPluto.Create();
                break;

            case MSGIDType.CLIENT_AVATAR_ATTRI_SYNC:
                pluto = AvatarAttriSyncPluto.Create();
                break;

            case MSGIDType.CLIENT_OTHER_ENTITY_ATTRI_SYNC:
                pluto = OtherAttriSyncPluto.Create();
                break;

            case MSGIDType.CLIENT_ENTITY_POS_SYNC:
                pluto = EntityPosSyncPluto.Create();
                break;

            case MSGIDType.CLIENT_ENTITY_POS_PULL:
                pluto = EntityPosPullPluto.Create();
                break;

            case MSGIDType.CLIENT_ENTITY_POS_TELEPORT:
                pluto = EntityPosTeleportPluto.Create();
                break;

            case MSGIDType.CLIENT_CHECK_RESP:
                pluto = CheckDefMD5Pluto.Create();
                break;

            case MSGIDType.BASEAPP_CLIENT_REFUSE_RELOGIN:
                pluto = ReConnectRefusePluto.Create();
                break;

            case MSGIDType.NOTIFY_CLIENT_DEFUSE_LOGIN:
                pluto = DefuseLoginPluto.Create();
                break;

            default:
                pluto = NotImplementedPluto.Create();
                break;
            }
            msgIdToPluto[msgId] = pluto;
            return(pluto);
        }