Example #1
0
        //服务器弹窗公告
        public void NotifySystemAlertToClient(Object obj, int _errID)
        {
            SystemErrorReponse szSystemErrorReponse = new SystemErrorReponse();

            szSystemErrorReponse.State = _errID;
            GameManager.ClientMgr.SendToClient((obj as GameClient), DataHelper.ObjectToBytes <SystemErrorReponse>(szSystemErrorReponse), (int)CommandID.CMD_SYS_ERRCODE);
        }
Example #2
0
        //通知服务器错误
        public void NotifySystemErrorToClient(Object obj, int _errID)
        {
            SystemErrorReponse szSystemErrorReponse = new SystemErrorReponse();

            szSystemErrorReponse.State = _errID;
            //(obj as GameClient).sendCmd<SystemErrorReponse>(
            //    (int)CommandID.CMD_SYS_ERRCODE
            //    ,
            //szSystemErrorReponse);

            GameManager.ClientMgr.SendToClient((obj as GameClient), DataHelper.ObjectToBytes <SystemErrorReponse>(szSystemErrorReponse), (int)CommandID.CMD_SYS_ERRCODE);


            //SystemErrorReponse szSystemErrorReponse = new SystemErrorReponse();
            //szSystemErrorReponse.State = _errID;

            ////PlayGameReponse szPlayGameReponse = new PlayGameReponse();
            ////szPlayGameReponse.RoleID = szPlayGame.RoleID;


            //MemoryStream msResult = new MemoryStream();
            //Serializer.Serialize<SystemErrorReponse>(msResult, szSystemErrorReponse);

            //byte[] msSendData = msResult.ToArray();

            //TCPOutPacket tcpOutPacket = TCPOutPacket.MakeTCPOutPacket(Global._TCPManager.TcpOutPacketPool, msSendData, CommandID.CMD_SYS_ERRCODE);

            //msResult.Dispose();
            //msResult = null;


            //Global._TCPManager.MySocketListener.SendData((obj as GameClient).ClientSocket, tcpOutPacket);
        }
Example #3
0
        public void NotifySystemErrorToClients(List <Object> objList, int _errID)
        {
            SystemErrorReponse szSystemErrorReponse = new SystemErrorReponse();

            szSystemErrorReponse.State = _errID;
            GameManager.ClientMgr.SendProtocolToClients <SystemErrorReponse>(Global._TCPManager.MySocketListener, Global._TCPManager.TcpOutPacketPool, null,
                                                                             objList,
                                                                             szSystemErrorReponse, (int)CommandID.CMD_SYS_ERRCODE);
        }