Przeglądaj źródła

剧情对话不显示手持物

guodong 2 lat temu
rodzic
commit
cbcc3571d3

+ 13 - 3
GameClient/Assets/Game/HotUpdate/DressUp/DressUpObj.cs

@@ -3,6 +3,8 @@ using UnityEngine;
 using System;
 using System.Linq;
 using ET;
+using ProtoBuf.Meta;
+using static UnityEditor.Progress;
 
 namespace GFGGame
 {
@@ -403,17 +405,25 @@ namespace GFGGame
         }
 
         //穿戴一组换装数据
-        public void PutOnDressUpData(DressUpData targetDressUpData)
+        public void PutOnDressUpData(DressUpData targetDressUpData, int[] excludeType = null)
         {
             bool oldIsAction = IsAction;
             _dressUpData.suitId = targetDressUpData.suitId;
             _dressUpData.actionId = targetDressUpData.actionId;
             var targetItemList = new List<int>();
-            targetItemList.AddRange(targetDressUpData.itemList);
-            if (targetDressUpData.bgId > 0)
+            foreach(var itemId in targetDressUpData.itemList)
+            {
+                int subType = ItemUtilCS.GetItemSubType(itemId);
+                if (excludeType == null || Array.IndexOf(excludeType, subType) < 0)
+                {
+                    targetItemList.Add(itemId);
+                }
+            }
+            if (targetDressUpData.bgId > 0 && (excludeType == null || Array.IndexOf(excludeType, ConstDressUpItemType.BEI_JING) < 0))
             {
                 targetItemList.Add(targetDressUpData.bgId);
             }
+
             CompareAndAddItemList(oldIsAction, IsAction, targetItemList);
             checkDefaultItem();
 

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryDialogView.cs

@@ -414,7 +414,7 @@ namespace GFGGame
                     _dressUpObjUI.ResetSceneObj(80, true, false, null, false);
                     if (storyDialogCfg.suitId > 0)
                     {
-                        _dressUpObjUI.dressUpObj.PutOnSuitCfg(storyDialogCfg.suitId, false, new int[] { ConstDressUpItemType.BEI_JING }, false, false);
+                        _dressUpObjUI.dressUpObj.PutOnSuitCfg(storyDialogCfg.suitId, false, new int[] { ConstDressUpItemType.SHOU_CHI_WU }, false, false);
                     }
                     else
                     {
@@ -422,6 +422,7 @@ namespace GFGGame
                         if (_dressUpObjUI.dressUpObj.actionId > 0)
                         {
                             _dressUpObjUI.dressUpObj.CancelAction(true);
+                            _dressUpObjUI.dressUpObj.PutOnDressUpData(_dressUpObjUI.dressUpObj.DressUpDataClone(), new int[] { ConstDressUpItemType.SHOU_CHI_WU });
                         }
                     }
                     if (headAniCfg != null && headAniCfg.faceId > 0)