| Main/System/HeroSkinFlashSale/HeroSkinFlashSaleManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/ItemTip/ItemTipWayWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Store/StoreModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Main/System/HeroSkinFlashSale/HeroSkinFlashSaleManager.cs
@@ -216,6 +216,24 @@ return ctgID; } public bool TryGetCurrentActSkinIDByItemID(int itemID, out int skinID) { skinID = 0; if (!HeroSkinAttrConfig.TryGetSkinIDByItemID(itemID, out skinID)) { return false; } var act = GetActInfo(); if (act == null) { return false; } var skinIDList = GetSkinIDList(act.CfgID); return skinIDList != null && skinIDList.Contains(skinID); } Dictionary<int, int> GetSkinIDToCtgIDDict() { if (!ctgDict.IsNullOrEmpty()) Main/System/ItemTip/ItemTipWayWin.cs
@@ -130,6 +130,35 @@ UIManager.Instance.OpenWindow<TimingGiftWin>(int.Parse(way.CustomValue)); } break; case 4: if (!HeroSkinFlashSaleManager.Instance.TryGetCurrentActSkinIDByItemID(itemID, out var skinID)) { SysNotifyMgr.Instance.ShowTip("ActivityNoOpen"); return; } HeroSkinFlashSaleManager.Instance.currentChooseSkinID = skinID; UIJumpManager.Instance.OpenWindow(way.WinJumpID); break; case 5: if (!StoreModel.Instance.TryGetTimeValidSkinShopIDByItemID(itemID, out var skinShopID)) { SysNotifyMgr.Instance.ShowTip("ActivityNoOpen"); return; } StoreModel.Instance.jumpShopID = skinShopID; StoreModel.Instance.selectStoreFuncType = StoreFunc.HeroSkin; if (UIManager.Instance.IsOpened<StoreBaseWin>()) { UIManager.Instance.CloseWindow<StoreBaseWin>(); UIManager.Instance.OpenWindow<StoreBaseWin>(1); } else { UIManager.Instance.OpenWindow<StoreBaseWin>(1); } break; case 0: default: if (WindowSearchConfig.HasKey(way.WinJumpID)) Main/System/Store/StoreModel.cs
@@ -184,11 +184,11 @@ /// <summary> /// 获取在上下架时间范围内的商品列表 /// </summary> public List<StoreData> GetTimeValidStoreDatas(StoreFunc type) { List<StoreData> allDatas = TryGetStoreDatas(type); if (allDatas == null) return null; public List<StoreData> GetTimeValidStoreDatas(StoreFunc type) { List<StoreData> allDatas = TryGetStoreDatas(type); if (allDatas == null) return null; int curOpenDay = TimeUtility.OpenDay + 1; List<StoreData> validDatas = new List<StoreData>(); @@ -208,14 +208,64 @@ if (curOpenDay >= cfg.EndTime) continue; validDatas.Add(allDatas[i]); } return validDatas; } public StoreData GetStoreData(int shopId) { StoreConfig storeConfig = StoreConfig.Get(shopId); } return validDatas; } public bool TryGetTimeValidSkinShopIDByItemID(int itemID, out int shopID) { shopID = 0; var validDatas = GetTimeValidStoreDatas(StoreFunc.HeroSkin); if (validDatas == null) { return false; } for (int i = 0; i < validDatas.Count; i++) { var storeConfig = validDatas[i].storeConfig; if (storeConfig == null) { continue; } if (HasStoreItem(storeConfig, itemID)) { shopID = validDatas[i].shopId; return true; } } return false; } bool HasStoreItem(StoreConfig storeConfig, int itemID) { if (storeConfig.ItemID == itemID) { return true; } if (storeConfig.ItemListEx == null) { return false; } for (int i = 0; i < storeConfig.ItemListEx.Length; i++) { if (storeConfig.ItemListEx[i] != null && storeConfig.ItemListEx[i].Length > 0 && storeConfig.ItemListEx[i][0] == itemID) { return true; } } return false; } public StoreData GetStoreData(int shopId) { StoreConfig storeConfig = StoreConfig.Get(shopId); if (storeConfig == null) return null; List<StoreData> storeDatas = null;