Example #1
0
        public void ResumeMatching(IColosseumMatchingInfo matchingInfo)
        {
            PvPBattleRecover resumeMatchingRequest = matchingInfo.GetResumeMatchingRequest();

            this.messageBuffer.Clear();
            this.messageBuffer.Add("080112", resumeMatchingRequest);
            Singleton <TCPUtil> .Instance.SendTCPRequest(this.messageBuffer, "activityList");
        }
    protected override IEnumerator ResumeTCP()
    {
        if (this.isResume)
        {
            yield break;
        }
        this.isResume = true;
        if (!this.isSendEvent)
        {
            base.stateManager.uiControlPvP.HideRetireWindow();
            base.stateManager.uiControlPvP.StartEnemyFailedTimer(delegate
            {
                base.stateManager.uiControlPvP.HideAlertDialog();
                this.ShowDisconnectTCPDialog(null);
            }, BattleUIControlPvP.DialogType.MyCount);
        }
        this.isPvPRecoverCommunicateCheck = false;
        Dictionary <string, object> data    = new Dictionary <string, object>();
        PvPBattleRecover            message = new PvPBattleRecover
        {
            isMockBattle    = ((!(ClassSingleton <MultiBattleData> .Instance.MockBattleUserCode == "0")) ? 1 : 0),
            uniqueRequestId = Singleton <TCPUtil> .Instance.GetUniqueRequestId()
        };

        data.Add("080112", message);
        while (!this.isPvPRecoverCommunicateCheck)
        {
            Singleton <TCPUtil> .Instance.SendTCPRequest(data, "activityList");

            yield return(Util.WaitForRealTime(2f));
        }
        yield return(this.SendConnectionNotice());

        if (!this.isSendEvent)
        {
            base.stateManager.uiControlPvP.HideAlertDialog();
        }
        this.isDisconnected = false;
        this.isResume       = false;
        yield break;
    }