@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class BaitConfig : ASerialize, IConfigTable
|
||||
public sealed partial class BaitConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class BasicConfig : ASerialize, IConfigTable
|
||||
public sealed partial class BasicConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class BobberConfig : ASerialize, IConfigTable
|
||||
public sealed partial class BobberConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class FeederConfig : ASerialize, IConfigTable
|
||||
public sealed partial class FeederConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class FishConfig : ASerialize, IConfigTable
|
||||
public sealed partial class FishConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class HookConfig : ASerialize, IConfigTable
|
||||
public sealed partial class HookConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class InitConfig : ASerialize, IConfigTable
|
||||
public sealed partial class InitConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class ItemConfig : ASerialize, IConfigTable
|
||||
public sealed partial class ItemConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class LineConfig : ASerialize, IConfigTable
|
||||
public sealed partial class LineConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class LureConfig : ASerialize, IConfigTable
|
||||
public sealed partial class LureConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class ReelConfig : ASerialize, IConfigTable
|
||||
public sealed partial class ReelConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
85
Entity/Generate/ConfigTable/Entity/RingConfig.cs
Normal file
85
Entity/Generate/ConfigTable/Entity/RingConfig.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using Fantasy.Serialize;
|
||||
using Fantasy.ConfigTable;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class RingConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public string Model { get; set; } // 模型
|
||||
[ProtoMember(3)]
|
||||
public string Icon { get; set; } // 图标
|
||||
[ProtoIgnore]
|
||||
public uint Key => Id;
|
||||
|
||||
#region Static
|
||||
|
||||
private static ConfigContext<RingConfig> Context => ConfigTableHelper.Table<RingConfig>();
|
||||
|
||||
public static RingConfig Get(uint key)
|
||||
{
|
||||
return Context.Get(key);
|
||||
}
|
||||
|
||||
public static RingConfig Get(Predicate<RingConfig> match)
|
||||
{
|
||||
return Context.Get(match);
|
||||
}
|
||||
|
||||
public static RingConfig Fist()
|
||||
{
|
||||
return Context.Fist();
|
||||
}
|
||||
|
||||
public static RingConfig Last()
|
||||
{
|
||||
return Context.Last();
|
||||
}
|
||||
|
||||
public static RingConfig Fist(Predicate<RingConfig> match)
|
||||
{
|
||||
return Context.Fist(match);
|
||||
}
|
||||
|
||||
public static RingConfig Last(Predicate<RingConfig> match)
|
||||
{
|
||||
return Context.Last(match);
|
||||
}
|
||||
|
||||
public static int Count()
|
||||
{
|
||||
return Context.Count();
|
||||
}
|
||||
|
||||
public static int Count(Func<RingConfig, bool> predicate)
|
||||
{
|
||||
return Context.Count(predicate);
|
||||
}
|
||||
|
||||
public static List<RingConfig> GetList()
|
||||
{
|
||||
return Context.GetList();
|
||||
}
|
||||
|
||||
public static List<RingConfig> GetList(Predicate<RingConfig> match)
|
||||
{
|
||||
return Context.GetList(match);
|
||||
}
|
||||
public static void ParseJson(Newtonsoft.Json.Linq.JArray arr)
|
||||
{
|
||||
ConfigTableHelper.ParseLine<RingConfig>(arr);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class RodConfig : ASerialize, IConfigTable
|
||||
public sealed partial class RodConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
@@ -11,7 +11,7 @@ using Fantasy.ConfigTable;
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class RodRingConfig : ASerialize, IConfigTable
|
||||
public sealed partial class RodRingConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
|
||||
89
Entity/Generate/ConfigTable/Entity/WeightConfig.cs
Normal file
89
Entity/Generate/ConfigTable/Entity/WeightConfig.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using Fantasy.Serialize;
|
||||
using Fantasy.ConfigTable;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class WeightConfig : ASerialize, IProto, IConfigTable
|
||||
{
|
||||
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public string Model { get; set; } // 模型
|
||||
[ProtoMember(3)]
|
||||
public string Icon { get; set; } // 图标
|
||||
[ProtoMember(4)]
|
||||
public uint Type { get; set; } // 类型
|
||||
[ProtoMember(5)]
|
||||
public uint Weight { get; set; } // 重量(克)
|
||||
[ProtoIgnore]
|
||||
public uint Key => Id;
|
||||
|
||||
#region Static
|
||||
|
||||
private static ConfigContext<WeightConfig> Context => ConfigTableHelper.Table<WeightConfig>();
|
||||
|
||||
public static WeightConfig Get(uint key)
|
||||
{
|
||||
return Context.Get(key);
|
||||
}
|
||||
|
||||
public static WeightConfig Get(Predicate<WeightConfig> match)
|
||||
{
|
||||
return Context.Get(match);
|
||||
}
|
||||
|
||||
public static WeightConfig Fist()
|
||||
{
|
||||
return Context.Fist();
|
||||
}
|
||||
|
||||
public static WeightConfig Last()
|
||||
{
|
||||
return Context.Last();
|
||||
}
|
||||
|
||||
public static WeightConfig Fist(Predicate<WeightConfig> match)
|
||||
{
|
||||
return Context.Fist(match);
|
||||
}
|
||||
|
||||
public static WeightConfig Last(Predicate<WeightConfig> match)
|
||||
{
|
||||
return Context.Last(match);
|
||||
}
|
||||
|
||||
public static int Count()
|
||||
{
|
||||
return Context.Count();
|
||||
}
|
||||
|
||||
public static int Count(Func<WeightConfig, bool> predicate)
|
||||
{
|
||||
return Context.Count(predicate);
|
||||
}
|
||||
|
||||
public static List<WeightConfig> GetList()
|
||||
{
|
||||
return Context.GetList();
|
||||
}
|
||||
|
||||
public static List<WeightConfig> GetList(Predicate<WeightConfig> match)
|
||||
{
|
||||
return Context.GetList(match);
|
||||
}
|
||||
public static void ParseJson(Newtonsoft.Json.Linq.JArray arr)
|
||||
{
|
||||
ConfigTableHelper.ParseLine<WeightConfig>(arr);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user