private void OpenConfirmForceOpen() { GameWebAPI.ResponseWorldStageForceOpenMaster.ForceOpen questForceOpen = QuestData.GetQuestForceOpen(int.Parse(this.worldStageData.worldStageM.worldStageId)); if (questForceOpen != null) { IPayConfirmNotice payConfirmNotice = FactoryPayConfirmNotice.CreateDialog(questForceOpen.assetCategoryId); payConfirmNotice.SetAssets(questForceOpen.assetCategoryId, questForceOpen.assetValue, questForceOpen.assetNum); string assetName = UIAssetName.GetAssetName(questForceOpen.assetCategoryId.ToString(), questForceOpen.assetValue.ToString()); string info = string.Format(StringMaster.GetString("QuestForceOpenConfirmInfo"), assetName, questForceOpen.forceOpenMinute); payConfirmNotice.SetMessage(StringMaster.GetString("QuestUnlockTitle"), info); payConfirmNotice.SetPushActionYesButton(new Action <UnityEngine.Object>(this.OnConfirmPushYesButton)); } }
public static void SetAssets(this IPayConfirmNotice dialog, int category, int assetsValue, int cost) { dialog.SetAssetIcon(category, assetsValue.ToString()); switch (category) { case 2: case 3: case 4: break; default: switch (category) { case 13: break; case 14: case 17: goto IL_5F; case 15: case 16: return; default: return; } break; case 6: goto IL_5F; } dialog.SetAssetValue(category, cost); return; IL_5F: CMD_ChangePOP cmd_ChangePOP = dialog as CMD_ChangePOP; if (null != cmd_ChangePOP) { cmd_ChangePOP.SetAssetValue(category, assetsValue, cost); } }
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); } }