修改配件item
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using NBF;
|
||||
using NBF.Utils;
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
@@ -10,5 +11,9 @@ namespace NBC
|
||||
{
|
||||
get { return _config ??= ItemConfig.Get(ConfigId); }
|
||||
}
|
||||
|
||||
public ItemType ItemType => ConfigId.GetItemType();
|
||||
|
||||
public uint ItemSubType => ConfigId.GetItemSubType();
|
||||
}
|
||||
}
|
||||
@@ -24,4 +24,12 @@
|
||||
Item = 2,
|
||||
Fish = 3,
|
||||
}
|
||||
|
||||
public enum RodType
|
||||
{
|
||||
None,
|
||||
Tele = 1,
|
||||
Spine = 2,
|
||||
Bolo = 3,
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,16 @@ namespace NBF.Utils
|
||||
return (ItemType)(id / 10000);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取物品子类型
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public static uint GetItemSubType(this uint id)
|
||||
{
|
||||
return (id / 1000) % 10;
|
||||
}
|
||||
|
||||
public static string GetName(this uint id)
|
||||
{
|
||||
return Lan.Get($"Name_{id}");
|
||||
|
||||
Reference in New Issue
Block a user