87 lines
2.1 KiB
C#
87 lines
2.1 KiB
C#
using System;
|
|
using Fantasy;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Concurrent;
|
|
using NBC;
|
|
using Fantasy.Serialize;
|
|
using LightProto;
|
|
|
|
namespace NBF
|
|
{
|
|
[ProtoContract]
|
|
public sealed partial class LureConfig : ASerialize, IConfigTable
|
|
{
|
|
|
|
[ProtoMember(1)]
|
|
public uint Id { get; set; } // Id
|
|
[ProtoMember(2)]
|
|
public uint[] Hook { get; set; } = Array.Empty<uint>(); // 勾
|
|
[ProtoMember(3)]
|
|
public uint HookNum { get; set; } // 装配鱼钩数量
|
|
[ProtoMember(4)]
|
|
public uint EfficacyBase { get; set; } // 吸引力
|
|
[ProtoIgnore]
|
|
public uint Key => Id;
|
|
|
|
#region Static
|
|
|
|
private static ConfigContext<LureConfig> Context => ConfigTableHelper.Table<LureConfig>();
|
|
|
|
public static LureConfig Get(uint key)
|
|
{
|
|
return Context.Get(key);
|
|
}
|
|
|
|
public static LureConfig Get(Predicate<LureConfig> match)
|
|
{
|
|
return Context.Get(match);
|
|
}
|
|
|
|
public static LureConfig Fist()
|
|
{
|
|
return Context.Fist();
|
|
}
|
|
|
|
public static LureConfig Last()
|
|
{
|
|
return Context.Last();
|
|
}
|
|
|
|
public static LureConfig Fist(Predicate<LureConfig> match)
|
|
{
|
|
return Context.Fist(match);
|
|
}
|
|
|
|
public static LureConfig Last(Predicate<LureConfig> match)
|
|
{
|
|
return Context.Last(match);
|
|
}
|
|
|
|
public static int Count()
|
|
{
|
|
return Context.Count();
|
|
}
|
|
|
|
public static int Count(Func<LureConfig, bool> predicate)
|
|
{
|
|
return Context.Count(predicate);
|
|
}
|
|
|
|
public static List<LureConfig> GetList()
|
|
{
|
|
return Context.GetList();
|
|
}
|
|
|
|
public static List<LureConfig> GetList(Predicate<LureConfig> match)
|
|
{
|
|
return Context.GetList(match);
|
|
}
|
|
public static void ParseJson(Newtonsoft.Json.Linq.JArray arr)
|
|
{
|
|
ConfigTableHelper.ParseLine<LureConfig>(arr);
|
|
}
|
|
#endregion
|
|
}
|
|
} |