// Token: 0x0600513A RID: 20794 RVA: 0x00182FC0 File Offset: 0x001811C0 public static ProRandomStoreItem StoreItemToPBStoreItem(RandomStoreItem storeItem) { return(new ProRandomStoreItem { Id = storeItem.Id, Bought = storeItem.Bought }); }
// Token: 0x06004762 RID: 18274 RVA: 0x00160138 File Offset: 0x0015E338 protected bool IsBoughtStoreItem(RandomStoreItem storeItem) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_IsBoughtStoreItemRandomStoreItem_hotfix != null) { return(Convert.ToBoolean(this.m_IsBoughtStoreItemRandomStoreItem_hotfix.call(new object[] { this, storeItem }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; return(storeItem.Bought); }
// Token: 0x06005133 RID: 20787 RVA: 0x00182E94 File Offset: 0x00181094 public static RandomStore PBStoreToStore(ProRandomStore pbStore) { RandomStore randomStore = new RandomStore { Id = pbStore.StoreId, NextFlushTime = new DateTime(pbStore.NextFlushTime), ManualFlushNums = pbStore.ManualFlushNums }; foreach (ProRandomStoreItem pbStoreItem in pbStore.Items) { randomStore.Items.Add(RandomStoreItem.PBStoreItemToStoreItem(pbStoreItem)); } return(randomStore); }
// Token: 0x06005131 RID: 20785 RVA: 0x00182D94 File Offset: 0x00180F94 public static ProRandomStore StoreToPBStore(RandomStore store) { ProRandomStore proRandomStore = new ProRandomStore { StoreId = store.Id, NextFlushTime = store.NextFlushTime.Ticks, ManualFlushNums = store.ManualFlushNums }; foreach (RandomStoreItem storeItem in store.Items) { proRandomStore.Items.Add(RandomStoreItem.StoreItemToPBStoreItem(storeItem)); } return(proRandomStore); }
// Token: 0x06004779 RID: 18297 RVA: 0x00160A14 File Offset: 0x0015EC14 public bool IsBoughtStoreItem(RandomStoreItem storeItem) { return(this.m_owner.IsBoughtStoreItem(storeItem)); }
// Token: 0x06004764 RID: 18276 RVA: 0x00160280 File Offset: 0x0015E480 public virtual int CanBuyRandomStoreItem(int storeId, int index, int selectedIndex) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanBuyRandomStoreItemInt32Int32Int32_hotfix != null) { return(Convert.ToInt32(this.m_CanBuyRandomStoreItemInt32Int32Int32_hotfix.call(new object[] { this, storeId, index, selectedIndex }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; RandomStore randomStore = this.m_randomStoreDS.FindStore(storeId); if (randomStore == null) { return(-1100); } if (index < 0 || index >= randomStore.Items.Count) { return(-1101); } RandomStoreItem storeItem = this.m_randomStoreDS.GetStoreItem(randomStore, index); if (this.IsBoughtStoreItem(storeItem)) { return(-1102); } ConfigDataRandomStoreItemInfo configDataRandomStoreItemInfo = this.m_configDataLoader.GetConfigDataRandomStoreItemInfo(storeItem.Id); int num = this.m_basicInfo.IsCurrencyEnough(configDataRandomStoreItemInfo.CurrencyType, configDataRandomStoreItemInfo.Price); if (num != 0) { return(num); } if (configDataRandomStoreItemInfo.ItemType == GoodsType.GoodsType_Item) { ConfigDataItemInfo configDataItemInfo = this.m_configDataLoader.GetConfigDataItemInfo(configDataRandomStoreItemInfo.ItemID); if (configDataItemInfo.FuncType == ItemFuncType.ItemFuncType_SelfSelectedBox) { ConfigDataSelfSelectedBoxInfo configDataSelfSelectedBoxInfo = this.m_configDataLoader.GetConfigDataSelfSelectedBoxInfo(configDataItemInfo.FuncTypeParam1); if (configDataSelfSelectedBoxInfo.Reward.Count <= selectedIndex || selectedIndex < 0) { return(-539); } } else if (selectedIndex != -1) { return(-540); } } else if (selectedIndex != -1) { return(-540); } if (this.m_bag.IsBagFullByCurrentSize()) { return(-500); } return(0); }
// Token: 0x06004CC0 RID: 19648 RVA: 0x00179338 File Offset: 0x00177538 public void BuyStoreItem(RandomStoreItem storeItem) { storeItem.Bought = true; base.SetDirty(true); }