Пример #1
0
        public string ChangeCustomGroupPlayerStatus(ChangeCustomGroupPlayerStatusReq para, Action <ResponseEvent> callback)
        {
            const int subcmd   = (int)ProtoCmd.ECmdChangeGroupPlayerStateReq;
            var       response = new NetResponseCallback(ChangeCustomGroupPlayerStatusResponse);
            var       seq      = this.Send(para, subcmd, response, callback);

            Debugger.Log("ChangeCustomGroupPlayerStatus_Para {0} {1}", para, seq);
            return(seq);
        }
Пример #2
0
        public void ChangeCustomGroupPlayerStatus(ChangeCustomGroupPlayerStatusPara para, Action <ResponseEvent> callback)
        {
            ChangeCustomGroupPlayerStatusReq req = new ChangeCustomGroupPlayerStatusReq
            {
                GroupId = this.GroupInfo.Id,
                CustomGroupPlayerStatus = para.CustomGroupPlayerStatus
            };

            Action <ResponseEvent> cb = eve =>
            {
                this.GroupUtil.SaveGroupInfo(eve, ((ChangeCustomGroupPlayerStatusRsp)eve.Data)?.GroupInfo);
                callback?.Invoke(eve);
            };

            Core.Group.ChangeCustomGroupPlayerStatus(req, cb);
        }