浏览代码

商城礼包、道具物品来源

zhaoyang 3 年之前
父节点
当前提交
129bcbcfe0

+ 2 - 2
FGUIProject/assets/Card/components/ComFosterBottom.xml

@@ -6,8 +6,8 @@
   <displayList>
     <image id="n70_lc71" name="n70" src="842s6e" fileName="images/kp_bj_2.png" xy="0,209"/>
     <component id="n67_lc71" name="btnStory" src="ojlzl" fileName="components/btnStory.xml" xy="791,621"/>
-    <loader id="n26_842s" name="loaRarity" xy="388,918" size="62,62" group="n30_842s" url="ui://eg2y0ldp842s6n" autoSize="true"/>
-    <text id="n27_842s" name="txtName" xy="597,902" pivot="0.5,0" anchor="true" size="244,79" group="n30_842s" fontSize="60" color="#fdfbf3" text="许墨萌牙"/>
+    <loader id="n26_842s" name="loaRarity" xy="388,918" size="62,62" group="n30_842s" visible="false" url="ui://eg2y0ldp842s6n" autoSize="true"/>
+    <text id="n27_842s" name="txtName" xy="540,902" pivot="0.5,0" anchor="true" size="244,79" group="n30_842s" fontSize="60" color="#fdfbf3" text="许墨萌牙"/>
     <image id="n28_842s" name="n28" src="842s6j" fileName="images/kp_xiantiao.png" xy="731,948" size="341,10" group="n30_842s"/>
     <image id="n29_842s" name="n29" src="842s6j" fileName="images/kp_xiantiao.png" xy="13,948" size="341,10" group="n30_842s" flip="hz"/>
     <group id="n30_842s" name="grpName" xy="13,902" size="1059,79"/>

+ 41 - 1
GameClient/Assets/Editor/Excel/Scanner/ItemApproachScanner.cs

@@ -19,7 +19,7 @@ namespace GFGEditor
         public static void startScan()
         {
             ItemCfg[] dataArray = ItemCfgArray.Instance.dataArray;
-            GetApproachCall[] actions = new GetApproachCall[] { GetClothingShopApproach, GetZhaiXingApproach, GetStoryLevelApproach, GetClothingSyntheticApproach, GetSuitGuideApproach, GetSuitSyntheticApproach, GetClothingDecomposeApproach };
+            GetApproachCall[] actions = new GetApproachCall[] { GetClothingShopApproach, GetZhaiXingApproach, GetStoryLevelApproach, GetClothingSyntheticApproach, GetSuitGuideApproach, GetSuitSyntheticApproach, GetClothingDecomposeApproach, CheckGiftBagApproach, CheckShopExchangeApproach };
             Dictionary<SuitCfg, List<int>> suitDic = new Dictionary<SuitCfg, List<int>>();
             int suitPartTotalCount = 0;
             foreach (ItemCfg cfg in dataArray)
@@ -388,6 +388,46 @@ namespace GFGEditor
             }
             return false;
         }
+        /// <summary>
+        /// 检测商城-礼包是否产出该物品
+        /// </summary>
+        /// <param name="itemId"></param>
+        /// <returns></returns>
+        private static string CheckGiftBagApproach(int itemId)
+        {
+            GiftBagCfgArray manager = GiftBagCfgArray.Instance;
+            GiftBagCfg[] dataArray = manager.dataArray;
+            for (int i = 0; i < dataArray.Length; i++)
+            {
+                for (int j = 0; j < dataArray[i].itemsArr.Length; j++)
+                {
+                    if (dataArray[i].itemsArr[j][0] == itemId)
+                    {
+                        return ConstFunctionId.SHOP_GIFT_BAG + "=1";
+                    }
+                }
+            }
+            return null;
+        }
+        /// <summary>
+        /// 检测商城-道具兑换是否产出该物品
+        /// </summary>
+        /// <param name="itemId"></param>
+        /// <returns></returns>
+        private static string CheckShopExchangeApproach(int itemId)
+        {
+            ShopExchangeCfgArray manager = ShopExchangeCfgArray.Instance;
+            ShopExchangeCfg[] dataArray = manager.dataArray;
+            for (int i = 0; i < dataArray.Length; i++)
+            {
+                if (dataArray[i].itemId == itemId)
+                {
+                    return ConstFunctionId.SHOP_EXCHANGE + "=2";
+                }
+            }
+            return null;
+        }
+
 
     }
 }

+ 8 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstFunctionId.cs

@@ -38,6 +38,14 @@ namespace GFGGame
         /// 自动战斗
         /// </summary>
         public const string FUNCTION_AUTOPLAY_FIGHT = "FUNCTION_AUTOPLAY_FIGHT";
+        /// <summary>
+        /// 商城-道具兑换
+        /// </summary>
+        public const string SHOP_EXCHANGE = "SHOP_EXCHANGE";
+        /// <summary>
+        /// 商城-礼包
+        /// </summary>
+        public const string SHOP_GIFT_BAG = "SHOP_GIFT_BAG";
 
     }
 }

+ 10 - 0
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachOfItemView.cs

@@ -125,6 +125,16 @@ namespace GFGGame
                     this.Hide();
                     ViewManager.Show<ClothingDecomposeView>(null, _fromeViewDatas);
                     break;
+                case ConstFunctionId.SHOP_GIFT_BAG:
+                    this.Hide();
+                    int giftBagValue = int.Parse(infos[1]);
+                    ViewManager.Show<RechargeStoreView>(giftBagValue, _fromeViewDatas);
+                    break;
+                case ConstFunctionId.SHOP_EXCHANGE:
+                    this.Hide();
+                    int exchangeValue = int.Parse(infos[1]);
+                    ViewManager.Show<RechargeStoreView>(exchangeValue, _fromeViewDatas);
+                    break;
                 case ConstFunctionId.JU_QING_GUAN_QIA:
                     string value = infos[1];
                     var levelCfgId = int.Parse(value);

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Views/RechargeStore/RechargeStoreView.cs

@@ -57,8 +57,9 @@ namespace GFGGame
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("scsc_bjbj");
 
             _valueBarController.OnShown();
-            _ui.m_c1.selectedIndex = 0;
-            _ui.m_comTab.m_c1.selectedIndex = 0;
+
+            _ui.m_c1.selectedIndex = this.viewData == null ? 0 : (int)this.viewData;
+            _ui.m_comTab.m_c1.selectedIndex = this.viewData == null ? 0 : (int)this.viewData;
             _ui.m_list.numItems = RechargeCfgArray.Instance.dataArray.Length;
             UpdateExchangeList();
             UpdateGiftBagList();

二进制
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes


二进制
GameClient/Assets/ResIn/UI/Card/Card_fui.bytes