Inheritance: global::ProtoBuf.IExtensible
Exemplo n.º 1
0
        private void OnWorldList(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.AckServerList xData = new NFMsg.AckServerList();
            xData = Serializer.Deserialize <NFMsg.AckServerList>(new MemoryStream(xMsg.msg_data));

            if (ReqServerListType.RSLT_WORLD_SERVER == xData.type)
            {
                for (int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    Debug.Log("WorldList  ServerId: " + info.server_id + " Name: " + System.Text.Encoding.Default.GetString(info.name) + " Status: " + info.status);
                    mWorldServerList.Add(info);
                }

                mEventModule.DoEvent((int)NFUIModule.Event.WorldList);
            }
            else if (ReqServerListType.RSLT_GAMES_ERVER == xData.type)
            {
                for (int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    Debug.Log("GameList  ServerId: " + info.server_id + " Name: " + System.Text.Encoding.Default.GetString(info.name) + " Status: " + info.status);
                    mGameServerList.Add(info);
                }
                mEventModule.DoEvent((int)NFUIModule.Event.ServerList);
            }
        }
Exemplo n.º 2
0
        private void OnWorldList(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.AckServerList xData = NFMsg.AckServerList.Parser.ParseFrom(xMsg.msg_data);

            if (ReqServerListType.RSLT_WORLD_SERVER == xData.type)
            {
                for (int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    Debug.Log("WorldList  ServerId: " + info.server_id + " Name: " + info.name.ToStringUtf8() + " Status: " + info.status);
                    mWorldServerList.Add(info);
                }

                mEventModule.DoEvent((int)NFUIModule.Event.WorldList);
            }
            else if (ReqServerListType.RSLT_GAMES_ERVER == xData.type)
            {
                for (int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    Debug.Log("GameList  ServerId: " + info.server_id + " Name: " + info.name.ToStringUtf8() + " Status: " + info.status);
                    mGameServerList.Add(info);
                }
                mEventModule.DoEvent((int)NFUIModule.Event.ServerList);
            }
        }
Exemplo n.º 3
0
        private void OnWorldList(int id, MemoryStream stream)
        {
            NFMsg.MsgBase       xMsg  = NFMsg.MsgBase.Parser.ParseFrom(stream);
            NFMsg.AckServerList xData = NFMsg.AckServerList.Parser.ParseFrom(xMsg.MsgData);

            if (ReqServerListType.RsltWorldServer == xData.Type)
            {
                for (int i = 0; i < xData.Info.Count; ++i)
                {
                    ServerInfo info = xData.Info[i];
                    Debug.Log("WorldList  ServerId: " + info.ServerId + " Name: " + info.Name.ToStringUtf8() + " Status: " + info.Status);
                    mWorldServerList.Add(info);
                }

                mEventModule.DoEvent((int)NFLoginModule.Event.WorldList);
            }
            else if (ReqServerListType.RsltGamesErver == xData.Type)
            {
                for (int i = 0; i < xData.Info.Count; ++i)
                {
                    ServerInfo info = xData.Info[i];
                    Debug.Log("GameList  ServerId: " + info.ServerId + " Name: " + info.Name.ToStringUtf8() + " Status: " + info.Status);
                    mGameServerList.Add(info);
                }
                mEventModule.DoEvent((int)NFLoginModule.Event.ServerList);
            }
        }
Exemplo n.º 4
0
        private void EGMI_ACK_WORLD_LIST(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.AckServerList xData = new NFMsg.AckServerList();
            xData = Serializer.Deserialize <NFMsg.AckServerList>(new MemoryStream(xMsg.msg_data));

            if (ReqServerListType.RSLT_WORLD_SERVER == xData.type)
            {
                for (int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    aWorldList.Add(info);
                }
            }
            else if (ReqServerListType.RSLT_GAMES_ERVER == xData.type)
            {
                for (int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    aServerList.Add(info);
                }
            }
        }
Exemplo n.º 5
0
        private void EGMI_ACK_WORLD_LIST(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.AckServerList xData = new NFMsg.AckServerList();
            xData = Serializer.Deserialize <NFMsg.AckServerList>(new MemoryStream(xMsg.msg_data));

            if (ReqServerListType.RSLT_WORLD_SERVER == xData.type)
            {
                for (int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    Debug.Log("WorldList  ServerId: " + info.server_id + " Name: " + System.Text.Encoding.Default.GetString(info.name) + " Status: " + info.status);
                    aWorldList.Add(info);
                }
            }
            else if (ReqServerListType.RSLT_GAMES_ERVER == xData.type)
            {
                for (int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    Debug.Log("GameList  ServerId: " + info.server_id + " Name: " + System.Text.Encoding.Default.GetString(info.name) + " Status: " + info.status);
                    aServerList.Add(info);
                }
            }
        }
Exemplo n.º 6
0
        private void EGMI_ACK_WORLD_LIST(NFMsg.MsgBase xMsg)
        {
            NFMsg.AckServerList xData = new NFMsg.AckServerList();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.AckServerList)) as NFMsg.AckServerList;

            if (ReqServerListType.RSLT_WORLD_SERVER == xData.type)
            {
                mxNetController.aWorldList.Clear();

                for (int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    Debug.Log("WorldList  ServerId: " + info.server_id + " Name: " + System.Text.Encoding.Default.GetString(info.name) + " Status: " + info.status);
                    mxNetController.aWorldList.Add(info);
                }
                if (mxNetController.aWorldList.Count >= 1)
                {
                    ServerInfo info = (ServerInfo)mxNetController.aWorldList[0];
                    NFNetController.Instance.mxNetSender.RequireConnectWorld(info.server_id);
                }
            }
            else if (ReqServerListType.RSLT_GAMES_ERVER == xData.type)
            {
                mxNetController.aServerList.Clear();

                for (int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    Debug.Log("GameList  ServerId: " + info.server_id + " Name: " + System.Text.Encoding.Default.GetString(info.name) + " Status: " + info.status);
                    mxNetController.aServerList.Add(info);
                }

                //NFCSectionManager.Instance.SetGameState(NFCSection.UI_SECTION_STATE.UISS_SERVERLIST);

                if (mxNetController.aServerList.Count >= 1)
                {
                    ServerInfo info = (ServerInfo)mxNetController.aServerList[0];
                    NFNetController.Instance.nServerID = info.server_id;
                    NFNetController.Instance.mxNetSender.RequireSelectServer(info.server_id);
                }
            }
        }
Exemplo n.º 7
0
        private void EGMI_ACK_WORLD_LIST(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize<NFMsg.MsgBase>(stream);

            NFMsg.AckServerList xData = new NFMsg.AckServerList();
            xData = Serializer.Deserialize<NFMsg.AckServerList>(new MemoryStream(xMsg.msg_data));

            if (ReqServerListType.RSLT_WORLD_SERVER == xData.type)
            {
                for(int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    Debug.Log("WorldList  ServerId: " + info.server_id + " Name: " + System.Text.Encoding.Default.GetString(info.name) + " Status: " + info.status);
                    aWorldList.Add(info);
                }
            }
            else if (ReqServerListType.RSLT_GAMES_ERVER == xData.type)
            {
                for (int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    Debug.Log("GameList  ServerId: " + info.server_id + " Name: " + System.Text.Encoding.Default.GetString(info.name) + " Status: " + info.status);
                    aServerList.Add(info);
                }
            }
        }
Exemplo n.º 8
0
        private void EGMI_ACK_WORLD_LIST(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize<NFMsg.MsgBase>(stream);

            NFMsg.AckServerList xData = new NFMsg.AckServerList();
            xData = Serializer.Deserialize<NFMsg.AckServerList>(new MemoryStream(xMsg.msg_data));

            if (ReqServerListType.RSLT_WORLD_SERVER == xData.type)
            {
                for(int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    aWorldList.Add(info);
                }
            }
            else if (ReqServerListType.RSLT_GAMES_ERVER == xData.type)
            {
                for (int i = 0; i < xData.info.Count; ++i)
                {
                    ServerInfo info = xData.info[i];
                    aServerList.Add(info);
                }
            }
        }