Exemplo n.º 1
0
 public void Read(ReadBufferHelper bh)
 {
     nRetCode = bh.ReadUint16();
     dwAccountID = bh.ReadUint32();
     u64CharID = bh.ReadUint64();
     return ;
 }
Exemplo n.º 2
0
    public Boolean OnCmdConnectNotify(Command_ID wCommandID, UInt64 u64ConnID, ReadBufferHelper ReadHelper)
    {
        StConnectNotify ConnectNotify = new StConnectNotify();

        ConnectNotify.Read(ReadHelper);

        Byte ConType = ConnectNotify.btConType;


        if (ConType == (Byte)ConnectionType.TYPE_SVR_PROXY)
        {
            ConnectNotify.btConType = (Byte)ConnectionType.TYPE_CLT_PLAYER;
            ConnectNotify.u64ConnID = m_u64ClientID;
            m_WriteHelper.BeginWrite((UInt16)Command_ID.CMD_CONNECT_NOTIFY, (Byte)CmdHandler_ID.CMDH_SVR_CON);
            ConnectNotify.Write(m_WriteHelper);
            m_WriteHelper.EndWrite();
            SendData(m_WriteHelper.GetData(), (int)m_WriteHelper.GetDataLen());

            StCharEnterGameReq CharEnterGameReq = new StCharEnterGameReq();
            CharEnterGameReq.u64CharID      = m_u64ClientID;
            CharEnterGameReq.dwIdentifyCode = m_dwIdentifyCode;
            m_WriteHelper.BeginWrite((UInt16)Command_ID.CMD_CHAR_ENTER_GAME_REQ, (Byte)CmdHandler_ID.CMDH_SENCE);
            CharEnterGameReq.Write(m_WriteHelper);
            m_WriteHelper.EndWrite();
            SendData(m_WriteHelper.GetData(), (int)m_WriteHelper.GetDataLen());
        }
        else if (ConType == (Byte)ConnectionType.TYPE_SVR_LOGIN)
        {
            SetConnectState(ConnectState.Succ_Connect);
        }

        return(true);
    }
Exemplo n.º 3
0
 public void Read(ReadBufferHelper bh)
 {
     nRetCode    = bh.ReadUint16();
     dwAccountID = bh.ReadUint32();
     u64CharID   = bh.ReadUint64();
     return;
 }
Exemplo n.º 4
0
 public void Read(ReadBufferHelper bh)
 {
     dwAccountID = bh.ReadUint32();
     szCharName  = bh.ReadFixString(32);
     dwFeature   = bh.ReadUint32();
     return;
 }
Exemplo n.º 5
0
 public void Read(ReadBufferHelper bh)
 {
     u64CharID  = bh.ReadUint64();
     szCharName = bh.ReadFixString(32);
     dwLevel    = bh.ReadUint32();
     dwFeature  = bh.ReadUint32();
     return;
 }
Exemplo n.º 6
0
    public Boolean OnCmdHeartBeatAck(Command_ID wCommandID, UInt64 u64ConnID, ReadBufferHelper ReadHelper)
    {
        StCharHeartBeatAck CharHeartBeatAck = new StCharHeartBeatAck();

        CharHeartBeatAck.Read(ReadHelper);

        return(true);
    }
Exemplo n.º 7
0
 public void Read(ReadBufferHelper bh)
 {
     sDir = bh.ReadUint16();
     x    = bh.ReadFloat();
     y    = bh.ReadFloat();
     z    = bh.ReadFloat();
     return;
 }
Exemplo n.º 8
0
 public void Read(ReadBufferHelper bh)
 {
     CmdHandleID = bh.ReadUint8();
     wCommandID = bh.ReadUint16();
     dwSceneID = bh.ReadUint32();
     u64CharID = bh.ReadUint64();
     return ;
 }
Exemplo n.º 9
0
 public void Read(ReadBufferHelper bh)
 {
     CmdHandleID = bh.ReadUint8();
     wCommandID  = bh.ReadUint16();
     dwSceneID   = bh.ReadUint32();
     u64CharID   = bh.ReadUint64();
     dwPacketNo  = bh.ReadUint32();
     return;
 }
Exemplo n.º 10
0
 public void Read(ReadBufferHelper bh)
 {
     nRetCode       = bh.ReadUint16();
     u64CharID      = bh.ReadUint64();
     dwIdentifyCode = bh.ReadUint32();
     nProxyPort     = bh.ReadUint16();
     szProxyIpAddr  = bh.ReadFixString(32);
     return;
 }
Exemplo n.º 11
0
        public override Boolean OnCommandHandle(Command_ID wCommandID, UInt64 u64ConnID, ReadBufferHelper ReadHelper)
        {
            switch (wCommandID)
            {
                case Command_ID.CMD_CHAR_LOGIN_ACK:
                    {
                        StCharLoginAck Ack = new StCharLoginAck();
                        Ack.Read(ReadHelper);
                    }
                    break;
                case Command_ID.CMD_CHAR_NEW_CHAR_ACK:
                    {

                    }
                    break;
                case Command_ID.CMD_CHAR_DEL_CHAR_ACK:
                    {

                    }
                    break;
                case Command_ID.CMD_CHAR_NEW_ACCOUNT_ACK:
                    {
                        UInt16 nRetCode = ReadHelper.ReadUint16();
                    }
                    break;
                case Command_ID.CMD_CHAR_ENTER_GAME_ACK:
                    {

                    }
                    break;
                case Command_ID.CMD_CHAR_NEARBY_ADD:
                    {

                    }
                    break;
                case Command_ID.CMD_CHAR_NEARBY_UPDATE:
                    {

                    }
                    break;
                case Command_ID.CMD_CHAR_NEARBY_REMOVE:
                    {

                    }
                    break;

                default:
                    {

                    }
                    break;
            }

            return true;
        }
Exemplo n.º 12
0
 public void Read(ReadBufferHelper bh)
 {
     nRetCode    = bh.ReadUint16();
     dwAccountID = bh.ReadUint32();
     nCount      = bh.ReadUint8();
     for (int i = 0; i < nCount; i++)
     {
         CharPickInfo[i] = new StCharPickInfo();
         CharPickInfo[i].Read(bh);
     }
     return;
 }
Exemplo n.º 13
0
    public Boolean OnCmdPickCharAck(Command_ID wCommandID, UInt64 u64ConnID, ReadBufferHelper ReadHelper)
    {
        StCharPickCharAck CharPickCharAck = new StCharPickCharAck();

        CharPickCharAck.Read(ReadHelper);

        if (CharPickCharAck.nRetCode == 0)
        {
            DisConnect();
            m_u64ClientID               = CharPickCharAck.u64CharID;
            m_dwIdentifyCode            = CharPickCharAck.dwIdentifyCode;
            m_WriteHelper.m_u64ClientID = CharPickCharAck.u64CharID;
            ConnectToServer(CharPickCharAck.szProxyIpAddr, CharPickCharAck.nProxyPort);
        }

        return(true);
    }
Exemplo n.º 14
0
    //浠ヤ笅鏄唴閮ㄧ殑娑堟伅澶勭悊
    public Boolean OnCommandHandle(Command_ID wCommandID, UInt64 u64ConnID, ReadBufferHelper ReadHelper)
    {
        Boolean bHandled = false;

        switch (wCommandID)
        {
        case Command_ID.CMD_CONNECT_NOTIFY:
        {
            OnCmdConnectNotify(wCommandID, u64ConnID, ReadHelper);

            bHandled = true;
        }
        break;

        case Command_ID.CMD_CHAR_PICK_CHAR_ACK:
        {
            OnCmdPickCharAck(wCommandID, u64ConnID, ReadHelper);

            bHandled = true;
        }
        break;

        default:
        {
            foreach (MessageHandler h in m_MsghandlerList)
            {
                if (h.OnCommandHandle(wCommandID, u64ConnID, ReadHelper))
                {
                    bHandled = true;
                    break;
                }
            }
        }
        break;
        }

        if (!bHandled)
        {
            Debug.Print("Message %d is not by handled!", wCommandID);
        }

        return(true);
    }
Exemplo n.º 15
0
 public void Read(ReadBufferHelper bh)
 {
     u64CharID = bh.ReadUint64();
     return ;
 }
Exemplo n.º 16
0
 public void Read(ReadBufferHelper bh)
 {
     dwVerifyCode = bh.ReadUint32();
     return ;
 }
Exemplo n.º 17
0
 public void Read(ReadBufferHelper bh)
 {
     szAccountName = bh.ReadFixString(32);
     szPassword = bh.ReadFixString(32);
     return ;
 }
Exemplo n.º 18
0
 public void Read(ReadBufferHelper bh)
 {
     dwAccountID = bh.ReadUint32();
     szCharName = bh.ReadFixString(32);
     dwFeature = bh.ReadUint32();
     return ;
 }
Exemplo n.º 19
0
 public void Read(ReadBufferHelper bh)
 {
     dwLeaveReason = bh.ReadUint32();
     return ;
 }
Exemplo n.º 20
0
 public void Read(ReadBufferHelper bh)
 {
     sDir = bh.ReadUint16();
     x = bh.ReadFloat();
     y = bh.ReadFloat();
     z = bh.ReadFloat();
     return ;
 }
Exemplo n.º 21
0
 public void Read(ReadBufferHelper bh)
 {
     CheckCode = bh.ReadUint8();
     dwSize = bh.ReadUint16();
     return ;
 }
Exemplo n.º 22
0
 public void Read(ReadBufferHelper bh)
 {
     dwReqTimestamp = bh.ReadUint32();
     return ;
 }
Exemplo n.º 23
0
 public void Read(ReadBufferHelper bh)
 {
     dwIdentifyCode = bh.ReadUint32();
     dwSceneID = bh.ReadUint32();
     return ;
 }
Exemplo n.º 24
0
 public void Read(ReadBufferHelper bh)
 {
     dwSceneID = bh.ReadUint32();
     return;
 }
Exemplo n.º 25
0
 public void Read(ReadBufferHelper bh)
 {
     nRetCode = bh.ReadUint16();
     return;
 }
Exemplo n.º 26
0
 public void Read(ReadBufferHelper bh)
 {
     szAccountName = bh.ReadFixString(32);
     szPassword    = bh.ReadFixString(32);
     return;
 }
Exemplo n.º 27
0
 public void Read(ReadBufferHelper bh)
 {
     dwVerifyCode = bh.ReadUint32();
     return;
 }
Exemplo n.º 28
0
 public void Read(ReadBufferHelper bh)
 {
     btConType = bh.ReadUint8();
     u64ConnID = bh.ReadUint64();
     return;
 }
Exemplo n.º 29
0
 public void Read(ReadBufferHelper bh)
 {
     dwClientVersion = bh.ReadUint32();
     return;
 }
Exemplo n.º 30
0
 public void Read(ReadBufferHelper bh)
 {
     dwLeaveReason = bh.ReadUint32();
     return;
 }
Exemplo n.º 31
0
    public Boolean OnCmdConnectNotify(Command_ID wCommandID, UInt64 u64ConnID, ReadBufferHelper ReadHelper)
    {
        StConnectNotify ConnectNotify = new StConnectNotify();

        ConnectNotify.Read(ReadHelper);

        Byte ConType = ConnectNotify.btConType;

        ConnectNotify.btConType =  (Byte)ConnectionType.TYPE_CLT_PLAYER;

        ConnectNotify.u64ConnID = m_u64ClientID;

        m_WriteHelper.BeginWrite((UInt16)Command_ID.CMD_CONNECT_NOTIFY, (Byte)CmdHandler_ID.CMDH_SVR_CON);

        ConnectNotify.Write(m_WriteHelper);

        m_WriteHelper.EndWrite();

        SendData(m_WriteHelper.GetData(), (int)m_WriteHelper.GetDataLen());

        if (ConType == (Byte)ConnectionType.TYPE_SVR_PROXY)
        {
            StCharEnterGameReq CharEnterGameReq = new StCharEnterGameReq();

            CharEnterGameReq.u64CharID = m_u64ClientID;
            CharEnterGameReq.dwIdentifyCode = m_dwIdentifyCode;

            m_WriteHelper.BeginWrite((UInt16)Command_ID.CMD_CHAR_ENTER_GAME_REQ, (Byte)CmdHandler_ID.CMDH_SENCE);

            CharEnterGameReq.Write(m_WriteHelper);

            m_WriteHelper.EndWrite();

            SendData(m_WriteHelper.GetData(), (int)m_WriteHelper.GetDataLen());
        }
        else if (ConType == (Byte)ConnectionType.TYPE_SVR_LOGIN)
        {
            SetConnectState(ConnectState.Succ_Connect);
        }

        return true;
    }
Exemplo n.º 32
0
 public void Read(ReadBufferHelper bh)
 {
     return ;
 }
Exemplo n.º 33
0
    public Boolean OnCmdHeartBeatAck(Command_ID wCommandID, UInt64 u64ConnID, ReadBufferHelper ReadHelper)
    {
        StCharHeartBeatAck CharHeartBeatAck = new StCharHeartBeatAck();
        CharHeartBeatAck.Read(ReadHelper);

        return true;
    }
Exemplo n.º 34
0
 public void Read(ReadBufferHelper bh)
 {
     nRetCode = bh.ReadUint16();
     dwAccountID = bh.ReadUint32();
     nCount = bh.ReadUint8();
     for (int i = 0; i < nCount; i++)
     {
         CharPickInfo[i] = new StCharPickInfo();
         CharPickInfo[i].Read(bh);
     }
     return ;
 }
Exemplo n.º 35
0
    public Boolean OnCmdPickCharAck(Command_ID wCommandID, UInt64 u64ConnID, ReadBufferHelper ReadHelper)
    {
        StCharPickCharAck CharPickCharAck = new StCharPickCharAck();
        CharPickCharAck.Read(ReadHelper);

        if (CharPickCharAck.nRetCode == 0)
        {
            DisConnect();
            m_u64ClientID = CharPickCharAck.u64CharID;
            m_dwIdentifyCode = CharPickCharAck.dwIdentifyCode;
            m_WriteHelper.m_u64ClientID = CharPickCharAck.u64CharID;
            ConnectToServer(CharPickCharAck.szIpAddr, CharPickCharAck.sPort);
        }

        return true;
    }
Exemplo n.º 36
0
 public void Read(ReadBufferHelper bh)
 {
     nRetCode = bh.ReadUint16();
     return ;
 }
Exemplo n.º 37
0
 public void Read(ReadBufferHelper bh)
 {
     u64CharID = bh.ReadUint64();
     dwIdentifyCode = bh.ReadUint32();
     return ;
 }
Exemplo n.º 38
0
 public void Read(ReadBufferHelper bh)
 {
     nRetCode = bh.ReadUint16();
     CharPickInfo.Read(bh);
     return ;
 }
Exemplo n.º 39
0
 public void Read(ReadBufferHelper bh)
 {
     btConType = bh.ReadUint8();
     u64ConnID = bh.ReadUint64();
     return ;
 }
Exemplo n.º 40
0
 public void Read(ReadBufferHelper bh)
 {
     nRetCode = bh.ReadUint16();
     u64CharID = bh.ReadUint64();
     dwIdentifyCode = bh.ReadUint32();
     nProxyPort = bh.ReadUint16();
     szProxyIpAddr = bh.ReadFixString(32);
     return ;
 }
Exemplo n.º 41
0
 public void Read(ReadBufferHelper bh)
 {
     szGMCommand = bh.ReadFixString(32);
     return;
 }
Exemplo n.º 42
0
 public void Read(ReadBufferHelper bh)
 {
     u64CharID = bh.ReadUint64();
     szCharName = bh.ReadFixString(32);
     dwLevel = bh.ReadUint32();
     dwFeature = bh.ReadUint32();
     return ;
 }
Exemplo n.º 43
0
 public void Read(ReadBufferHelper bh)
 {
     u64CharID      = bh.ReadUint64();
     dwIdentifyCode = bh.ReadUint32();
     return;
 }
Exemplo n.º 44
0
 public void Read(ReadBufferHelper bh)
 {
     dwClientVersion = bh.ReadUint32();
     return ;
 }
Exemplo n.º 45
0
 public void Read(ReadBufferHelper bh)
 {
     dwReqTimestamp = bh.ReadUint32();
     dwServerTime   = bh.ReadUint32();
     return;
 }
Exemplo n.º 46
0
 public void Read(ReadBufferHelper bh)
 {
     dwSceneID = bh.ReadUint32();
     return ;
 }
Exemplo n.º 47
0
 public void Read(ReadBufferHelper bh)
 {
     return;
 }
Exemplo n.º 48
0
 public abstract Boolean OnCommandHandle(Command_ID wCommandID, UInt64 u64ConnID, ReadBufferHelper ReadHelper);
Exemplo n.º 49
0
 public void Read(ReadBufferHelper bh)
 {
     u64CharID = bh.ReadUint64();
     return;
 }
Exemplo n.º 50
0
 public void Read(ReadBufferHelper bh)
 {
     nRetCode = bh.ReadUint16();
     CharPickInfo.Read(bh);
     return;
 }
Exemplo n.º 51
0
        public override Boolean OnCommandHandle(Command_ID wCommandID, UInt64 u64ConnID, ReadBufferHelper ReadHelper)
        {
            switch (wCommandID)
            {
            case Command_ID.CMD_CHAR_LOGIN_ACK:
            {
                StCharLoginAck Ack = new StCharLoginAck();
                Ack.Read(ReadHelper);
            }
            break;

            case Command_ID.CMD_CHAR_NEW_CHAR_ACK:
            {
            }
            break;

            case Command_ID.CMD_CHAR_DEL_CHAR_ACK:
            {
            }
            break;

            case Command_ID.CMD_CHAR_NEW_ACCOUNT_ACK:
            {
                UInt16 nRetCode = ReadHelper.ReadUint16();
            }
            break;

            case Command_ID.CMD_CHAR_ENTER_GAME_ACK:
            {
            }
            break;

            case Command_ID.CMD_CHAR_NEARBY_ADD:
            {
            }
            break;

            case Command_ID.CMD_CHAR_NEARBY_UPDATE:
            {
            }
            break;

            case Command_ID.CMD_CHAR_NEARBY_REMOVE:
            {
            }
            break;

            default:
            {
            }
            break;
            }

            return(true);
        }
Exemplo n.º 52
0
    //�������ڲ�����Ϣ����
    public Boolean OnCommandHandle(Command_ID wCommandID, UInt64 u64ConnID, ReadBufferHelper ReadHelper)
    {
        Boolean bHandled = false;

        switch (wCommandID)
        {
            case Command_ID.CMD_CONNECT_NOTIFY:
                {
                    OnCmdConnectNotify(wCommandID, u64ConnID, ReadHelper);

                    bHandled = true;
                }
                break;
            case Command_ID.CMD_CHAR_PICK_CHAR_ACK:
                {
                    OnCmdPickCharAck(wCommandID, u64ConnID, ReadHelper);

                    bHandled = true;
                }
                break;

            default:
                {
                    foreach (MessageHandler h in m_MsghandlerList)
                    {
                        if (h.OnCommandHandle(wCommandID, u64ConnID, ReadHelper))
                        {
                            bHandled = true;
                            break;
                        }
                    }

                }
                break;
        }

        if (!bHandled)
        {
            Debug.Print("Message %d is not by handled!", wCommandID);
        }

        return true;
    }
Exemplo n.º 53
0
 public void Read(ReadBufferHelper bh)
 {
     szGMCommand = bh.ReadFixString(32);
     return ;
 }
Exemplo n.º 54
0
 public void Read(ReadBufferHelper bh)
 {
     CheckCode = bh.ReadUint8();
     dwSize    = bh.ReadUint16();
     return;
 }
Exemplo n.º 55
0
 public abstract Boolean OnCommandHandle(Command_ID wCommandID, UInt64 u64ConnID, ReadBufferHelper ReadHelper);