Ejemplo n.º 1
0
        public Respbase JoinGroup(JoinGroupReq req)
        {
            ChatFacade facade = new ChatFacade();
            bool       result = facade.JoinGroup(req);

            return(facade.PromptInfo);
        }
Ejemplo n.º 2
0
        public string JoinGroup(JoinGroupReq para, Action <ResponseEvent> callback)
        {
            const int subcmd   = (int)ProtoCmd.ECmdJoinGroupReq;
            var       response = new NetResponseCallback(JoinGroupResponse);
            var       seq      = this.Send(para, subcmd, response, callback);

            Debugger.Log("JoinGroup_Para {0} {1}", para, seq);
            return(seq);
        }
Ejemplo n.º 3
0
        public void JoinGroup(JoinGroupPara para, Action <ResponseEvent> callback)
        {
            GroupPlayerInfo playerInfo = new GroupPlayerInfo
            {
                Id   = RequestHeader.PlayerId,
                Name = para.PlayerInfo.Name,
                CustomGroupPlayerProfile = para.PlayerInfo.CustomGroupPlayerProfile,
                CustomGroupPlayerStatus  = para.PlayerInfo.CustomGroupPlayerStatus
            };

            JoinGroupReq joinGroupReq = new JoinGroupReq
            {
                GroupId    = this.GroupInfo.Id,
                PlayerInfo = playerInfo,
            };

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

            Core.Group.JoinGroup(joinGroupReq, cb);
        }