private IEnumerator RequestChatInfo(GameWebAPI.RespData_ChatRequestMember data)
 {
     if (ChatTools.CheckOnFLG(data.result))
     {
         RequestBase request;
         if (data.approvalType == 1)
         {
             GameWebAPI.UserChatGroupList userChatGroupList = new GameWebAPI.UserChatGroupList();
             userChatGroupList.OnReceived = delegate(GameWebAPI.RespData_UserChatGroupList response)
             {
                 ClassSingleton <ChatData> .Instance.CurrentChatInfo.joinGroupData = response;
             };
             request = userChatGroupList;
         }
         else
         {
             GameWebAPI.UserChatRequestListLogic userChatRequestListLogic = new GameWebAPI.UserChatRequestListLogic();
             userChatRequestListLogic.OnReceived = delegate(GameWebAPI.RespData_UserChatRequestList response)
             {
                 ClassSingleton <ChatData> .Instance.CurrentChatInfo.requestGroupData = response;
             };
             request = userChatRequestListLogic;
         }
         return(request.RunOneTime(new Action(ClassSingleton <ChatData> .Instance.UpdateMaxJoinState), null, null));
     }
     return(null);
 }
    private APIRequestTask RequestChatData()
    {
        APIRequestTask apirequestTask = new APIRequestTask();

        if (BlockManager.instance().blockList == null)
        {
            apirequestTask.Add(BlockManager.instance().RequestBlockList(false));
        }
        RequestList requestList = new RequestList();

        GameWebAPI.UserChatGroupList userChatGroupList = new GameWebAPI.UserChatGroupList();
        userChatGroupList.OnReceived = delegate(GameWebAPI.RespData_UserChatGroupList response)
        {
            ClassSingleton <ChatData> .Instance.CurrentChatInfo.joinGroupData = response;
        };
        RequestBase addRequest = userChatGroupList;

        requestList.AddRequest(addRequest);
        GameWebAPI.UserChatInviteListLogic userChatInviteListLogic = new GameWebAPI.UserChatInviteListLogic();
        userChatInviteListLogic.OnReceived = delegate(GameWebAPI.RespData_UserChatInviteListLogic response)
        {
            ClassSingleton <ChatData> .Instance.CurrentChatInfo.inviteGroupData = response;
        };
        addRequest = userChatInviteListLogic;
        requestList.AddRequest(addRequest);
        GameWebAPI.UserChatRequestListLogic userChatRequestListLogic = new GameWebAPI.UserChatRequestListLogic();
        userChatRequestListLogic.OnReceived = delegate(GameWebAPI.RespData_UserChatRequestList response)
        {
            ClassSingleton <ChatData> .Instance.CurrentChatInfo.requestGroupData = response;
        };
        addRequest = userChatRequestListLogic;
        requestList.AddRequest(addRequest);
        apirequestTask.Add(new APIRequestTask(requestList, false));
        return(apirequestTask);
    }
Beispiel #3
0
 public void GetUserChatRequestListExec()
 {
     ChatTools.ChatLoadDisplay(true);
     GameWebAPI.UserChatRequestListLogic userChatRequestListLogic = new GameWebAPI.UserChatRequestListLogic();
     userChatRequestListLogic.OnReceived = delegate(GameWebAPI.RespData_UserChatRequestList response)
     {
         ClassSingleton <ChatData> .Instance.CurrentChatInfo.requestGroupData = response;
     };
     GameWebAPI.UserChatRequestListLogic request = userChatRequestListLogic;
     base.StartCoroutine(request.RunOneTime(new Action(this.AfterUserChatRequestList), delegate(Exception noop)
     {
         RestrictionInput.EndLoad();
     }, null));
 }
    private void UpdateRequestGroupData()
    {
        GameWebAPI.UserChatRequestListLogic userChatRequestListLogic = new GameWebAPI.UserChatRequestListLogic();
        userChatRequestListLogic.OnReceived = delegate(GameWebAPI.RespData_UserChatRequestList response)
        {
            ClassSingleton <ChatData> .Instance.CurrentChatInfo.requestGroupData = response;
        };
        RequestBase request = userChatRequestListLogic;

        base.StartCoroutine(request.RunOneTime(delegate()
        {
            RestrictionInput.EndLoad();
            ClassSingleton <ChatData> .Instance.UpdateMaxJoinState();
        }, delegate(Exception noop)
        {
            RestrictionInput.EndLoad();
        }, null));
    }