public static CMD CreateDialog(MasterDataMng.AssetCategory category, string assetsValue, string title, int assetsNumber, int payValue, Action OnPushedYes, int gashaCount, object useDetail) { CMD result; if (category != MasterDataMng.AssetCategory.DIGI_STONE) { if (category != MasterDataMng.AssetCategory.LINK_POINT) { } CMD_ChangePOP cmd_ChangePOP = GUIMain.ShowCommonDialog(null, "CMD_ChangePOP", null) as CMD_ChangePOP; cmd_ChangePOP.Title = title; cmd_ChangePOP.OnPushedYesAction = OnPushedYes; cmd_ChangePOP.Info = FactoryPayConfirmNotice.GetInfoText(category, payValue, gashaCount); cmd_ChangePOP.SetPoint(assetsNumber, payValue); cmd_ChangePOP.SetUseDetail(useDetail); cmd_ChangePOP.SetAsset(category, assetsValue); result = cmd_ChangePOP; } else { CMD_ChangePOP_STONE cmd_ChangePOP_STONE = GUIMain.ShowCommonDialog(null, "CMD_ChangePOP_STONE", null) as CMD_ChangePOP_STONE; cmd_ChangePOP_STONE.Title = title; cmd_ChangePOP_STONE.OnPushedYesAction = OnPushedYes; cmd_ChangePOP_STONE.Info = FactoryPayConfirmNotice.GetInfoText(category, payValue, gashaCount); cmd_ChangePOP_STONE.SetDigistone(assetsNumber, payValue); cmd_ChangePOP_STONE.SetUseDetail(useDetail); result = cmd_ChangePOP_STONE; } return(result); }
private void ShowExtendChipDialog() { CMD_ChangePOP cmd_ChangePOP = CMD_ChangePOP.CreateExtendChipPOP(this.extraPatchCount, this.consumeItemCount, new Action(this.OnPushedExtendConfirmYesButton)); cmd_ChangePOP.SetSpriteIcon("extra_slot_01"); this.cmdChangePop = cmd_ChangePOP; }
public static CMD_ChangePOP CreateExtendChipPOP(int possessionNum, int consumePrice, Action onPushedYesAction) { CMD_ChangePOP cmd_ChangePOP = GUIMain.ShowCommonDialog(null, "CMD_ChangePOP", null) as CMD_ChangePOP; cmd_ChangePOP.Title = StringMaster.GetString("ChipInstalling-05"); cmd_ChangePOP.Info = string.Format(StringMaster.GetString("ChipInstalling-06"), consumePrice); cmd_ChangePOP.OnPushedYesAction = onPushedYesAction; cmd_ChangePOP.SetPoint(possessionNum, consumePrice); return(cmd_ChangePOP); }
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); } }
private void ShowEjectItemDialog() { this.cmdChangePop = CMD_ChangePOP.CreateEjectChipPOP(new Action(this.OnPushedEjectConfirmYesButton)); }
public bool PlayLimitCheck(GameWebAPI.RespDataWD_GetDungeonInfo.Dungeons dng, Action <int> actCallBackShort, Action <int> actCallBack, int usedCT = 0) { GameWebAPI.RespDataWD_GetDungeonInfo.PlayLimit playLimit = dng.playLimit; if (playLimit != null) { int num = int.Parse(playLimit.restCount); if (num <= 0) { if (playLimit.recoveryFlg == "1") { if (playLimit.recoveryAssetCategoryId == 2) { int useStoneNum = playLimit.recoveryAssetNum; int hasStoneNum = DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.point; CMD_ChangePOP_STONE cd = GUIMain.ShowCommonDialog(null, "CMD_ChangePOP_STONE", null) as CMD_ChangePOP_STONE; cd.Title = StringMaster.GetString("QuestPlayLimitNoneTitle"); cd.OnPushedYesAction = delegate() { if (hasStoneNum < useStoneNum) { cd.SetCloseAction(delegate(int idx) { actCallBackShort(idx); }); cd.ClosePanel(true); } else { cd.SetCloseAction(delegate(int idx) { actCallBack(idx); }); cd.ClosePanel(true); } }; cd.Info = string.Format(StringMaster.GetString("QuestPlayLimitNoneInfo"), useStoneNum, num, int.Parse(playLimit.recoveryCount)); cd.SetDigistone(hasStoneNum, useStoneNum); } else if (playLimit.recoveryAssetCategoryId == 6) { GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(playLimit.recoveryAssetValue.ToString()); int useItemNum = playLimit.recoveryAssetNum; int hasItemNum = Singleton <UserDataMng> .Instance.GetUserItemNumByItemId(playLimit.recoveryAssetValue); CMD_ChangePOP cd = GUIMain.ShowCommonDialog(null, "CMD_ChangePOP", null) as CMD_ChangePOP; cd.Title = StringMaster.GetString("QuestPlayLimitNoneTitle"); cd.OnPushedYesAction = delegate() { if (hasItemNum < useItemNum) { cd.SetCloseAction(delegate(int idx) { actCallBackShort(idx); }); cd.ClosePanel(true); } else { cd.SetCloseAction(delegate(int idx) { actCallBack(idx); }); cd.ClosePanel(true); } }; cd.Info = string.Format(StringMaster.GetString("QuestPlayLimitNoneInfoItem"), new object[] { itemM.name, useItemNum, itemM.unitName, num, int.Parse(playLimit.recoveryCount) }); cd.SetPoint(hasItemNum, useItemNum); if (itemM.img != null && itemM.img.Length > 0) { cd.SetTextureIcon(itemM.img[0]); } } else { Debug.LogError("===================================回数制限DNG: サポートされてないAsssetCategoryID"); } } else { CMD_ModalMessage cmd_ModalMessage = GUIMain.ShowCommonDialog(null, "CMD_ModalMessage", null) as CMD_ModalMessage; cmd_ModalMessage.Title = StringMaster.GetString("QuestPlayLimitTitle"); cmd_ModalMessage.Info = StringMaster.GetString("QuestPlayLimitZeroInfo"); } return(false); } if (usedCT > 0) { this.SetPlayLimitNumCont(dng, usedCT); } } return(true); }
private void OnPushedButton(ExchangeItem exchangeItem) { int num = 0; foreach (string a in this.itemDictionary.Keys) { string assetCategoryId = exchangeItem.exchangeItemData.assetCategoryId; string assetValue = exchangeItem.exchangeItemData.assetValue; string text = assetCategoryId + assetValue; if (this.itemDictionary.ContainsKey(text) && a == text && this.itemDictionary[text] == assetValue) { break; } num++; } string text2 = this.exchangeConsumeItemName[num]; this.consumeNum = (int.Parse(exchangeItem.exchangeConsumeNum) * exchangeItem.numCounter).ToString(); string text3 = (this.exchangeConsumeItemInfo == null) ? string.Empty : this.exchangeConsumeItemInfo.unitName; MasterDataMng.AssetCategory assetCategory = (MasterDataMng.AssetCategory) int.Parse(exchangeItem.exchangeItemData.assetCategoryId); CMD_ClearingHouse.IconType iconType = CMD_ClearingHouse.IconType.NON; switch (assetCategory) { case MasterDataMng.AssetCategory.MONSTER: text3 = StringMaster.GetString("ConsumeUnitMonster"); iconType = CMD_ClearingHouse.IconType.NON; break; case MasterDataMng.AssetCategory.DIGI_STONE: iconType = CMD_ClearingHouse.IconType.SPRITE; break; case MasterDataMng.AssetCategory.LINK_POINT: text3 = string.Empty; iconType = CMD_ClearingHouse.IconType.SPRITE; break; case MasterDataMng.AssetCategory.TIP: text3 = string.Empty; iconType = CMD_ClearingHouse.IconType.SPRITE; break; case MasterDataMng.AssetCategory.ITEM: iconType = CMD_ClearingHouse.IconType.TEXTURE; break; case MasterDataMng.AssetCategory.GATHA_TICKET: text3 = StringMaster.GetString("ConsumeUnitTicket"); iconType = CMD_ClearingHouse.IconType.NON; break; case MasterDataMng.AssetCategory.MEAT: iconType = CMD_ClearingHouse.IconType.SPRITE; break; case MasterDataMng.AssetCategory.SOUL: text3 = StringMaster.GetString("ConsumeUnitPlugin"); iconType = CMD_ClearingHouse.IconType.TEXTURE; break; case MasterDataMng.AssetCategory.DUNGEON_TICKET: text3 = StringMaster.GetString("ConsumeUnitTicket"); iconType = CMD_ClearingHouse.IconType.TEXTURE; break; } string exchangeDetailName = exchangeItem.exchangeDetailName; string info = string.Format(StringMaster.GetString("ExchangeConfirmInfo"), new object[] { text2, this.consumeNum, text3, exchangeDetailName }); CMD_ChangePOP cd = GUIMain.ShowCommonDialog(null, "CMD_ChangePOP", null) as CMD_ChangePOP; cd.Title = StringMaster.GetString("ExchangeConfirmTitle"); cd.Info = info; cd.SetPoint(exchangeItem.exchangeItemData.count, int.Parse(this.consumeNum)); if (iconType == CMD_ClearingHouse.IconType.SPRITE) { cd.SetSpriteIcon(this.exchangeItemPathList[num]); } else if (iconType == CMD_ClearingHouse.IconType.TEXTURE) { cd.SetTextureIcon(this.exchangeItemPathList[num]); } cd.OnPushedYesAction = delegate() { cd.ClosePanel(true); this.AccessExchangeLogic(exchangeItem); }; }