using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using cfg.GfgCfg;
using ET;
namespace GFGGame
{
public class ItemUtilCS
{
///
/// 物品的大类型,对应ConstItemType
///
///
///
public static int GetItemType(int itemId)
{
ItemCfg itemCfg = CommonDataManager.Tables.TblItemCfg.GetOrDefault(itemId);
if (itemCfg != null)
{
return itemCfg.ItemType;
}
return 0;
}
///
/// 物品子类型
///
///
///
public static int GetItemSubType(int itemId)
{
ItemCfg itemCfg = CommonDataManager.Tables.TblItemCfg.GetOrDefault(itemId);
int subType = 0;
if (itemCfg != null)
{
subType = itemCfg.SubType;
}
return subType;
}
public static Boolean IsDressUpItem(int itemId)
{
int itemType = GetItemType(itemId);
return itemType == ConstItemType.DRESS_UP;
}
}
}