guodong 2 жил өмнө
parent
commit
2888ad90f6

+ 5 - 0
GameClient/Assets/Game/HotUpdate/Views/ClothingSynthetic/ClothingSyntheticView.cs

@@ -309,6 +309,11 @@ namespace GFGGame
             ItemCfg clothingSyntheticCfg = ItemCfgArray.Instance.GetCfg(_selectedItemId);
             // string costName = ItemUtil.GetItemName(clothingSyntheticCfg.syntheticCostID);
             // _ui.m_txtCost.SetVar("v1", "" + clothingSyntheticCfg.syntheticCostNum).SetVar("v2", costName).FlushVars();
+            if(clothingSyntheticCfg.syntheticCostID <= 0)
+            {
+                Log.Error($"请为物品 {clothingSyntheticCfg.id} 增加合成相关配置!");
+                return;
+            }
             ItemUtil.SetItemNeedNum(_ui.m_comCostCurrency, clothingSyntheticCfg.syntheticCostID, clothingSyntheticCfg.syntheticCostNum);
             _materiarsOfSelectedItem = ItemUtil.CreateItemDataList(clothingSyntheticCfg.syntheticMateriarsArr);
             _ui.m_listMaterias.numItems = _materiarsOfSelectedItem.Count;