|
@@ -154,6 +154,11 @@ namespace GFGGame
|
|
|
}
|
|
|
|
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_selectedItemId);
|
|
|
+ if (itemCfg == null) {
|
|
|
+ ET.Log.Error("OnClickBtnProcuction itemCfg is null");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (!ItemUtil.CheckItemEnough(itemCfg.syntheticCostID, itemCfg.syntheticCostNum))
|
|
|
{
|
|
|
long has = ItemDataManager.GetItemNum(itemCfg.syntheticCostID);
|
|
@@ -165,7 +170,7 @@ namespace GFGGame
|
|
|
for (int i = 0; i < materiarsOfSelectedItem.Count; i++)
|
|
|
{
|
|
|
ItemData itemData = materiarsOfSelectedItem[i];
|
|
|
- if (!ItemUtil.CheckItemEnough(materiarsOfSelectedItem[i].id, materiarsOfSelectedItem[i].num, true)) return;
|
|
|
+ if (itemData == null || !ItemUtil.CheckItemEnough(itemData.id, itemData.num, true)) return;
|
|
|
}
|
|
|
bool result = await ClothingSyntheticSProxy.ClothtingSynthetic(_selectedItemId);
|
|
|
if (result)
|