public IEnumerator RequestEndBattle(GameWebAPI.ColosseumBattleEndLogic request, Action <GameWebAPI.RespData_ColosseumBattleEndLogic> onCompleted)
 {
     GameWebAPI.RespData_ColosseumBattleEndLogic endBattleResponse = null;
     request.OnReceived = delegate(GameWebAPI.RespData_ColosseumBattleEndLogic response)
     {
         endBattleResponse = response;
     };
     return(request.Run(delegate()
     {
         onCompleted(endBattleResponse);
     }, null, null));
 }
 public void OnReceiveLoseBattleRequest(GameWebAPI.RespData_ColosseumBattleEndLogic response)
 {
     global::Debug.Log("OnReceiveLoseBattleRequest");
     this.uiRoot.SetErrorData("AlertNetworkErrorTitle", "ColosseumNetworkError");
     this.network.CloseSocketNetwork();
 }
    private IEnumerator BattleEndActionHttp()
    {
        GameWebAPI.RespData_ColosseumBattleEndLogic colosseumEnd = null;
        GameWebAPI.ColosseumBattleEndLogic          request      = new GameWebAPI.ColosseumBattleEndLogic
        {
            SetSendData = delegate(GameWebAPI.ReqData_ColosseumBattleEndLogic param)
            {
                param.battleResult         = ClassSingleton <MultiBattleData> .Instance.BattleResult;
                param.roundCount           = this.battleStateData.currentRoundNumber;
                param.isMockBattle         = ((!(ClassSingleton <MultiBattleData> .Instance.MockBattleUserCode == "0")) ? 1 : 0);
                param.skillUseDeckPosition = "0";
            },
            OnReceived = delegate(GameWebAPI.RespData_ColosseumBattleEndLogic resData)
            {
                colosseumEnd = resData;
            }
        };
        RequestBase request2 = request;

        if (BattlePvPFunction.< > f__mg$cache0 == null)
        {
            BattlePvPFunction.< > f__mg$cache0 = new Action(RestrictionInput.EndLoad);
        }
        yield return(request2.Run(BattlePvPFunction.< > f__mg$cache0, delegate(Exception noop)
        {
            RestrictionInput.EndLoad();
        }, null));

        MultiBattleData.BattleEndResponseData responseData = new MultiBattleData.BattleEndResponseData();
        if (colosseumEnd != null)
        {
            responseData.resultCode = colosseumEnd.resultCode;
            List <MultiBattleData.BattleEndResponseData.Reward> list = new List <MultiBattleData.BattleEndResponseData.Reward>();
            if (colosseumEnd.reward != null)
            {
                for (int i = 0; i < colosseumEnd.reward.Length; i++)
                {
                    list.Add(new MultiBattleData.BattleEndResponseData.Reward
                    {
                        assetCategoryId = colosseumEnd.reward[i].assetCategoryId,
                        assetNum        = colosseumEnd.reward[i].assetNum,
                        assetValue      = colosseumEnd.reward[i].assetValue
                    });
                }
            }
            List <MultiBattleData.BattleEndResponseData.Reward> list2 = new List <MultiBattleData.BattleEndResponseData.Reward>();
            if (colosseumEnd.firstRankUpReward != null)
            {
                for (int j = 0; j < colosseumEnd.firstRankUpReward.Length; j++)
                {
                    list2.Add(new MultiBattleData.BattleEndResponseData.Reward
                    {
                        assetCategoryId = colosseumEnd.firstRankUpReward[j].assetCategoryId,
                        assetNum        = colosseumEnd.firstRankUpReward[j].assetNum,
                        assetValue      = colosseumEnd.firstRankUpReward[j].assetValue
                    });
                }
            }
            responseData.reward            = list.ToArray();
            responseData.firstRankUpReward = list2.ToArray();
            responseData.score             = colosseumEnd.score;
            responseData.colosseumRankId   = colosseumEnd.colosseumRankId;
            responseData.isFirstRankUp     = colosseumEnd.isFirstRankUp;
            if (colosseumEnd.battleRecord != null)
            {
                responseData.battleRecord            = new MultiBattleData.BattleEndResponseData.ColosseumBattleRecord();
                responseData.battleRecord.count      = colosseumEnd.battleRecord.count;
                responseData.battleRecord.winPercent = colosseumEnd.battleRecord.winPercent;
            }
        }
        else
        {
            responseData.reward = new MultiBattleData.BattleEndResponseData.Reward[0];
        }
        ClassSingleton <MultiBattleData> .Instance.BattleEndResponse = responseData;
        yield break;
    }