private void RefreshCurrentCoin() { if (BaseMarketManager.mMarketClass == MarketClass.MarketManager) { ShangChengBiao shangChengBiao = DataReader <ShangChengBiao> .Get(MarketManager.Instance.CurrentShopID); if (shangChengBiao != null && shangChengBiao.moneyType > 0) { this.CurrentCoinVisibility = true; this.CurrentCoinIcon = MoneyType.GetIcon(shangChengBiao.moneyType); this.CurrentCoinNum = MoneyType.GetNum(shangChengBiao.moneyType).ToString(); } else { this.CurrentCoinVisibility = false; } } else if (BaseMarketManager.mMarketClass == MarketClass.GuildMarketManager) { GongHuiShangDian lVShop = GuildMarketManager.Instance.GetLVShop(); if (lVShop != null) { this.CurrentCoinVisibility = true; this.CurrentCoinIcon = MoneyType.GetIcon(lVShop.moneyType); this.CurrentCoinNum = MoneyType.GetNum(lVShop.moneyType).ToString(); } } }
public GongHuiShangDian GetLVShop() { if (this.mGuildMarketInformation == null) { Debug.Log("mGuildMarketInformation is null."); return(null); } List <GongHuiShangDian> dataList = DataReader <GongHuiShangDian> .DataList; for (int i = 0; i < dataList.get_Count(); i++) { GongHuiShangDian gongHuiShangDian = dataList.get_Item(i); if (gongHuiShangDian.lv == this.mGuildMarketInformation.shopInfo.shopLv) { return(gongHuiShangDian); } } return(null); }
public int GetRefreshPrices() { int useRefresh = this.mGuildMarketInformation.shopInfo.useRefresh; GongHuiShangDian lVShop = this.GetLVShop(); string[] array = GameDataUtils.SplitString4Dot0(lVShop.RefreshPrice).Split(new char[] { ';' }); if (array.Length <= 0) { return(0); } if (useRefresh < array.Length) { return(int.Parse(array[useRefresh])); } return(int.Parse(array[array.Length - 1])); }
public void RefreshInfo(int remainingRefreshTime, int remainTimes) { if (BaseMarketManager.mMarketClass == MarketClass.MarketManager) { ShangChengBiao shangChengBiao = DataReader <ShangChengBiao> .Get(MarketManager.Instance.CurrentShopID); if (shangChengBiao != null) { this.RefreshInfo(remainingRefreshTime, remainTimes, shangChengBiao.title, shangChengBiao.heading, shangChengBiao.initiativeRefresh, shangChengBiao.refreshCostType, MarketManager.Instance.GetRefreshPrices(MarketManager.Instance.CurrentShopID, shangChengBiao.refreshPrice)); } } else if (BaseMarketManager.mMarketClass == MarketClass.GuildMarketManager) { GongHuiShangDian lVShop = GuildMarketManager.Instance.GetLVShop(); if (lVShop != null) { this.RefreshInfo(remainingRefreshTime, remainTimes, lVShop.title, lVShop.heading, lVShop.initiativeRefresh, lVShop.refreshCostType, GuildMarketManager.Instance.GetRefreshPrices()); } } }
public override void OnRefresh() { GongHuiShangDian lVShop = this.GetLVShop(); if (lVShop != null && lVShop.initiativeRefresh == 1) { if (this.GetRemainRefreshTimes() <= 0) { UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(508034, false)); return; } int refreshPrices = this.GetRefreshPrices(); string name = MoneyType.GetName(lVShop.refreshCostType); string content = string.Format(GameDataUtils.GetChineseContent(508021, false), refreshPrices, name); DialogBoxUIViewModel.Instance.ShowAsOKCancel("刷新", content, delegate { }, delegate { this.SendCostRefreshGuildShop(); }, GameDataUtils.GetChineseContent(505113, false), GameDataUtils.GetChineseContent(505114, false), "button_orange_1", "button_yellow_1", null, true, true); } }