|
@@ -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();
|
|
|
|