public override IEnumerator Exec(GameWebAPI.GA_Req_ExecGacha playGashaRequestParam, bool isTutorial) { GameWebAPI.RespDataGA_ExecTicket gashaResult = null; GameWebAPI.RequestGA_TicketExec request = new GameWebAPI.RequestGA_TicketExec { SetSendData = delegate(GameWebAPI.GA_Req_ExecTicket param) { param.gachaId = playGashaRequestParam.gachaId; param.playCount = playGashaRequestParam.playCount; }, OnReceived = delegate(GameWebAPI.RespDataGA_ExecTicket response) { gashaResult = response; UserHomeInfo.dirtyMyPage = true; this.UpdateUserAssetsInventory(playGashaRequestParam.playCount); this.UpdateGashaInfo(playGashaRequestParam.playCount); } }; yield return(AppCoroutine.Start(request.RunOneTime(delegate() { this.SetGashaResultWindow(gashaResult); this.SetGashaCutScene(gashaResult, playGashaRequestParam.playCount); }, delegate(Exception noop) { RestrictionInput.EndLoad(); GUIManager.CloseAllCommonDialog(null); }, null), false)); yield break; }
public override IEnumerator Exec(GameWebAPI.GA_Req_ExecGacha playGashaRequestParam, bool isTutorial) { GameWebAPI.RespDataGA_ExecChip gashaResult = null; GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] userChipList = null; GameWebAPI.RequestGA_ChipExec request = new GameWebAPI.RequestGA_ChipExec { SetSendData = delegate(GameWebAPI.GA_Req_ExecChip param) { param.gachaId = playGashaRequestParam.gachaId; param.playCount = playGashaRequestParam.playCount; }, OnReceived = delegate(GameWebAPI.RespDataGA_ExecChip response) { gashaResult = response; userChipList = this.SetGashaResult(gashaResult, playGashaRequestParam.playCount); } }; yield return(AppCoroutine.Start(request.Run(delegate() { this.SetGashaResultWindow(gashaResult, userChipList); this.SetGashaCutScene(gashaResult, playGashaRequestParam.playCount); }, delegate(Exception noop) { RestrictionInput.EndLoad(); GUIManager.CloseAllCommonDialog(null); }, null), false)); yield break; }
public override IEnumerator Exec(GameWebAPI.GA_Req_ExecGacha playGashaRequestParam, bool isTutorial) { GameWebAPI.RespDataGA_ExecGacha gashaResult = null; int[] userMonsterIdList = null; GameWebAPI.RequestGA_GashaExec playGashaRequest = new GameWebAPI.RequestGA_GashaExec { SetSendData = delegate(GameWebAPI.GA_Req_ExecGacha param) { param.gachaId = playGashaRequestParam.gachaId; param.playCount = playGashaRequestParam.playCount; param.itemCount = playGashaRequestParam.itemCount; }, OnReceived = delegate(GameWebAPI.RespDataGA_ExecGacha response) { gashaResult = response; userMonsterIdList = new int[gashaResult.userMonsterList.Length]; for (int i = 0; i < gashaResult.userMonsterList.Length; i++) { int num = 0; if (int.TryParse(gashaResult.userMonsterList[i].userMonsterId, out num)) { userMonsterIdList[i] = num; } } this.SetGashaResult(gashaResult, playGashaRequestParam.playCount); } }; GameWebAPI.MonsterSlotInfoListLogic monsterSlotRequest = new GameWebAPI.MonsterSlotInfoListLogic { SetSendData = delegate(GameWebAPI.ReqDataCS_MonsterSlotInfoListLogic param) { param.userMonsterId = userMonsterIdList; }, OnReceived = delegate(GameWebAPI.RespDataCS_MonsterSlotInfoListLogic response) { ChipDataMng.GetUserChipSlotData().UpdateMonsterSlotList(response.slotInfo); ClassSingleton <MonsterUserDataMng> .Instance.RefreshMonsterSlot(userMonsterIdList); } }; RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON); APIRequestTask task = new APIRequestTask(playGashaRequest, true); task.Add(new APIRequestTask(monsterSlotRequest, true)); yield return(AppCoroutine.Start(task.Run(delegate { this.SetGashaResultWindow(gashaResult, userMonsterIdList, isTutorial); this.SetGashaCutScene(gashaResult, isTutorial); }, delegate(Exception noop) { RestrictionInput.EndLoad(); GUIManager.CloseAllCommonDialog(null); }, null), false)); yield break; }
public override IEnumerator Exec(GameWebAPI.GA_Req_ExecGacha playGashaRequestParam, bool isTutorial) { GameWebAPI.RespDataGA_ExecGacha gashaResult = this.GetFakeGashaResult(); int[] userMonsterIdList = new int[gashaResult.userMonsterList.Length]; for (int i = 0; i < gashaResult.userMonsterList.Length; i++) { int num = 0; if (int.TryParse(gashaResult.userMonsterList[i].userMonsterId, out num)) { userMonsterIdList[i] = num; } } base.UpdateUserAssetsInventory(playGashaRequestParam.playCount); base.SetGashaResultWindow(gashaResult, userMonsterIdList, isTutorial); base.SetGashaCutScene(gashaResult, isTutorial); yield return(null); yield break; }
public void OnPushedConfirmYesButton() { if (null != this.cofirmDialog) { IPayConfirmNotice payConfirmNotice = this.cofirmDialog as IPayConfirmNotice; if (payConfirmNotice != null) { GameWebAPI.GA_Req_ExecGacha ga_Req_ExecGacha = payConfirmNotice.GetUseDetail() as GameWebAPI.GA_Req_ExecGacha; if (ga_Req_ExecGacha != null) { ExecGashaBase execGashaBase = FactoryExecGasha.CreateExecGasha(this.gashaInfo, this.isTutorial); if (execGashaBase != null) { AppCoroutine.Start(execGashaBase.Exec(ga_Req_ExecGacha, this.isTutorial), false); } } } this.cofirmDialog.ClosePanel(true); } }
private void CheckPayAssetsNumber(int price, int playCount) { MasterDataMng.AssetCategory prizeAssetsCategory = this.gashaInfo.GetPrizeAssetsCategory(); if (UserInventory.CheckOverNumber(prizeAssetsCategory, 0)) { FactoryLimitOverNotice.CreateDialog(prizeAssetsCategory, LimitOverNoticeType.GASHA); } else { MasterDataMng.AssetCategory costAssetsCategory = this.gashaInfo.priceType.GetCostAssetsCategory(); string costAssetsValue = this.gashaInfo.priceType.GetCostAssetsValue(); int num = UserInventory.GetNumber(costAssetsCategory, costAssetsValue); if (this.isTutorial && num < price) { num = price; } if (num < price) { if (costAssetsCategory == MasterDataMng.AssetCategory.DIGI_STONE) { CMD_Confirm cmd_Confirm = GUIMain.ShowCommonDialog(new Action <int>(this.OnClosedShopOpenConfirm), "CMD_Confirm", null) as CMD_Confirm; cmd_Confirm.Title = this.gashaInfo.gachaName; cmd_Confirm.Info = StringMaster.GetString("GashaShortage"); cmd_Confirm.BtnTextYes = StringMaster.GetString("SystemButtonGoShop"); cmd_Confirm.BtnTextNo = StringMaster.GetString("SystemButtonClose"); } } else { GameWebAPI.GA_Req_ExecGacha useDetail = new GameWebAPI.GA_Req_ExecGacha { gachaId = int.Parse(this.gashaInfo.gachaId), playCount = playCount, itemCount = num }; this.cofirmDialog = FactoryPayConfirmNotice.CreateDialog(costAssetsCategory, costAssetsValue, this.gashaInfo.gachaName, num, price, new Action(this.OnPushedConfirmYesButton), playCount, useDetail); } } }
public abstract IEnumerator Exec(GameWebAPI.GA_Req_ExecGacha playGashaRequestParam, bool isTutorial);