Răsfoiți Sursa

支持单个商品挂在双月卡下购买

hexiaojie 1 zi în urmă
părinte
comite
2010840019

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/Store/StoreMonthView.cs

@@ -4,6 +4,7 @@ using FairyGUI;
 using System.Collections.Generic;
 using ET;
 using System;
+using System.Linq;
 
 namespace GFGGame
 {
@@ -99,6 +100,16 @@ namespace GFGGame
             _shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_MONTH_CARD, menu2);
             _shopCfgs = ShopDataManager.Instance.RemoveNotOpenCfg(_shopCfgs);
             _shopCfgs = ShopDataManager.Instance.SortShopGoodsCfgs(_shopCfgs);
+            
+            var addList = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_MONTH_CARD, 2);
+            //增加月卡商城子类型2的商品拼接, 用意是支持单个商品在红包卡, 福气卡里面销售
+            foreach (var shopCfgItem in addList)
+            {
+                if (_shopCfgs.All(a => a.id != shopCfgItem.id))
+                {
+                    _shopCfgs.Add(shopCfgItem);
+                }
+            }
             _ui.m_storeMonthList.m_list.numItems = _shopCfgs.Count;
 
             MonthlyCardPrivilegeCfg privilegeCfg = MonthlyCardPrivilegeCfgArray.Instance.GetCfg(MonthCardPrivilegeType.Privilege1);