guodong hace 2 años
padre
commit
c5561542b6
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. 8 1
      GameClient/Assets/Game/HotUpdate/DressUp/MyDressUpHelper.cs

+ 8 - 1
GameClient/Assets/Game/HotUpdate/DressUp/MyDressUpHelper.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using ET;
 
 namespace GFGGame
 {
@@ -48,7 +49,13 @@ namespace GFGGame
 
             for (int i = 0; i < equipDatas.Count; i++)
             {
-                ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(equipDatas[i]);
+                var itemId = equipDatas[i];
+                ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
+                if(itemCfg == null)
+                {
+                    Log.Warning($"id为 {itemId} 的物品没有配置,请查找原因!");
+                    continue;
+                }
                 if (itemCfg.subType == ConstDressUpItemType.LIAN_YI_QUN && itemCfg.id != ConstItemID.DEFULT_LIAN_YI_QUN)
                 {
                     isLianYiQun = true; break;