feat: initial commit - HJHA game server full source

6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) +
game logic (GameFix/GameDAL/ServerData) +
network layer (NetWorkMessage) +
data layer (ObjectModel) +
utilities (MrWu/Core/Config/CloudAPI/dll) +
adapters (zyxAdapter/base)

.NET 8.0 C# solution, 16 projects, 958 source files
This commit is contained in:
2026-07-07 12:02:15 +08:00
commit e9616125ce
958 changed files with 158203 additions and 0 deletions

View File

@ -0,0 +1,116 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class CastlesConfig : Luban.BeanBase
{
public CastlesConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
GameId = _buf.ReadInt();
CastleId = _buf.ReadInt();
BeiLv = _buf.ReadInt();
MinMoney = _buf.ReadInt();
MaxMoney = _buf.ReadInt();
Tax = _buf.ReadInt();
RaceTax = _buf.ReadInt();
Exp = _buf.ReadInt();
ScoreMultiple = _buf.ReadInt();
CanSaiJuanReward = _buf.ReadInt();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Tings = new int[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { int __e0;__e0 = _buf.ReadInt(); Tings[__index0] = __e0;}}
Queuetag = _buf.ReadString();
}
public static CastlesConfig DeserializeCastlesConfig(ByteBuf _buf)
{
return new CastlesConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 服务器id
/// </summary>
public readonly int GameId;
/// <summary>
/// 城堡id
/// </summary>
public readonly int CastleId;
/// <summary>
/// 倍率
/// </summary>
public readonly int BeiLv;
/// <summary>
/// 最小金币数额
/// </summary>
public readonly int MinMoney;
/// <summary>
/// 最大金币数额
/// </summary>
public readonly int MaxMoney;
/// <summary>
/// 税收
/// </summary>
public readonly int Tax;
/// <summary>
/// 比赛税收
/// </summary>
public readonly int RaceTax;
/// <summary>
/// 经验加成
/// </summary>
public readonly int Exp;
/// <summary>
/// 比赛积分比例
/// </summary>
public readonly int ScoreMultiple;
/// <summary>
/// 参赛券奖励
/// </summary>
public readonly int CanSaiJuanReward;
/// <summary>
/// 拥有的厅
/// </summary>
public readonly int[] Tings;
/// <summary>
/// 排队标记<br/>(标记相同的房间可以排队在一起)
/// </summary>
public readonly string Queuetag;
public const int __ID__ = -1352367747;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "gameId:" + GameId + ","
+ "castleId:" + CastleId + ","
+ "beiLv:" + BeiLv + ","
+ "minMoney:" + MinMoney + ","
+ "maxMoney:" + MaxMoney + ","
+ "tax:" + Tax + ","
+ "raceTax:" + RaceTax + ","
+ "exp:" + Exp + ","
+ "scoreMultiple:" + ScoreMultiple + ","
+ "canSaiJuanReward:" + CanSaiJuanReward + ","
+ "tings:" + Luban.StringUtil.CollectionToString(Tings) + ","
+ "queuetag:" + Queuetag + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class CastlesConfigCategory : ConfigSingleton<CastlesConfigCategory>
{
public const string TableName = Tables.CastlesConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, CastlesConfig> _dataMap;
private readonly System.Collections.Generic.List<CastlesConfig> _dataList;
public CastlesConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, CastlesConfig>();
_dataList = new System.Collections.Generic.List<CastlesConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<CastlesConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
CastlesConfig _v;
_v = CastlesConfig.DeserializeCastlesConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, CastlesConfig> DataMap => _dataMap;
public System.Collections.Generic.List<CastlesConfig> DataList => _dataList;
public CastlesConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public CastlesConfig Get(int key) => _dataMap[key];
public CastlesConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

110
Config/Code/ConstConfig.cs Normal file
View File

@ -0,0 +1,110 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class ConstConfig : Luban.BeanBase
{
public ConstConfig(ByteBuf _buf)
{
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Relief = new int[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { int __e0;__e0 = _buf.ReadInt(); Relief[__index0] = __e0;}}
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Poor = new int[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { int __e0;__e0 = _buf.ReadInt(); Poor[__index0] = __e0;}}
ReliefLimitCnt = _buf.ReadInt();
AdGiftCnt = _buf.ReadInt();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);AdGiftReward = new int[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { int __e0;__e0 = _buf.ReadInt(); AdGiftReward[__index0] = __e0;}}
SignReward = _buf.ReadInt();
PrizeWheelLimit = _buf.ReadInt();
PrizeWheelFreeCnt = _buf.ReadInt();
GeneralAdLimit = _buf.ReadInt();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);GeneralAdRewardRange = new int[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { int __e0;__e0 = _buf.ReadInt(); GeneralAdRewardRange[__index0] = __e0;}}
RealNameSecreKey = _buf.ReadString();
HandTrackerDiamondCnt = _buf.ReadInt();
}
public static ConstConfig DeserializeConstConfig(ByteBuf _buf)
{
return new ConstConfig(_buf);
}
/// <summary>
/// 救济金 单位W
/// </summary>
public readonly int[] Relief;
/// <summary>
/// 可领救济金的穷人 单位W
/// </summary>
public readonly int[] Poor;
/// <summary>
/// 救济金 每日领取上限
/// </summary>
public readonly int ReliefLimitCnt;
/// <summary>
/// 广告礼包数量
/// </summary>
public readonly int AdGiftCnt;
/// <summary>
/// 广告礼包奖励 单位W
/// </summary>
public readonly int[] AdGiftReward;
/// <summary>
/// 签到奖励
/// </summary>
public readonly int SignReward;
/// <summary>
/// 每日转盘上限
/// </summary>
public readonly int PrizeWheelLimit;
/// <summary>
/// 每日转盘免费次数
/// </summary>
public readonly int PrizeWheelFreeCnt;
/// <summary>
/// 通用广告礼包次数 服务器是这个数值的2倍
/// </summary>
public readonly int GeneralAdLimit;
/// <summary>
/// 广告奖励金额范围,单位万
/// </summary>
public readonly int[] GeneralAdRewardRange;
/// <summary>
/// 实名认证秘钥
/// </summary>
public readonly string RealNameSecreKey;
/// <summary>
/// 记牌器消耗的钻石数量
/// </summary>
public readonly int HandTrackerDiamondCnt;
public const int __ID__ = -1271334811;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "Relief:" + Luban.StringUtil.CollectionToString(Relief) + ","
+ "Poor:" + Luban.StringUtil.CollectionToString(Poor) + ","
+ "ReliefLimitCnt:" + ReliefLimitCnt + ","
+ "AdGiftCnt:" + AdGiftCnt + ","
+ "AdGiftReward:" + Luban.StringUtil.CollectionToString(AdGiftReward) + ","
+ "SignReward:" + SignReward + ","
+ "PrizeWheelLimit:" + PrizeWheelLimit + ","
+ "PrizeWheelFreeCnt:" + PrizeWheelFreeCnt + ","
+ "GeneralAdLimit:" + GeneralAdLimit + ","
+ "GeneralAdRewardRange:" + Luban.StringUtil.CollectionToString(GeneralAdRewardRange) + ","
+ "RealNameSecreKey:" + RealNameSecreKey + ","
+ "HandTrackerDiamondCnt:" + HandTrackerDiamondCnt + ","
+ "}";
}
}
}

View File

@ -0,0 +1,98 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class ConstConfigCategory : ConfigSingleton<ConstConfigCategory>
{
public const string TableName = Tables.ConstConfigCategory;
private ConstConfig _data;
public ConstConfig Data => _data;
public ConstConfigCategory()
{
this.ReLoadData();
}
public sealed override void ReLoadData()
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
protected sealed override void LoadData(ByteBuf _buf)
{
int n = _buf.ReadSize();
if (n != 1) throw new SerializationException("table mode=one, but size != 1");
_data = ConstConfig.DeserializeConstConfig(_buf);
PostInit();
}
/// <summary>
/// 救济金 单位W
/// </summary>
public int[] Relief => _data.Relief;
/// <summary>
/// 可领救济金的穷人 单位W
/// </summary>
public int[] Poor => _data.Poor;
/// <summary>
/// 救济金 每日领取上限
/// </summary>
public int ReliefLimitCnt => _data.ReliefLimitCnt;
/// <summary>
/// 广告礼包数量
/// </summary>
public int AdGiftCnt => _data.AdGiftCnt;
/// <summary>
/// 广告礼包奖励 单位W
/// </summary>
public int[] AdGiftReward => _data.AdGiftReward;
/// <summary>
/// 签到奖励
/// </summary>
public int SignReward => _data.SignReward;
/// <summary>
/// 每日转盘上限
/// </summary>
public int PrizeWheelLimit => _data.PrizeWheelLimit;
/// <summary>
/// 每日转盘免费次数
/// </summary>
public int PrizeWheelFreeCnt => _data.PrizeWheelFreeCnt;
/// <summary>
/// 通用广告礼包次数 服务器是这个数值的2倍
/// </summary>
public int GeneralAdLimit => _data.GeneralAdLimit;
/// <summary>
/// 广告奖励金额范围,单位万
/// </summary>
public int[] GeneralAdRewardRange => _data.GeneralAdRewardRange;
/// <summary>
/// 实名认证秘钥
/// </summary>
public string RealNameSecreKey => _data.RealNameSecreKey;
/// <summary>
/// 记牌器消耗的钻石数量
/// </summary>
public int HandTrackerDiamondCnt => _data.HandTrackerDiamondCnt;
partial void PostInit();
}
}

View File

@ -0,0 +1,98 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class DiamondMallConfig : Luban.BeanBase
{
public DiamondMallConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
PlatProductId = _buf.ReadString();
Name = _buf.ReadString();
Price = _buf.ReadInt();
AppStoreType = _buf.ReadInt();
NotShelved = _buf.ReadBool();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Packages = new ResData[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { ResData __e0;__e0 = ResData.DeserializeResData(_buf); Packages[__index0] = __e0;}}
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Gift = new ResData[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { ResData __e0;__e0 = ResData.DeserializeResData(_buf); Gift[__index0] = __e0;}}
Sort = _buf.ReadInt();
Desc = _buf.ReadString();
}
public static DiamondMallConfig DeserializeDiamondMallConfig(ByteBuf _buf)
{
return new DiamondMallConfig(_buf);
}
/// <summary>
/// 商品ID
/// </summary>
public readonly int Id;
/// <summary>
/// 第三方平台Id
/// </summary>
public readonly string PlatProductId;
/// <summary>
/// 商品名称
/// </summary>
public readonly string Name;
/// <summary>
/// 价格(人民币元)
/// </summary>
public readonly int Price;
/// <summary>
/// app商店类型<br/>0 默认<br/>1 微信小游戏<br/>2 应用包<br/>3 AppStore<br/>4 官网<br/>5 华为<br/>6 公众号<br/>7 小米<br/>
/// </summary>
public readonly int AppStoreType;
/// <summary>
/// 未上架
/// </summary>
public readonly bool NotShelved;
/// <summary>
/// 商品包
/// </summary>
public readonly ResData[] Packages;
/// <summary>
/// 赠送包
/// </summary>
public readonly ResData[] Gift;
/// <summary>
/// 排序数字<br/>降序
/// </summary>
public readonly int Sort;
/// <summary>
/// 描述
/// </summary>
public readonly string Desc;
public const int __ID__ = 1355365066;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "platProductId:" + PlatProductId + ","
+ "name:" + Name + ","
+ "price:" + Price + ","
+ "appStoreType:" + AppStoreType + ","
+ "notShelved:" + NotShelved + ","
+ "packages:" + Luban.StringUtil.CollectionToString(Packages) + ","
+ "gift:" + Luban.StringUtil.CollectionToString(Gift) + ","
+ "sort:" + Sort + ","
+ "desc:" + Desc + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class DiamondMallConfigCategory : ConfigSingleton<DiamondMallConfigCategory>
{
public const string TableName = Tables.DiamondMallConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, DiamondMallConfig> _dataMap;
private readonly System.Collections.Generic.List<DiamondMallConfig> _dataList;
public DiamondMallConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, DiamondMallConfig>();
_dataList = new System.Collections.Generic.List<DiamondMallConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<DiamondMallConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
DiamondMallConfig _v;
_v = DiamondMallConfig.DeserializeDiamondMallConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, DiamondMallConfig> DataMap => _dataMap;
public System.Collections.Generic.List<DiamondMallConfig> DataList => _dataList;
public DiamondMallConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public DiamondMallConfig Get(int key) => _dataMap[key];
public DiamondMallConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class EntityExchangeMallCategory : ConfigSingleton<EntityExchangeMallCategory>
{
public const string TableName = Tables.EntityExchangeMallCategory;
private readonly System.Collections.Generic.Dictionary<int, EntityExchangeMallConfig> _dataMap;
private readonly System.Collections.Generic.List<EntityExchangeMallConfig> _dataList;
public EntityExchangeMallCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, EntityExchangeMallConfig>();
_dataList = new System.Collections.Generic.List<EntityExchangeMallConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<EntityExchangeMallConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
EntityExchangeMallConfig _v;
_v = EntityExchangeMallConfig.DeserializeEntityExchangeMallConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, EntityExchangeMallConfig> DataMap => _dataMap;
public System.Collections.Generic.List<EntityExchangeMallConfig> DataList => _dataList;
public EntityExchangeMallConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public EntityExchangeMallConfig Get(int key) => _dataMap[key];
public EntityExchangeMallConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,104 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class EntityExchangeMallConfig : Luban.BeanBase
{
public EntityExchangeMallConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Name = _buf.ReadString();
RedMoney = _buf.ReadInt();
ProductType = _buf.ReadInt();
MallType = _buf.ReadInt();
DayLimit = _buf.ReadInt();
UserDayLimit = _buf.ReadInt();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);AppStore = new int[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { int __e0;__e0 = _buf.ReadInt(); AppStore[__index0] = __e0;}}
NotShelved = _buf.ReadBool();
Sort = _buf.ReadInt();
Desc = _buf.ReadString();
}
public static EntityExchangeMallConfig DeserializeEntityExchangeMallConfig(ByteBuf _buf)
{
return new EntityExchangeMallConfig(_buf);
}
/// <summary>
/// 商品Id
/// </summary>
public readonly int Id;
/// <summary>
/// 商品名称
/// </summary>
public readonly string Name;
/// <summary>
/// 红卡数量
/// </summary>
public readonly int RedMoney;
/// <summary>
/// 商品类型<br/>1 实物商品<br/>2 虚拟商品
/// </summary>
public readonly int ProductType;
/// <summary>
/// 客户端展示分类<br/>1 实物<br/>2 会员话费<br/>
/// </summary>
public readonly int MallType;
/// <summary>
/// 单日限兑数量
/// </summary>
public readonly int DayLimit;
/// <summary>
/// 单个用户单日限兑数量
/// </summary>
public readonly int UserDayLimit;
/// <summary>
/// 支持的APP商城类型<br/>支持的APP商城类型<br/>0 默认<br/>1 微信小游戏<br/>2 应用包<br/>3 AppStore<br/>4 官网<br/>5 华为<br/>6 公众号<br/>7 小米
/// </summary>
public readonly int[] AppStore;
/// <summary>
/// 未上架
/// </summary>
public readonly bool NotShelved;
/// <summary>
/// 排序数字<br/>升序
/// </summary>
public readonly int Sort;
/// <summary>
/// 描述
/// </summary>
public readonly string Desc;
public const int __ID__ = -868244900;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "name:" + Name + ","
+ "redMoney:" + RedMoney + ","
+ "productType:" + ProductType + ","
+ "mallType:" + MallType + ","
+ "dayLimit:" + DayLimit + ","
+ "userDayLimit:" + UserDayLimit + ","
+ "appStore:" + Luban.StringUtil.CollectionToString(AppStore) + ","
+ "notShelved:" + NotShelved + ","
+ "sort:" + Sort + ","
+ "desc:" + Desc + ","
+ "}";
}
}
}

View File

@ -0,0 +1,92 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class ExchangeMallConfig : Luban.BeanBase
{
public ExchangeMallConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Name = _buf.ReadString();
MallType = _buf.ReadInt();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);SourceItems = new ResData[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { ResData __e0;__e0 = ResData.DeserializeResData(_buf); SourceItems[__index0] = __e0;}}
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);TargetItems = new ResData[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { ResData __e0;__e0 = ResData.DeserializeResData(_buf); TargetItems[__index0] = __e0;}}
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);AppStore = new int[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { int __e0;__e0 = _buf.ReadInt(); AppStore[__index0] = __e0;}}
NotShelved = _buf.ReadBool();
Sort = _buf.ReadInt();
Desc = _buf.ReadString();
}
public static ExchangeMallConfig DeserializeExchangeMallConfig(ByteBuf _buf)
{
return new ExchangeMallConfig(_buf);
}
/// <summary>
/// 兑换Id
/// </summary>
public readonly int Id;
/// <summary>
/// 商品名称
/// </summary>
public readonly string Name;
/// <summary>
/// 兑换商店类型<br/>0 全部,这里不能配置<br/>1 金币<br/>2 道具<br/>3 活动
/// </summary>
public readonly int MallType;
/// <summary>
/// 需要消耗的物品列表
/// </summary>
public readonly ResData[] SourceItems;
/// <summary>
/// 兑换获得的物品列表
/// </summary>
public readonly ResData[] TargetItems;
/// <summary>
/// 支持的APP商城类型<br/>0 默认<br/>1 微信小游戏<br/>2 应用包<br/>3 AppStore<br/>4 官网<br/>5 华为<br/>6 公众号<br/>7 小米
/// </summary>
public readonly int[] AppStore;
/// <summary>
/// 未上架
/// </summary>
public readonly bool NotShelved;
/// <summary>
/// 排序数字<br/>降序
/// </summary>
public readonly int Sort;
/// <summary>
/// 描述
/// </summary>
public readonly string Desc;
public const int __ID__ = -1269715687;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "name:" + Name + ","
+ "mallType:" + MallType + ","
+ "SourceItems:" + Luban.StringUtil.CollectionToString(SourceItems) + ","
+ "TargetItems:" + Luban.StringUtil.CollectionToString(TargetItems) + ","
+ "appStore:" + Luban.StringUtil.CollectionToString(AppStore) + ","
+ "notShelved:" + NotShelved + ","
+ "sort:" + Sort + ","
+ "desc:" + Desc + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class ExchangeMallConfigCategory : ConfigSingleton<ExchangeMallConfigCategory>
{
public const string TableName = Tables.ExchangeMallConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, ExchangeMallConfig> _dataMap;
private readonly System.Collections.Generic.List<ExchangeMallConfig> _dataList;
public ExchangeMallConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, ExchangeMallConfig>();
_dataList = new System.Collections.Generic.List<ExchangeMallConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<ExchangeMallConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
ExchangeMallConfig _v;
_v = ExchangeMallConfig.DeserializeExchangeMallConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, ExchangeMallConfig> DataMap => _dataMap;
public System.Collections.Generic.List<ExchangeMallConfig> DataList => _dataList;
public ExchangeMallConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public ExchangeMallConfig Get(int key) => _dataMap[key];
public ExchangeMallConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class FZMJGameConfig : Luban.BeanBase
{
public FZMJGameConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Value = _buf.ReadByte();
}
public static FZMJGameConfig DeserializeFZMJGameConfig(ByteBuf _buf)
{
return new FZMJGameConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 配置值
/// </summary>
public readonly byte Value;
public const int __ID__ = 2011573797;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Value + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class FZMJGameConfigCategory : ConfigSingleton<FZMJGameConfigCategory>
{
public const string TableName = Tables.FZMJGameConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, FZMJGameConfig> _dataMap;
private readonly System.Collections.Generic.List<FZMJGameConfig> _dataList;
public FZMJGameConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, FZMJGameConfig>();
_dataList = new System.Collections.Generic.List<FZMJGameConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<FZMJGameConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
FZMJGameConfig _v;
_v = FZMJGameConfig.DeserializeFZMJGameConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, FZMJGameConfig> DataMap => _dataMap;
public System.Collections.Generic.List<FZMJGameConfig> DataList => _dataList;
public FZMJGameConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public FZMJGameConfig Get(int key) => _dataMap[key];
public FZMJGameConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,47 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class FZMJTingConfig : Luban.BeanBase
{
public FZMJTingConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Value = new byte[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { byte __e0;__e0 = _buf.ReadByte(); Value[__index0] = __e0;}}
}
public static FZMJTingConfig DeserializeFZMJTingConfig(ByteBuf _buf)
{
return new FZMJTingConfig(_buf);
}
public readonly int Id;
/// <summary>
/// 0
/// </summary>
public readonly byte[] Value;
public const int __ID__ = 1399982113;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Luban.StringUtil.CollectionToString(Value) + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class FZMJTingConfigCategory : ConfigSingleton<FZMJTingConfigCategory>
{
public const string TableName = Tables.FZMJTingConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, FZMJTingConfig> _dataMap;
private readonly System.Collections.Generic.List<FZMJTingConfig> _dataList;
public FZMJTingConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, FZMJTingConfig>();
_dataList = new System.Collections.Generic.List<FZMJTingConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<FZMJTingConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
FZMJTingConfig _v;
_v = FZMJTingConfig.DeserializeFZMJTingConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, FZMJTingConfig> DataMap => _dataMap;
public System.Collections.Generic.List<FZMJTingConfig> DataList => _dataList;
public FZMJTingConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public FZMJTingConfig Get(int key) => _dataMap[key];
public FZMJTingConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class GZGameConfig : Luban.BeanBase
{
public GZGameConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Value = _buf.ReadByte();
}
public static GZGameConfig DeserializeGZGameConfig(ByteBuf _buf)
{
return new GZGameConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 配置值
/// </summary>
public readonly byte Value;
public const int __ID__ = -78508249;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Value + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class GZGameConfigCategory : ConfigSingleton<GZGameConfigCategory>
{
public const string TableName = Tables.GZGameConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, GZGameConfig> _dataMap;
private readonly System.Collections.Generic.List<GZGameConfig> _dataList;
public GZGameConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, GZGameConfig>();
_dataList = new System.Collections.Generic.List<GZGameConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<GZGameConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
GZGameConfig _v;
_v = GZGameConfig.DeserializeGZGameConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, GZGameConfig> DataMap => _dataMap;
public System.Collections.Generic.List<GZGameConfig> DataList => _dataList;
public GZGameConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public GZGameConfig Get(int key) => _dataMap[key];
public GZGameConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class GZMJGameConfig : Luban.BeanBase
{
public GZMJGameConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Value = _buf.ReadByte();
}
public static GZMJGameConfig DeserializeGZMJGameConfig(ByteBuf _buf)
{
return new GZMJGameConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 配置值
/// </summary>
public readonly byte Value;
public const int __ID__ = 1506015172;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Value + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class GZMJGameConfigCategory : ConfigSingleton<GZMJGameConfigCategory>
{
public const string TableName = Tables.GZMJGameConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, GZMJGameConfig> _dataMap;
private readonly System.Collections.Generic.List<GZMJGameConfig> _dataList;
public GZMJGameConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, GZMJGameConfig>();
_dataList = new System.Collections.Generic.List<GZMJGameConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<GZMJGameConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
GZMJGameConfig _v;
_v = GZMJGameConfig.DeserializeGZMJGameConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, GZMJGameConfig> DataMap => _dataMap;
public System.Collections.Generic.List<GZMJGameConfig> DataList => _dataList;
public GZMJGameConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public GZMJGameConfig Get(int key) => _dataMap[key];
public GZMJGameConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,47 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class GZMJTingConfig : Luban.BeanBase
{
public GZMJTingConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Value = new byte[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { byte __e0;__e0 = _buf.ReadByte(); Value[__index0] = __e0;}}
}
public static GZMJTingConfig DeserializeGZMJTingConfig(ByteBuf _buf)
{
return new GZMJTingConfig(_buf);
}
public readonly int Id;
/// <summary>
/// 0
/// </summary>
public readonly byte[] Value;
public const int __ID__ = 894423488;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Luban.StringUtil.CollectionToString(Value) + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class GZMJTingConfigCategory : ConfigSingleton<GZMJTingConfigCategory>
{
public const string TableName = Tables.GZMJTingConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, GZMJTingConfig> _dataMap;
private readonly System.Collections.Generic.List<GZMJTingConfig> _dataList;
public GZMJTingConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, GZMJTingConfig>();
_dataList = new System.Collections.Generic.List<GZMJTingConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<GZMJTingConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
GZMJTingConfig _v;
_v = GZMJTingConfig.DeserializeGZMJTingConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, GZMJTingConfig> DataMap => _dataMap;
public System.Collections.Generic.List<GZMJTingConfig> DataList => _dataList;
public GZMJTingConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public GZMJTingConfig Get(int key) => _dataMap[key];
public GZMJTingConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

122
Config/Code/GameConfig.cs Normal file
View File

@ -0,0 +1,122 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class GameConfig : Luban.BeanBase
{
public GameConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
GameId = _buf.ReadInt();
ClientId = _buf.ReadInt();
GameName = _buf.ReadString();
GameMode = _buf.ReadByte();
GameStyle = _buf.ReadByte();
OpenGold = _buf.ReadByte();
GoldDeskWarTimeOut = _buf.ReadInt();
OpenFriend = _buf.ReadByte();
FriendDeskWarTimeOut = _buf.ReadInt();
FriendStarWarTimeOut = _buf.ReadInt();
ClubReadyTimeOut = _buf.ReadInt();
FriendAutoReady = _buf.ReadInt();
ClubBalance = _buf.ReadFloat();
}
public static GameConfig DeserializeGameConfig(ByteBuf _buf)
{
return new GameConfig(_buf);
}
/// <summary>
/// ID<br/>与节点信息对应
/// </summary>
public readonly int Id;
/// <summary>
/// 服务器游戏id
/// </summary>
public readonly int GameId;
/// <summary>
/// 客户端游戏id
/// </summary>
public readonly int ClientId;
/// <summary>
/// 游戏名称
/// </summary>
public readonly string GameName;
/// <summary>
/// 游戏模式<br/>0普通模式<br/>1百家乐模式<br/>2休闲模式
/// </summary>
public readonly byte GameMode;
/// <summary>
/// 0牌类<br/>1麻将类<br/>2休闲类
/// </summary>
public readonly byte GameStyle;
/// <summary>
/// 是否开启金币场
/// </summary>
public readonly byte OpenGold;
/// <summary>
/// 金币场战斗超时间(分钟)<br/>超过时间自动解散
/// </summary>
public readonly int GoldDeskWarTimeOut;
/// <summary>
/// 是否开启朋友房
/// </summary>
public readonly byte OpenFriend;
/// <summary>
/// 朋友房桌子超时时间(小时)<br/>超过时间自动解散
/// </summary>
public readonly int FriendDeskWarTimeOut;
/// <summary>
/// 朋友房未开战超时时间(分钟)<br/>超过时间自动解散
/// </summary>
public readonly int FriendStarWarTimeOut;
/// <summary>
/// 竞技赛场准备超时时间(秒)<br/>超过时间自动踢到下一桌
/// </summary>
public readonly int ClubReadyTimeOut;
/// <summary>
/// 朋友房自动准备时间(秒)
/// </summary>
public readonly int FriendAutoReady;
/// <summary>
/// 俱乐部平衡参数<br/>控制输的平均值(倍数)
/// </summary>
public readonly float ClubBalance;
public const int __ID__ = -2136581644;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "gameId:" + GameId + ","
+ "clientId:" + ClientId + ","
+ "gameName:" + GameName + ","
+ "gameMode:" + GameMode + ","
+ "gameStyle:" + GameStyle + ","
+ "openGold:" + OpenGold + ","
+ "goldDeskWarTimeOut:" + GoldDeskWarTimeOut + ","
+ "openFriend:" + OpenFriend + ","
+ "friendDeskWarTimeOut:" + FriendDeskWarTimeOut + ","
+ "friendStarWarTimeOut:" + FriendStarWarTimeOut + ","
+ "clubReadyTimeOut:" + ClubReadyTimeOut + ","
+ "friendAutoReady:" + FriendAutoReady + ","
+ "clubBalance:" + ClubBalance + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class GameConfigCategory : ConfigSingleton<GameConfigCategory>
{
public const string TableName = Tables.GameConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, GameConfig> _dataMap;
private readonly System.Collections.Generic.List<GameConfig> _dataList;
public GameConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, GameConfig>();
_dataList = new System.Collections.Generic.List<GameConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<GameConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
GameConfig _v;
_v = GameConfig.DeserializeGameConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, GameConfig> DataMap => _dataMap;
public System.Collections.Generic.List<GameConfig> DataList => _dataList;
public GameConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public GameConfig Get(int key) => _dataMap[key];
public GameConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

62
Config/Code/HttpConfig.cs Normal file
View File

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class HttpConfig : Luban.BeanBase
{
public HttpConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Host = _buf.ReadString();
Port = _buf.ReadInt();
TimeOut = _buf.ReadInt();
}
public static HttpConfig DeserializeHttpConfig(ByteBuf _buf)
{
return new HttpConfig(_buf);
}
/// <summary>
/// id 对应的节点ID
/// </summary>
public readonly int Id;
/// <summary>
/// host
/// </summary>
public readonly string Host;
/// <summary>
/// 端口
/// </summary>
public readonly int Port;
/// <summary>
/// 超时时间 毫秒
/// </summary>
public readonly int TimeOut;
public const int __ID__ = -1827615222;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "host:" + Host + ","
+ "port:" + Port + ","
+ "timeOut:" + TimeOut + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class HttpConfigCategory : ConfigSingleton<HttpConfigCategory>
{
public const string TableName = Tables.HttpConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, HttpConfig> _dataMap;
private readonly System.Collections.Generic.List<HttpConfig> _dataList;
public HttpConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, HttpConfig>();
_dataList = new System.Collections.Generic.List<HttpConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<HttpConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
HttpConfig _v;
_v = HttpConfig.DeserializeHttpConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, HttpConfig> DataMap => _dataMap;
public System.Collections.Generic.List<HttpConfig> DataList => _dataList;
public HttpConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public HttpConfig Get(int key) => _dataMap[key];
public HttpConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class JAMJGameConfig : Luban.BeanBase
{
public JAMJGameConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Value = _buf.ReadByte();
}
public static JAMJGameConfig DeserializeJAMJGameConfig(ByteBuf _buf)
{
return new JAMJGameConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 配置值
/// </summary>
public readonly byte Value;
public const int __ID__ = -1265520120;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Value + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class JAMJGameConfigCategory : ConfigSingleton<JAMJGameConfigCategory>
{
public const string TableName = Tables.JAMJGameConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, JAMJGameConfig> _dataMap;
private readonly System.Collections.Generic.List<JAMJGameConfig> _dataList;
public JAMJGameConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, JAMJGameConfig>();
_dataList = new System.Collections.Generic.List<JAMJGameConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<JAMJGameConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
JAMJGameConfig _v;
_v = JAMJGameConfig.DeserializeJAMJGameConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, JAMJGameConfig> DataMap => _dataMap;
public System.Collections.Generic.List<JAMJGameConfig> DataList => _dataList;
public JAMJGameConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public JAMJGameConfig Get(int key) => _dataMap[key];
public JAMJGameConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,47 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class JAMJTingConfig : Luban.BeanBase
{
public JAMJTingConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Value = new byte[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { byte __e0;__e0 = _buf.ReadByte(); Value[__index0] = __e0;}}
}
public static JAMJTingConfig DeserializeJAMJTingConfig(ByteBuf _buf)
{
return new JAMJTingConfig(_buf);
}
public readonly int Id;
/// <summary>
/// 0
/// </summary>
public readonly byte[] Value;
public const int __ID__ = -1877111804;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Luban.StringUtil.CollectionToString(Value) + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class JAMJTingConfigCategory : ConfigSingleton<JAMJTingConfigCategory>
{
public const string TableName = Tables.JAMJTingConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, JAMJTingConfig> _dataMap;
private readonly System.Collections.Generic.List<JAMJTingConfig> _dataList;
public JAMJTingConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, JAMJTingConfig>();
_dataList = new System.Collections.Generic.List<JAMJTingConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<JAMJTingConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
JAMJTingConfig _v;
_v = JAMJTingConfig.DeserializeJAMJTingConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, JAMJTingConfig> DataMap => _dataMap;
public System.Collections.Generic.List<JAMJTingConfig> DataList => _dataList;
public JAMJTingConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public JAMJTingConfig Get(int key) => _dataMap[key];
public JAMJTingConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class LPLFGameConfig : Luban.BeanBase
{
public LPLFGameConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Value = _buf.ReadByte();
}
public static LPLFGameConfig DeserializeLPLFGameConfig(ByteBuf _buf)
{
return new LPLFGameConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 配置值
/// </summary>
public readonly byte Value;
public const int __ID__ = 381040242;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Value + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class LPLFGameConfigCategory : ConfigSingleton<LPLFGameConfigCategory>
{
public const string TableName = Tables.LPLFGameConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, LPLFGameConfig> _dataMap;
private readonly System.Collections.Generic.List<LPLFGameConfig> _dataList;
public LPLFGameConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, LPLFGameConfig>();
_dataList = new System.Collections.Generic.List<LPLFGameConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<LPLFGameConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
LPLFGameConfig _v;
_v = LPLFGameConfig.DeserializeLPLFGameConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, LPLFGameConfig> DataMap => _dataMap;
public System.Collections.Generic.List<LPLFGameConfig> DataList => _dataList;
public LPLFGameConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public LPLFGameConfig Get(int key) => _dataMap[key];
public LPLFGameConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class NCMJGameConfig : Luban.BeanBase
{
public NCMJGameConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Value = _buf.ReadByte();
}
public static NCMJGameConfig DeserializeNCMJGameConfig(ByteBuf _buf)
{
return new NCMJGameConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 配置值
/// </summary>
public readonly byte Value;
public const int __ID__ = 420406662;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Value + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class NCMJGameConfigCategory : ConfigSingleton<NCMJGameConfigCategory>
{
public const string TableName = Tables.NCMJGameConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, NCMJGameConfig> _dataMap;
private readonly System.Collections.Generic.List<NCMJGameConfig> _dataList;
public NCMJGameConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, NCMJGameConfig>();
_dataList = new System.Collections.Generic.List<NCMJGameConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<NCMJGameConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
NCMJGameConfig _v;
_v = NCMJGameConfig.DeserializeNCMJGameConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, NCMJGameConfig> DataMap => _dataMap;
public System.Collections.Generic.List<NCMJGameConfig> DataList => _dataList;
public NCMJGameConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public NCMJGameConfig Get(int key) => _dataMap[key];
public NCMJGameConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,47 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class NCMJTingConfig : Luban.BeanBase
{
public NCMJTingConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Value = new byte[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { byte __e0;__e0 = _buf.ReadByte(); Value[__index0] = __e0;}}
}
public static NCMJTingConfig DeserializeNCMJTingConfig(ByteBuf _buf)
{
return new NCMJTingConfig(_buf);
}
public readonly int Id;
/// <summary>
/// 0
/// </summary>
public readonly byte[] Value;
public const int __ID__ = -191185022;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Luban.StringUtil.CollectionToString(Value) + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class NCMJTingConfigCategory : ConfigSingleton<NCMJTingConfigCategory>
{
public const string TableName = Tables.NCMJTingConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, NCMJTingConfig> _dataMap;
private readonly System.Collections.Generic.List<NCMJTingConfig> _dataList;
public NCMJTingConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, NCMJTingConfig>();
_dataList = new System.Collections.Generic.List<NCMJTingConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<NCMJTingConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
NCMJTingConfig _v;
_v = NCMJTingConfig.DeserializeNCMJTingConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, NCMJTingConfig> DataMap => _dataMap;
public System.Collections.Generic.List<NCMJTingConfig> DataList => _dataList;
public NCMJTingConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public NCMJTingConfig Get(int key) => _dataMap[key];
public NCMJTingConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class NCSTGameConfig : Luban.BeanBase
{
public NCSTGameConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Value = _buf.ReadByte();
}
public static NCSTGameConfig DeserializeNCSTGameConfig(ByteBuf _buf)
{
return new NCSTGameConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 配置值
/// </summary>
public readonly byte Value;
public const int __ID__ = 405258570;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Value + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class NCSTGameConfigCategory : ConfigSingleton<NCSTGameConfigCategory>
{
public const string TableName = Tables.NCSTGameConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, NCSTGameConfig> _dataMap;
private readonly System.Collections.Generic.List<NCSTGameConfig> _dataList;
public NCSTGameConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, NCSTGameConfig>();
_dataList = new System.Collections.Generic.List<NCSTGameConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<NCSTGameConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
NCSTGameConfig _v;
_v = NCSTGameConfig.DeserializeNCSTGameConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, NCSTGameConfig> DataMap => _dataMap;
public System.Collections.Generic.List<NCSTGameConfig> DataList => _dataList;
public NCSTGameConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public NCSTGameConfig Get(int key) => _dataMap[key];
public NCSTGameConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

116
Config/Code/NodeConfig.cs Normal file
View File

@ -0,0 +1,116 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class NodeConfig : Luban.BeanBase
{
public NodeConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
NodeId = _buf.ReadByte();
NodeNum = _buf.ReadByte();
ServerName = _buf.ReadString();
MaxVer = _buf.ReadInt();
MinVer = _buf.ReadInt();
MaxCVer = _buf.ReadInt();
MinCVer = _buf.ReadInt();
WebSocketPort = _buf.ReadInt();
InnerNetPort = _buf.ReadInt();
OuterNetPort = _buf.ReadInt();
InnerHost = _buf.ReadString();
OnTime = _buf.ReadInt();
}
public static NodeConfig DeserializeNodeConfig(ByteBuf _buf)
{
return new NodeConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 模块id
/// </summary>
public readonly byte NodeId;
/// <summary>
/// 节点编号
/// </summary>
public readonly byte NodeNum;
/// <summary>
/// 服务器名称
/// </summary>
public readonly string ServerName;
/// <summary>
/// 大版本
/// </summary>
public readonly int MaxVer;
/// <summary>
/// 小版本
/// </summary>
public readonly int MinVer;
/// <summary>
/// 兼容客户端的最大版本
/// </summary>
public readonly int MaxCVer;
/// <summary>
/// 兼容客户端的最小版本
/// </summary>
public readonly int MinCVer;
/// <summary>
/// WebSocket端口<br/>0表示不开启
/// </summary>
public readonly int WebSocketPort;
/// <summary>
/// 内部网络端口
/// </summary>
public readonly int InnerNetPort;
/// <summary>
/// 外部网络端口<br/>0表示不开启
/// </summary>
public readonly int OuterNetPort;
/// <summary>
/// 内部网络地址(内网地址)
/// </summary>
public readonly string InnerHost;
/// <summary>
/// 定时器时间间隔
/// </summary>
public readonly int OnTime;
public const int __ID__ = -1552158716;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "NodeId:" + NodeId + ","
+ "NodeNum:" + NodeNum + ","
+ "ServerName:" + ServerName + ","
+ "MaxVer:" + MaxVer + ","
+ "MinVer:" + MinVer + ","
+ "MaxCVer:" + MaxCVer + ","
+ "MinCVer:" + MinCVer + ","
+ "WebSocketPort:" + WebSocketPort + ","
+ "InnerNetPort:" + InnerNetPort + ","
+ "OuterNetPort:" + OuterNetPort + ","
+ "InnerHost:" + InnerHost + ","
+ "onTime:" + OnTime + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class NodeConfigCategory : ConfigSingleton<NodeConfigCategory>
{
public const string TableName = Tables.NodeConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, NodeConfig> _dataMap;
private readonly System.Collections.Generic.List<NodeConfig> _dataList;
public NodeConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, NodeConfig>();
_dataList = new System.Collections.Generic.List<NodeConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<NodeConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
NodeConfig _v;
_v = NodeConfig.DeserializeNodeConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, NodeConfig> DataMap => _dataMap;
public System.Collections.Generic.List<NodeConfig> DataList => _dataList;
public NodeConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public NodeConfig Get(int key) => _dataMap[key];
public NodeConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class PDKGameConfig : Luban.BeanBase
{
public PDKGameConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Value = _buf.ReadByte();
}
public static PDKGameConfig DeserializePDKGameConfig(ByteBuf _buf)
{
return new PDKGameConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 配置值
/// </summary>
public readonly byte Value;
public const int __ID__ = -1278693877;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Value + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class PDKGameConfigCategory : ConfigSingleton<PDKGameConfigCategory>
{
public const string TableName = Tables.PDKGameConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, PDKGameConfig> _dataMap;
private readonly System.Collections.Generic.List<PDKGameConfig> _dataList;
public PDKGameConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, PDKGameConfig>();
_dataList = new System.Collections.Generic.List<PDKGameConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<PDKGameConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
PDKGameConfig _v;
_v = PDKGameConfig.DeserializePDKGameConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, PDKGameConfig> DataMap => _dataMap;
public System.Collections.Generic.List<PDKGameConfig> DataList => _dataList;
public PDKGameConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public PDKGameConfig Get(int key) => _dataMap[key];
public PDKGameConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class PXMJGameConfig : Luban.BeanBase
{
public PXMJGameConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Value = _buf.ReadByte();
}
public static PXMJGameConfig DeserializePXMJGameConfig(ByteBuf _buf)
{
return new PXMJGameConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 配置值
/// </summary>
public readonly byte Value;
public const int __ID__ = 1837760857;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Value + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class PXMJGameConfigCategory : ConfigSingleton<PXMJGameConfigCategory>
{
public const string TableName = Tables.PXMJGameConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, PXMJGameConfig> _dataMap;
private readonly System.Collections.Generic.List<PXMJGameConfig> _dataList;
public PXMJGameConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, PXMJGameConfig>();
_dataList = new System.Collections.Generic.List<PXMJGameConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<PXMJGameConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
PXMJGameConfig _v;
_v = PXMJGameConfig.DeserializePXMJGameConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, PXMJGameConfig> DataMap => _dataMap;
public System.Collections.Generic.List<PXMJGameConfig> DataList => _dataList;
public PXMJGameConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public PXMJGameConfig Get(int key) => _dataMap[key];
public PXMJGameConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,47 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class PXMJTingConfig : Luban.BeanBase
{
public PXMJTingConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Value = new byte[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { byte __e0;__e0 = _buf.ReadByte(); Value[__index0] = __e0;}}
}
public static PXMJTingConfig DeserializePXMJTingConfig(ByteBuf _buf)
{
return new PXMJTingConfig(_buf);
}
public readonly int Id;
/// <summary>
/// 0
/// </summary>
public readonly byte[] Value;
public const int __ID__ = 1226169173;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Luban.StringUtil.CollectionToString(Value) + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class PXMJTingConfigCategory : ConfigSingleton<PXMJTingConfigCategory>
{
public const string TableName = Tables.PXMJTingConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, PXMJTingConfig> _dataMap;
private readonly System.Collections.Generic.List<PXMJTingConfig> _dataList;
public PXMJTingConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, PXMJTingConfig>();
_dataList = new System.Collections.Generic.List<PXMJTingConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<PXMJTingConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
PXMJTingConfig _v;
_v = PXMJTingConfig.DeserializePXMJTingConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, PXMJTingConfig> DataMap => _dataMap;
public System.Collections.Generic.List<PXMJTingConfig> DataList => _dataList;
public PXMJTingConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public PXMJTingConfig Get(int key) => _dataMap[key];
public PXMJTingConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,56 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class PrizeWheelConfig : Luban.BeanBase
{
public PrizeWheelConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Reward = ResData.DeserializeResData(_buf);
Weight = _buf.ReadInt();
}
public static PrizeWheelConfig DeserializePrizeWheelConfig(ByteBuf _buf)
{
return new PrizeWheelConfig(_buf);
}
/// <summary>
/// 资源ID(大于100000一定是道具)
/// </summary>
public readonly int Id;
/// <summary>
/// 资源名称
/// </summary>
public readonly ResData Reward;
/// <summary>
/// 权重
/// </summary>
public readonly int Weight;
public const int __ID__ = -185314517;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "reward:" + Reward + ","
+ "weight:" + Weight + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class PrizeWheelConfigCategory : ConfigSingleton<PrizeWheelConfigCategory>
{
public const string TableName = Tables.PrizeWheelConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, PrizeWheelConfig> _dataMap;
private readonly System.Collections.Generic.List<PrizeWheelConfig> _dataList;
public PrizeWheelConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, PrizeWheelConfig>();
_dataList = new System.Collections.Generic.List<PrizeWheelConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<PrizeWheelConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
PrizeWheelConfig _v;
_v = PrizeWheelConfig.DeserializePrizeWheelConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, PrizeWheelConfig> DataMap => _dataMap;
public System.Collections.Generic.List<PrizeWheelConfig> DataList => _dataList;
public PrizeWheelConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public PrizeWheelConfig Get(int key) => _dataMap[key];
public PrizeWheelConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

39
Config/Code/PropType.cs Normal file
View File

@ -0,0 +1,39 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Server.Config
{
public enum PropType
{
/// <summary>
/// 复活卡
/// </summary>
ReviveCard = 10004,
/// <summary>
/// 公会令
/// </summary>
ClubToken = 10005,
/// <summary>
/// 总公会令
/// </summary>
ClubSuperToken = 10006,
/// <summary>
/// 参赛券
/// </summary>
MatchCard = 10007,
/// <summary>
/// 计牌器
/// </summary>
HandTracker = 200000,
}
}

View File

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class QueueConfig : Luban.BeanBase
{
public QueueConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
GameId = _buf.ReadInt();
PlayerCnt = _buf.ReadInt();
MergeRobotProb = _buf.ReadFloat();
}
public static QueueConfig DeserializeQueueConfig(ByteBuf _buf)
{
return new QueueConfig(_buf);
}
/// <summary>
/// ID
/// </summary>
public readonly int Id;
/// <summary>
/// 服务器游戏id
/// </summary>
public readonly int GameId;
/// <summary>
/// 真人数量
/// </summary>
public readonly int PlayerCnt;
/// <summary>
/// 强制排队的概率<br/>(排机器人)
/// </summary>
public readonly float MergeRobotProb;
public const int __ID__ = 307257235;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "gameId:" + GameId + ","
+ "playerCnt:" + PlayerCnt + ","
+ "mergeRobotProb:" + MergeRobotProb + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class QueueConfigCategory : ConfigSingleton<QueueConfigCategory>
{
public const string TableName = Tables.QueueConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, QueueConfig> _dataMap;
private readonly System.Collections.Generic.List<QueueConfig> _dataList;
public QueueConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, QueueConfig>();
_dataList = new System.Collections.Generic.List<QueueConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<QueueConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
QueueConfig _v;
_v = QueueConfig.DeserializeQueueConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, QueueConfig> DataMap => _dataMap;
public System.Collections.Generic.List<QueueConfig> DataList => _dataList;
public QueueConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public QueueConfig Get(int key) => _dataMap[key];
public QueueConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,74 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class RabbitConfig : Luban.BeanBase
{
public RabbitConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Port = _buf.ReadInt();
Host = _buf.ReadString();
UserName = _buf.ReadString();
Pwd = _buf.ReadString();
Vhost = _buf.ReadString();
}
public static RabbitConfig DeserializeRabbitConfig(ByteBuf _buf)
{
return new RabbitConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 端口
/// </summary>
public readonly int Port;
/// <summary>
/// 地址
/// </summary>
public readonly string Host;
/// <summary>
/// 用户名
/// </summary>
public readonly string UserName;
/// <summary>
/// 密码
/// </summary>
public readonly string Pwd;
/// <summary>
/// 项目名
/// </summary>
public readonly string Vhost;
public const int __ID__ = 875638812;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "port:" + Port + ","
+ "host:" + Host + ","
+ "userName:" + UserName + ","
+ "pwd:" + Pwd + ","
+ "vhost:" + Vhost + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class RabbitConfigCategory : ConfigSingleton<RabbitConfigCategory>
{
public const string TableName = Tables.RabbitConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, RabbitConfig> _dataMap;
private readonly System.Collections.Generic.List<RabbitConfig> _dataList;
public RabbitConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, RabbitConfig>();
_dataList = new System.Collections.Generic.List<RabbitConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<RabbitConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
RabbitConfig _v;
_v = RabbitConfig.DeserializeRabbitConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, RabbitConfig> DataMap => _dataMap;
public System.Collections.Generic.List<RabbitConfig> DataList => _dataList;
public RabbitConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public RabbitConfig Get(int key) => _dataMap[key];
public RabbitConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

63
Config/Code/RaceType.cs Normal file
View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Server.Config
{
public enum RaceType
{
/// <summary>
/// 金币场
/// </summary>
NoRace = 0,
/// <summary>
/// 普通比赛
/// </summary>
Common = 1,
/// <summary>
/// 大奖赛
/// </summary>
BigRace = 2,
/// <summary>
/// 电视选拔赛
/// </summary>
TvRace = 3,
/// <summary>
/// 每日冲榜赛
/// </summary>
DailyRanking = 4,
/// <summary>
/// 免费体验赛
/// </summary>
FreeExperience = 5,
/// <summary>
/// 地主挑战赛
/// </summary>
LandlordChallenge = 6,
/// <summary>
/// 二七王月赛
/// </summary>
MoonRace = 7,
/// <summary>
/// 二七王季赛
/// </summary>
SeasonRace = 8,
/// <summary>
/// 二七王年终赛
/// </summary>
YearRace = 9,
/// <summary>
/// 新年比赛
/// </summary>
NewYearRace = 10,
}
}

View File

@ -0,0 +1,68 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class RedisConfig : Luban.BeanBase
{
public RedisConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Name = _buf.ReadString();
ConnectTimeOut = _buf.ReadInt();
Port = _buf.ReadInt();
Host = _buf.ReadString();
}
public static RedisConfig DeserializeRedisConfig(ByteBuf _buf)
{
return new RedisConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 名称
/// </summary>
public readonly string Name;
/// <summary>
/// 超时时间(单位毫秒)
/// </summary>
public readonly int ConnectTimeOut;
/// <summary>
/// 端口
/// </summary>
public readonly int Port;
/// <summary>
/// 地址
/// </summary>
public readonly string Host;
public const int __ID__ = -731728771;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "name:" + Name + ","
+ "connectTimeOut:" + ConnectTimeOut + ","
+ "port:" + Port + ","
+ "host:" + Host + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class RedisConfigCategory : ConfigSingleton<RedisConfigCategory>
{
public const string TableName = Tables.RedisConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, RedisConfig> _dataMap;
private readonly System.Collections.Generic.List<RedisConfig> _dataList;
public RedisConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, RedisConfig>();
_dataList = new System.Collections.Generic.List<RedisConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<RedisConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
RedisConfig _v;
_v = RedisConfig.DeserializeRedisConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, RedisConfig> DataMap => _dataMap;
public System.Collections.Generic.List<RedisConfig> DataList => _dataList;
public RedisConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public RedisConfig Get(int key) => _dataMap[key];
public RedisConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

56
Config/Code/ResConfig.cs Normal file
View File

@ -0,0 +1,56 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class ResConfig : Luban.BeanBase
{
public ResConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Name = _buf.ReadString();
ResType = _buf.ReadInt();
}
public static ResConfig DeserializeResConfig(ByteBuf _buf)
{
return new ResConfig(_buf);
}
/// <summary>
/// 资源ID(大于100000一定是道具)
/// </summary>
public readonly int Id;
/// <summary>
/// 资源名称
/// </summary>
public readonly string Name;
/// <summary>
/// 1 (原始货币, 历史遗留问题)<br/>2 道具<br/>3 活动道具(限时)
/// </summary>
public readonly int ResType;
public const int __ID__ = -1244442654;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "name:" + Name + ","
+ "resType:" + ResType + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class ResConfigCategory : ConfigSingleton<ResConfigCategory>
{
public const string TableName = Tables.ResConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, ResConfig> _dataMap;
private readonly System.Collections.Generic.List<ResConfig> _dataList;
public ResConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, ResConfig>();
_dataList = new System.Collections.Generic.List<ResConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<ResConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
ResConfig _v;
_v = ResConfig.DeserializeResConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, ResConfig> DataMap => _dataMap;
public System.Collections.Generic.List<ResConfig> DataList => _dataList;
public ResConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public ResConfig Get(int key) => _dataMap[key];
public ResConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

44
Config/Code/ResData.cs Normal file
View File

@ -0,0 +1,44 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class ResData : Luban.BeanBase
{
public ResData(ByteBuf _buf)
{
Id = _buf.ReadInt();
Count = _buf.ReadLong();
}
public static ResData DeserializeResData(ByteBuf _buf)
{
return new ResData(_buf);
}
public readonly int Id;
public readonly long Count;
public const int __ID__ = -1534237622;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "count:" + Count + ","
+ "}";
}
}
}

View File

@ -0,0 +1,56 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class RouterConfig : Luban.BeanBase
{
public RouterConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Path = _buf.ReadString();
Port = _buf.ReadInt();
}
public static RouterConfig DeserializeRouterConfig(ByteBuf _buf)
{
return new RouterConfig(_buf);
}
/// <summary>
/// 对应节点Id
/// </summary>
public readonly int Id;
/// <summary>
/// 监听的路径
/// </summary>
public readonly string Path;
/// <summary>
/// 端口
/// </summary>
public readonly int Port;
public const int __ID__ = -576389109;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "path:" + Path + ","
+ "port:" + Port + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class RouterConfigCategory : ConfigSingleton<RouterConfigCategory>
{
public const string TableName = Tables.RouterConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, RouterConfig> _dataMap;
private readonly System.Collections.Generic.List<RouterConfig> _dataList;
public RouterConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, RouterConfig>();
_dataList = new System.Collections.Generic.List<RouterConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<RouterConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
RouterConfig _v;
_v = RouterConfig.DeserializeRouterConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, RouterConfig> DataMap => _dataMap;
public System.Collections.Generic.List<RouterConfig> DataList => _dataList;
public RouterConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public RouterConfig Get(int key) => _dataMap[key];
public RouterConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

62
Config/Code/SignConfig.cs Normal file
View File

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class SignConfig : Luban.BeanBase
{
public SignConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);SignData = new ResData[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { ResData __e0;__e0 = ResData.DeserializeResData(_buf); SignData[__index0] = __e0;}}
DataType = _buf.ReadInt();
RewardDay = _buf.ReadInt();
}
public static SignConfig DeserializeSignConfig(ByteBuf _buf)
{
return new SignConfig(_buf);
}
/// <summary>
/// 签到数据
/// </summary>
public readonly int Id;
/// <summary>
/// 资源名称
/// </summary>
public readonly ResData[] SignData;
/// <summary>
/// 1 签到<br/>2 礼包
/// </summary>
public readonly int DataType;
/// <summary>
/// 连续签到天数
/// </summary>
public readonly int RewardDay;
public const int __ID__ = 51128191;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "signData:" + Luban.StringUtil.CollectionToString(SignData) + ","
+ "dataType:" + DataType + ","
+ "rewardDay:" + RewardDay + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class SignConfigCategory : ConfigSingleton<SignConfigCategory>
{
public const string TableName = Tables.SignConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, SignConfig> _dataMap;
private readonly System.Collections.Generic.List<SignConfig> _dataList;
public SignConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, SignConfig>();
_dataList = new System.Collections.Generic.List<SignConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<SignConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
SignConfig _v;
_v = SignConfig.DeserializeSignConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, SignConfig> DataMap => _dataMap;
public System.Collections.Generic.List<SignConfig> DataList => _dataList;
public SignConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public SignConfig Get(int key) => _dataMap[key];
public SignConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

74
Config/Code/SqlConfig.cs Normal file
View File

@ -0,0 +1,74 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class SqlConfig : Luban.BeanBase
{
public SqlConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Port = _buf.ReadInt();
Host = _buf.ReadString();
UserName = _buf.ReadString();
Pwd = _buf.ReadString();
CacheCount = _buf.ReadInt();
}
public static SqlConfig DeserializeSqlConfig(ByteBuf _buf)
{
return new SqlConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 端口
/// </summary>
public readonly int Port;
/// <summary>
/// 地址
/// </summary>
public readonly string Host;
/// <summary>
/// 用户名
/// </summary>
public readonly string UserName;
/// <summary>
/// 密码
/// </summary>
public readonly string Pwd;
/// <summary>
/// 缓存链接数
/// </summary>
public readonly int CacheCount;
public const int __ID__ = -1235600752;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "port:" + Port + ","
+ "host:" + Host + ","
+ "userName:" + UserName + ","
+ "pwd:" + Pwd + ","
+ "cacheCount:" + CacheCount + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class SqlConfigCategory : ConfigSingleton<SqlConfigCategory>
{
public const string TableName = Tables.SqlConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, SqlConfig> _dataMap;
private readonly System.Collections.Generic.List<SqlConfig> _dataList;
public SqlConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, SqlConfig>();
_dataList = new System.Collections.Generic.List<SqlConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<SqlConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
SqlConfig _v;
_v = SqlConfig.DeserializeSqlConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, SqlConfig> DataMap => _dataMap;
public System.Collections.Generic.List<SqlConfig> DataList => _dataList;
public SqlConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public SqlConfig Get(int key) => _dataMap[key];
public SqlConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

100
Config/Code/Tables.cs Normal file
View File

@ -0,0 +1,100 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
using System.Collections;
using System.Collections.Generic;
namespace Server.Config
{
public partial class Tables
{
public const string SqlConfigCategory = "sqlconfigcategory";
public const string RabbitConfigCategory = "rabbitconfigcategory";
public const string RedisConfigCategory = "redisconfigcategory";
public const string NodeConfigCategory = "nodeconfigcategory";
public const string HttpConfigCategory = "httpconfigcategory";
public const string RouterConfigCategory = "routerconfigcategory";
public const string XYMJGameConfigCategory = "xymjgameconfigcategory";
public const string XYMJTingConfigCategory = "xymjtingconfigcategory";
public const string PXMJGameConfigCategory = "pxmjgameconfigcategory";
public const string PXMJTingConfigCategory = "pxmjtingconfigcategory";
public const string JAMJGameConfigCategory = "jamjgameconfigcategory";
public const string JAMJTingConfigCategory = "jamjtingconfigcategory";
public const string GZMJGameConfigCategory = "gzmjgameconfigcategory";
public const string GZMJTingConfigCategory = "gzmjtingconfigcategory";
public const string FZMJGameConfigCategory = "fzmjgameconfigcategory";
public const string FZMJTingConfigCategory = "fzmjtingconfigcategory";
public const string NCMJGameConfigCategory = "ncmjgameconfigcategory";
public const string NCMJTingConfigCategory = "ncmjtingconfigcategory";
public const string GZGameConfigCategory = "gzgameconfigcategory";
public const string WLGameConfigCategory = "wlgameconfigcategory";
public const string LPLFGameConfigCategory = "lplfgameconfigcategory";
public const string PDKGameConfigCategory = "pdkgameconfigcategory";
public const string NCSTGameConfigCategory = "ncstgameconfigcategory";
public const string QueueConfigCategory = "queueconfigcategory";
public const string ConstConfigCategory = "constconfigcategory";
public const string GameConfigCategory = "gameconfigcategory";
public const string TingConfigCategory = "tingconfigcategory";
public const string VersionConfigCategory = "versionconfigcategory";
public const string CastlesConfigCategory = "castlesconfigcategory";
public const string SignConfigCategory = "signconfigcategory";
public const string ResConfigCategory = "resconfigcategory";
public const string PrizeWheelConfigCategory = "prizewheelconfigcategory";
public const string DiamondMallConfigCategory = "diamondmallconfigcategory";
public const string ExchangeMallConfigCategory = "exchangemallconfigcategory";
public const string EntityExchangeMallCategory = "entityexchangemallcategory";
private static readonly string[] tables = new[]
{
SqlConfigCategory,
RabbitConfigCategory,
RedisConfigCategory,
NodeConfigCategory,
HttpConfigCategory,
RouterConfigCategory,
XYMJGameConfigCategory,
XYMJTingConfigCategory,
PXMJGameConfigCategory,
PXMJTingConfigCategory,
JAMJGameConfigCategory,
JAMJTingConfigCategory,
GZMJGameConfigCategory,
GZMJTingConfigCategory,
FZMJGameConfigCategory,
FZMJTingConfigCategory,
NCMJGameConfigCategory,
NCMJTingConfigCategory,
GZGameConfigCategory,
WLGameConfigCategory,
LPLFGameConfigCategory,
PDKGameConfigCategory,
NCSTGameConfigCategory,
QueueConfigCategory,
ConstConfigCategory,
GameConfigCategory,
TingConfigCategory,
VersionConfigCategory,
CastlesConfigCategory,
SignConfigCategory,
ResConfigCategory,
PrizeWheelConfigCategory,
DiamondMallConfigCategory,
ExchangeMallConfigCategory,
EntityExchangeMallCategory,
};
public IEnumerable GetTabels()
{
return tables;
}
}
}

View File

@ -0,0 +1,43 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Server.Config
{
public enum TimeRankType
{
/// <summary>
/// 日榜
/// </summary>
Day = 1,
/// <summary>
/// 月榜
/// </summary>
Month = 2,
/// <summary>
/// 年榜
/// </summary>
Year = 3,
/// <summary>
/// 季傍
/// </summary>
Quarter = 4,
/// <summary>
/// 周榜
/// </summary>
Week = 5,
/// <summary>
/// 冲榜
/// </summary>
ChongBang = 99,
}
}

92
Config/Code/TingConfig.cs Normal file
View File

@ -0,0 +1,92 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class TingConfig : Luban.BeanBase
{
public TingConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
GameId = _buf.ReadInt();
TingId = _buf.ReadInt();
TingName = _buf.ReadString();
MinPlayerCnt = _buf.ReadInt();
MaxPlayerCnt = _buf.ReadInt();
DeskMaxRobotCnt = _buf.ReadInt();
DeskCnt = _buf.ReadInt();
QueueName = _buf.ReadString();
}
public static TingConfig DeserializeTingConfig(ByteBuf _buf)
{
return new TingConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 服务器Id
/// </summary>
public readonly int GameId;
/// <summary>
/// 厅Id
/// </summary>
public readonly int TingId;
/// <summary>
/// 厅名称
/// </summary>
public readonly string TingName;
/// <summary>
/// 最小开战人数
/// </summary>
public readonly int MinPlayerCnt;
/// <summary>
/// 最大开战人数
/// </summary>
public readonly int MaxPlayerCnt;
/// <summary>
/// 桌上机器人最大数量
/// </summary>
public readonly int DeskMaxRobotCnt;
/// <summary>
/// 桌子数量<br/>0表示自动创建<br/>1表示固定创建
/// </summary>
public readonly int DeskCnt;
/// <summary>
/// 排队器名称
/// </summary>
public readonly string QueueName;
public const int __ID__ = 1546793968;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "gameId:" + GameId + ","
+ "tingId:" + TingId + ","
+ "tingName:" + TingName + ","
+ "minPlayerCnt:" + MinPlayerCnt + ","
+ "maxPlayerCnt:" + MaxPlayerCnt + ","
+ "deskMaxRobotCnt:" + DeskMaxRobotCnt + ","
+ "deskCnt:" + DeskCnt + ","
+ "queueName:" + QueueName + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class TingConfigCategory : ConfigSingleton<TingConfigCategory>
{
public const string TableName = Tables.TingConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, TingConfig> _dataMap;
private readonly System.Collections.Generic.List<TingConfig> _dataList;
public TingConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, TingConfig>();
_dataList = new System.Collections.Generic.List<TingConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<TingConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
TingConfig _v;
_v = TingConfig.DeserializeTingConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, TingConfig> DataMap => _dataMap;
public System.Collections.Generic.List<TingConfig> DataList => _dataList;
public TingConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public TingConfig Get(int key) => _dataMap[key];
public TingConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,209 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class VersionConfig : Luban.BeanBase
{
public VersionConfig(ByteBuf _buf)
{
CVersion48 = _buf.ReadInt();
CVersion49Prop = _buf.ReadInt();
CVersion50 = _buf.ReadInt();
CVersion51 = _buf.ReadInt();
CVersion52 = _buf.ReadInt();
CVersion53 = _buf.ReadInt();
CVersion54 = _buf.ReadInt();
CVersion55 = _buf.ReadInt();
CVersion56 = _buf.ReadInt();
CVersion57 = _buf.ReadInt();
CVersion58 = _buf.ReadInt();
CVersion59 = _buf.ReadInt();
CVersion60 = _buf.ReadInt();
CVersion61 = _buf.ReadInt();
CVersion62 = _buf.ReadInt();
CVersion63 = _buf.ReadInt();
CVersion64 = _buf.ReadInt();
CVersion65 = _buf.ReadInt();
CVersion66 = _buf.ReadInt();
CVersion67 = _buf.ReadInt();
CVersion68 = _buf.ReadInt();
CVersion69 = _buf.ReadInt();
CVersion70 = _buf.ReadInt();
CVersion71 = _buf.ReadInt();
CVersion72 = _buf.ReadInt();
CVersion73 = _buf.ReadInt();
CVersion74 = _buf.ReadInt();
CVersion75 = _buf.ReadInt();
CVersion76 = _buf.ReadInt();
CVersion77 = _buf.ReadInt();
CVersion78 = _buf.ReadInt();
CVersion79 = _buf.ReadInt();
CVersion80 = _buf.ReadInt();
CVersion81 = _buf.ReadInt();
CVersion82 = _buf.ReadInt();
CVersion83 = _buf.ReadInt();
CVersion84 = _buf.ReadInt();
CVersion85 = _buf.ReadInt();
CVersion86 = _buf.ReadInt();
CVersion87 = _buf.ReadInt();
CVersion88 = _buf.ReadInt();
CVersion89 = _buf.ReadInt();
CVersion90 = _buf.ReadInt();
CVersion91 = _buf.ReadInt();
CVersion92 = _buf.ReadInt();
CVersion93 = _buf.ReadInt();
CVersion94 = _buf.ReadInt();
CVersion95 = _buf.ReadInt();
CVersion96 = _buf.ReadInt();
CVersion97 = _buf.ReadInt();
CVersion98 = _buf.ReadInt();
CVersion99 = _buf.ReadInt();
CVersion100 = _buf.ReadInt();
}
public static VersionConfig DeserializeVersionConfig(ByteBuf _buf)
{
return new VersionConfig(_buf);
}
/// <summary>
/// 城堡由3个合并成一个真实房间
/// </summary>
public readonly int CVersion48;
/// <summary>
/// 道具系统改版
/// </summary>
public readonly int CVersion49Prop;
/// <summary>
/// 签到,转盘,救济金修改
/// </summary>
public readonly int CVersion50;
/// <summary>
/// 登录时主动发送建材比赛的协议
/// </summary>
public readonly int CVersion51;
public readonly int CVersion52;
public readonly int CVersion53;
public readonly int CVersion54;
public readonly int CVersion55;
public readonly int CVersion56;
public readonly int CVersion57;
public readonly int CVersion58;
public readonly int CVersion59;
public readonly int CVersion60;
public readonly int CVersion61;
public readonly int CVersion62;
public readonly int CVersion63;
public readonly int CVersion64;
public readonly int CVersion65;
public readonly int CVersion66;
public readonly int CVersion67;
public readonly int CVersion68;
public readonly int CVersion69;
public readonly int CVersion70;
public readonly int CVersion71;
public readonly int CVersion72;
public readonly int CVersion73;
public readonly int CVersion74;
public readonly int CVersion75;
public readonly int CVersion76;
public readonly int CVersion77;
public readonly int CVersion78;
public readonly int CVersion79;
public readonly int CVersion80;
public readonly int CVersion81;
public readonly int CVersion82;
public readonly int CVersion83;
public readonly int CVersion84;
public readonly int CVersion85;
public readonly int CVersion86;
public readonly int CVersion87;
public readonly int CVersion88;
public readonly int CVersion89;
public readonly int CVersion90;
public readonly int CVersion91;
public readonly int CVersion92;
public readonly int CVersion93;
public readonly int CVersion94;
public readonly int CVersion95;
public readonly int CVersion96;
public readonly int CVersion97;
public readonly int CVersion98;
public readonly int CVersion99;
public readonly int CVersion100;
public const int __ID__ = 1110817306;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "CVersion48:" + CVersion48 + ","
+ "CVersion49Prop:" + CVersion49Prop + ","
+ "CVersion50:" + CVersion50 + ","
+ "CVersion51:" + CVersion51 + ","
+ "CVersion52:" + CVersion52 + ","
+ "CVersion53:" + CVersion53 + ","
+ "CVersion54:" + CVersion54 + ","
+ "CVersion55:" + CVersion55 + ","
+ "CVersion56:" + CVersion56 + ","
+ "CVersion57:" + CVersion57 + ","
+ "CVersion58:" + CVersion58 + ","
+ "CVersion59:" + CVersion59 + ","
+ "CVersion60:" + CVersion60 + ","
+ "CVersion61:" + CVersion61 + ","
+ "CVersion62:" + CVersion62 + ","
+ "CVersion63:" + CVersion63 + ","
+ "CVersion64:" + CVersion64 + ","
+ "CVersion65:" + CVersion65 + ","
+ "CVersion66:" + CVersion66 + ","
+ "CVersion67:" + CVersion67 + ","
+ "CVersion68:" + CVersion68 + ","
+ "CVersion69:" + CVersion69 + ","
+ "CVersion70:" + CVersion70 + ","
+ "CVersion71:" + CVersion71 + ","
+ "CVersion72:" + CVersion72 + ","
+ "CVersion73:" + CVersion73 + ","
+ "CVersion74:" + CVersion74 + ","
+ "CVersion75:" + CVersion75 + ","
+ "CVersion76:" + CVersion76 + ","
+ "CVersion77:" + CVersion77 + ","
+ "CVersion78:" + CVersion78 + ","
+ "CVersion79:" + CVersion79 + ","
+ "CVersion80:" + CVersion80 + ","
+ "CVersion81:" + CVersion81 + ","
+ "CVersion82:" + CVersion82 + ","
+ "CVersion83:" + CVersion83 + ","
+ "CVersion84:" + CVersion84 + ","
+ "CVersion85:" + CVersion85 + ","
+ "CVersion86:" + CVersion86 + ","
+ "CVersion87:" + CVersion87 + ","
+ "CVersion88:" + CVersion88 + ","
+ "CVersion89:" + CVersion89 + ","
+ "CVersion90:" + CVersion90 + ","
+ "CVersion91:" + CVersion91 + ","
+ "CVersion92:" + CVersion92 + ","
+ "CVersion93:" + CVersion93 + ","
+ "CVersion94:" + CVersion94 + ","
+ "CVersion95:" + CVersion95 + ","
+ "CVersion96:" + CVersion96 + ","
+ "CVersion97:" + CVersion97 + ","
+ "CVersion98:" + CVersion98 + ","
+ "CVersion99:" + CVersion99 + ","
+ "CVersion100:" + CVersion100 + ","
+ "}";
}
}
}

View File

@ -0,0 +1,115 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class VersionConfigCategory : ConfigSingleton<VersionConfigCategory>
{
public const string TableName = Tables.VersionConfigCategory;
private VersionConfig _data;
public VersionConfig Data => _data;
public VersionConfigCategory()
{
this.ReLoadData();
}
public sealed override void ReLoadData()
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
protected sealed override void LoadData(ByteBuf _buf)
{
int n = _buf.ReadSize();
if (n != 1) throw new SerializationException("table mode=one, but size != 1");
_data = VersionConfig.DeserializeVersionConfig(_buf);
PostInit();
}
/// <summary>
/// 城堡由3个合并成一个真实房间
/// </summary>
public int CVersion48 => _data.CVersion48;
/// <summary>
/// 道具系统改版
/// </summary>
public int CVersion49Prop => _data.CVersion49Prop;
/// <summary>
/// 签到,转盘,救济金修改
/// </summary>
public int CVersion50 => _data.CVersion50;
/// <summary>
/// 登录时主动发送建材比赛的协议
/// </summary>
public int CVersion51 => _data.CVersion51;
public int CVersion52 => _data.CVersion52;
public int CVersion53 => _data.CVersion53;
public int CVersion54 => _data.CVersion54;
public int CVersion55 => _data.CVersion55;
public int CVersion56 => _data.CVersion56;
public int CVersion57 => _data.CVersion57;
public int CVersion58 => _data.CVersion58;
public int CVersion59 => _data.CVersion59;
public int CVersion60 => _data.CVersion60;
public int CVersion61 => _data.CVersion61;
public int CVersion62 => _data.CVersion62;
public int CVersion63 => _data.CVersion63;
public int CVersion64 => _data.CVersion64;
public int CVersion65 => _data.CVersion65;
public int CVersion66 => _data.CVersion66;
public int CVersion67 => _data.CVersion67;
public int CVersion68 => _data.CVersion68;
public int CVersion69 => _data.CVersion69;
public int CVersion70 => _data.CVersion70;
public int CVersion71 => _data.CVersion71;
public int CVersion72 => _data.CVersion72;
public int CVersion73 => _data.CVersion73;
public int CVersion74 => _data.CVersion74;
public int CVersion75 => _data.CVersion75;
public int CVersion76 => _data.CVersion76;
public int CVersion77 => _data.CVersion77;
public int CVersion78 => _data.CVersion78;
public int CVersion79 => _data.CVersion79;
public int CVersion80 => _data.CVersion80;
public int CVersion81 => _data.CVersion81;
public int CVersion82 => _data.CVersion82;
public int CVersion83 => _data.CVersion83;
public int CVersion84 => _data.CVersion84;
public int CVersion85 => _data.CVersion85;
public int CVersion86 => _data.CVersion86;
public int CVersion87 => _data.CVersion87;
public int CVersion88 => _data.CVersion88;
public int CVersion89 => _data.CVersion89;
public int CVersion90 => _data.CVersion90;
public int CVersion91 => _data.CVersion91;
public int CVersion92 => _data.CVersion92;
public int CVersion93 => _data.CVersion93;
public int CVersion94 => _data.CVersion94;
public int CVersion95 => _data.CVersion95;
public int CVersion96 => _data.CVersion96;
public int CVersion97 => _data.CVersion97;
public int CVersion98 => _data.CVersion98;
public int CVersion99 => _data.CVersion99;
public int CVersion100 => _data.CVersion100;
partial void PostInit();
}
}

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class WLGameConfig : Luban.BeanBase
{
public WLGameConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Value = _buf.ReadByte();
}
public static WLGameConfig DeserializeWLGameConfig(ByteBuf _buf)
{
return new WLGameConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 配置值
/// </summary>
public readonly byte Value;
public const int __ID__ = 1374330505;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Value + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class WLGameConfigCategory : ConfigSingleton<WLGameConfigCategory>
{
public const string TableName = Tables.WLGameConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, WLGameConfig> _dataMap;
private readonly System.Collections.Generic.List<WLGameConfig> _dataList;
public WLGameConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, WLGameConfig>();
_dataList = new System.Collections.Generic.List<WLGameConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<WLGameConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
WLGameConfig _v;
_v = WLGameConfig.DeserializeWLGameConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, WLGameConfig> DataMap => _dataMap;
public System.Collections.Generic.List<WLGameConfig> DataList => _dataList;
public WLGameConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public WLGameConfig Get(int key) => _dataMap[key];
public WLGameConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class XYMJGameConfig : Luban.BeanBase
{
public XYMJGameConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
Value = _buf.ReadByte();
}
public static XYMJGameConfig DeserializeXYMJGameConfig(ByteBuf _buf)
{
return new XYMJGameConfig(_buf);
}
/// <summary>
/// id
/// </summary>
public readonly int Id;
/// <summary>
/// 配置值
/// </summary>
public readonly byte Value;
public const int __ID__ = 1794856146;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Value + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class XYMJGameConfigCategory : ConfigSingleton<XYMJGameConfigCategory>
{
public const string TableName = Tables.XYMJGameConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, XYMJGameConfig> _dataMap;
private readonly System.Collections.Generic.List<XYMJGameConfig> _dataList;
public XYMJGameConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, XYMJGameConfig>();
_dataList = new System.Collections.Generic.List<XYMJGameConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<XYMJGameConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
XYMJGameConfig _v;
_v = XYMJGameConfig.DeserializeXYMJGameConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, XYMJGameConfig> DataMap => _dataMap;
public System.Collections.Generic.List<XYMJGameConfig> DataList => _dataList;
public XYMJGameConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public XYMJGameConfig Get(int key) => _dataMap[key];
public XYMJGameConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}

View File

@ -0,0 +1,47 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public sealed partial class XYMJTingConfig : Luban.BeanBase
{
public XYMJTingConfig(ByteBuf _buf)
{
Id = _buf.ReadInt();
{int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Value = new byte[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { byte __e0;__e0 = _buf.ReadByte(); Value[__index0] = __e0;}}
}
public static XYMJTingConfig DeserializeXYMJTingConfig(ByteBuf _buf)
{
return new XYMJTingConfig(_buf);
}
public readonly int Id;
/// <summary>
/// 0
/// </summary>
public readonly byte[] Value;
public const int __ID__ = 1183264462;
public override int GetTypeId() => __ID__;
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "value:" + Luban.StringUtil.CollectionToString(Value) + ","
+ "}";
}
}
}

View File

@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Luban;
namespace Server.Config
{
public partial class XYMJTingConfigCategory : ConfigSingleton<XYMJTingConfigCategory>
{
public const string TableName = Tables.XYMJTingConfigCategory;
private readonly System.Collections.Generic.Dictionary<int, XYMJTingConfig> _dataMap;
private readonly System.Collections.Generic.List<XYMJTingConfig> _dataList;
public XYMJTingConfigCategory()
{
_dataMap = new System.Collections.Generic.Dictionary<int, XYMJTingConfig>();
_dataList = new System.Collections.Generic.List<XYMJTingConfig>();
this.ReLoadData();
}
public sealed override void ReLoadData()
{
// 备份旧数据,以便加载失败时回滚
var oldDataList = new System.Collections.Generic.List<XYMJTingConfig>(_dataList);
_dataMap.Clear();
_dataList.Clear();
try
{
byte[] data = TableManager.Instance.GetTableData(TableName);
LoadData(new ByteBuf(data));
}
catch
{
// 加载失败,回滚到旧数据
_dataMap.Clear();
_dataList.Clear();
foreach (var item in oldDataList)
{
_dataList.Add(item);
_dataMap.Add(item.Id, item);
}
throw;
}
}
protected sealed override void LoadData(ByteBuf _buf)
{
for(int n = _buf.ReadSize() ; n > 0 ; --n)
{
XYMJTingConfig _v;
_v = XYMJTingConfig.DeserializeXYMJTingConfig(_buf);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public System.Collections.Generic.Dictionary<int, XYMJTingConfig> DataMap => _dataMap;
public System.Collections.Generic.List<XYMJTingConfig> DataList => _dataList;
public XYMJTingConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public XYMJTingConfig Get(int key) => _dataMap[key];
public XYMJTingConfig this[int key] => _dataMap[key];
public bool Contain(int key) => _dataMap.ContainsKey(key);
partial void PostInit();
}
}