Browse Source

换装报错

guodong 1 năm trước cách đây
mục cha
commit
b2936c8ba1

+ 1 - 1
GameClient/Assets/Game/HotUpdate/DressUp/DressUpLayerOperation.cs

@@ -78,7 +78,7 @@ namespace GFGGame
             if(this.actionType == EAction.Layer)
             {
                 DressUpRemoveOperation removeOperation = t as DressUpRemoveOperation;
-                if(removeOperation != null)
+                if(removeOperation != null && this.itemCfg != null)
                 {
                     if(removeOperation.itemID == this.itemCfg.id)
                     {

+ 2 - 1
GameClient/Assets/Game/HotUpdate/DressUp/DressUpRemoveOperation.cs

@@ -42,7 +42,8 @@ namespace GFGGame
             DressUpLayerOperation layerOperation = t as DressUpLayerOperation;
             if (layerOperation != null && layerOperation.actionType == DressUpLayerOperation.EAction.Layer)
 {
-                return (this.itemID == layerOperation.itemCfg.id
+                return (layerOperation.itemCfg != null 
+                    && this.itemID == layerOperation.itemCfg.id
                     && this.parentObj == layerOperation.parentObj);
             }
             var removeOperation = t as DressUpRemoveOperation;