|
@@ -4,6 +4,7 @@ using System;
|
|
|
using System.Linq;
|
|
|
using ET;
|
|
|
using FairyGUI;
|
|
|
+using ProtoBuf.Meta;
|
|
|
|
|
|
namespace GFGGame
|
|
|
{
|
|
@@ -281,8 +282,12 @@ namespace GFGGame
|
|
|
checkDefaultItem();
|
|
|
}
|
|
|
|
|
|
- //取消动作
|
|
|
- public void CancelAction(bool changeToStand = false)
|
|
|
+ /// <summary>
|
|
|
+ /// 取消动作,默认直接脱下
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="changeToStand">转换成站立动作</param>
|
|
|
+ /// <param name="excludeType">转换成站立动作时排除一些类型不穿</param>
|
|
|
+ public void CancelAction(bool changeToStand = false, int[] excludeType = null)
|
|
|
{
|
|
|
if (_dressUpData.actionId <= 0)
|
|
|
{
|
|
@@ -318,8 +323,12 @@ namespace GFGGame
|
|
|
{
|
|
|
bool notInAction = SuitCfgArray.Instance.CheckItemNotInAction(itemId);
|
|
|
if (!notInAction)
|
|
|
- {
|
|
|
- AddOrRemove(itemId, false, DressUpOption.Add);
|
|
|
+{
|
|
|
+ int subType = ItemDataManager.GetItemSubType(itemId);
|
|
|
+ if (excludeType == null || Array.IndexOf(excludeType, subType) < 0)
|
|
|
+ {
|
|
|
+ AddOrRemove(itemId, false, DressUpOption.Add);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|