diff --git a/Config/Json/Server/WorldConfigData.Json b/Config/Json/Server/WorldConfigData.Json index 60dd090..580dfa9 100644 --- a/Config/Json/Server/WorldConfigData.Json +++ b/Config/Json/Server/WorldConfigData.Json @@ -1,3 +1,3 @@ {"List":[ -{"Id":1,"WorldName":"测试服","DbConnection":null,"DbName":"fantasy_main","DbType":"MongoDB"} +{"Id":1,"WorldName":"测试服","DbConnection":"mongodb://127.0.0.1","DbName":"fantasy_main","DbType":"MongoDB"} ]} diff --git a/Entity/Entity.csproj b/Entity/Entity.csproj index ecb0c64..7011de8 100644 --- a/Entity/Entity.csproj +++ b/Entity/Entity.csproj @@ -2,7 +2,7 @@ enable - enable + disable Linux default net9.0 diff --git a/Entity/Model/DB/Members/ActivityInfo.cs b/Entity/Model/DB/Members/ActivityInfo.cs new file mode 100644 index 0000000..23b7f3a --- /dev/null +++ b/Entity/Model/DB/Members/ActivityInfo.cs @@ -0,0 +1,7 @@ +using Fantasy.Entitas; + +namespace Fantasy; + +public class Activity : Entity +{ +} \ No newline at end of file diff --git a/Entity/Model/DB/Members/BasicInfo.cs b/Entity/Model/DB/Members/BasicInfo.cs new file mode 100644 index 0000000..787dabb --- /dev/null +++ b/Entity/Model/DB/Members/BasicInfo.cs @@ -0,0 +1,31 @@ +using Fantasy.Entitas; + +namespace Fantasy; + +public class BasicInfo : Entity +{ + /// + /// 昵称 + /// + public string NickName; + + /// + /// 头像 + /// + public string Head; + + /// + /// 国家 + /// + public string Country; + + /// + /// 等级 + /// + public int Level; + + /// + /// 当前经验 + /// + public int Exp; +} \ No newline at end of file diff --git a/Entity/Model/DB/Members/Currency.cs b/Entity/Model/DB/Members/Currency.cs new file mode 100644 index 0000000..c157bc4 --- /dev/null +++ b/Entity/Model/DB/Members/Currency.cs @@ -0,0 +1,16 @@ +using Fantasy.Entitas; + +namespace Fantasy; + +public class Currency : Entity +{ + /// + /// 配置id + /// + public int ConfigId; + + /// + /// 拥有的数量 + /// + public int Count; +} \ No newline at end of file diff --git a/Entity/Model/DB/Members/DayFlags.cs b/Entity/Model/DB/Members/DayFlags.cs new file mode 100644 index 0000000..6f3055e --- /dev/null +++ b/Entity/Model/DB/Members/DayFlags.cs @@ -0,0 +1,5 @@ +namespace Fantasy; + +public class DayFlags +{ +} \ No newline at end of file diff --git a/Entity/Model/DB/Members/Fish.cs b/Entity/Model/DB/Members/Fish.cs new file mode 100644 index 0000000..afb0ff6 --- /dev/null +++ b/Entity/Model/DB/Members/Fish.cs @@ -0,0 +1,7 @@ +using Fantasy.Entitas; + +namespace Fantasy; + +public class Fish : Entity +{ +} \ No newline at end of file diff --git a/Entity/Model/DB/Members/GamingInfo.cs b/Entity/Model/DB/Members/GamingInfo.cs new file mode 100644 index 0000000..0b00b33 --- /dev/null +++ b/Entity/Model/DB/Members/GamingInfo.cs @@ -0,0 +1,21 @@ +using Fantasy.Entitas; + +namespace Fantasy; + +public class GamingInfo : Entity +{ + /// + /// 地图 + /// + public int Map; + + /// + /// 位置 + /// + public int Pos; + + /// + /// 进入时间 + /// + public int Time; +} \ No newline at end of file diff --git a/Entity/Model/DB/Members/Guide.cs b/Entity/Model/DB/Members/Guide.cs new file mode 100644 index 0000000..8f0220a --- /dev/null +++ b/Entity/Model/DB/Members/Guide.cs @@ -0,0 +1,26 @@ +using Fantasy.Entitas; + +namespace Fantasy; + +public class Guide : Entity +{ + /// + /// 排序 + /// + public int Sort; + + /// + /// 配置id + /// + public int ConfigId; + + /// + /// 步骤 + /// + public int Step; + + /// + /// 触发时间 + /// + public long GetTime; +} \ No newline at end of file diff --git a/Entity/Model/DB/Members/Item.cs b/Entity/Model/DB/Members/Item.cs new file mode 100644 index 0000000..ccdb841 --- /dev/null +++ b/Entity/Model/DB/Members/Item.cs @@ -0,0 +1,21 @@ +using Fantasy.Entitas; + +namespace Fantasy; + +public class Item : Entity +{ + /// + /// 配置id + /// + public int ConfigId; + + /// + /// 拥有的数量 + /// + public int Count; + + /// + /// 耐久度 + /// + public int Durability; +} \ No newline at end of file diff --git a/Entity/Model/DB/Members/MapMatter.cs b/Entity/Model/DB/Members/MapMatter.cs new file mode 100644 index 0000000..58beb5b --- /dev/null +++ b/Entity/Model/DB/Members/MapMatter.cs @@ -0,0 +1,7 @@ +using Fantasy.Entitas; + +namespace Fantasy; + +public class MapMatter : Entity +{ +} \ No newline at end of file diff --git a/Entity/Model/DB/Members/MissionInfo.cs b/Entity/Model/DB/Members/MissionInfo.cs new file mode 100644 index 0000000..d8e59ef --- /dev/null +++ b/Entity/Model/DB/Members/MissionInfo.cs @@ -0,0 +1,7 @@ +using Fantasy.Entitas; + +namespace Fantasy; + +public class Mission : Entity +{ +} \ No newline at end of file diff --git a/Entity/Model/DB/Members/Skill.cs b/Entity/Model/DB/Members/Skill.cs new file mode 100644 index 0000000..db1c645 --- /dev/null +++ b/Entity/Model/DB/Members/Skill.cs @@ -0,0 +1,7 @@ +using Fantasy.Entitas; + +namespace Fantasy; + +public class Skill : Entity +{ +} \ No newline at end of file diff --git a/Entity/Model/DB/Members/UserStatisticsInfo.cs b/Entity/Model/DB/Members/UserStatisticsInfo.cs new file mode 100644 index 0000000..7ea946d --- /dev/null +++ b/Entity/Model/DB/Members/UserStatisticsInfo.cs @@ -0,0 +1,28 @@ +using Fantasy.Entitas; + +namespace Fantasy; + +public class UserStatisticsInfo : Entity +{ + /// + /// 登录次数 + /// + public uint LoginCount; + + /// + /// 最后登录时间 + /// + public long LoginTime; + + /// + /// 在线时间 + /// + public long OnlineTime; + + /// + /// 账号创建时间 + /// + public long CreateTime; + + public int FishCount; +} \ No newline at end of file diff --git a/Entity/Model/DB/UserInfo.cs b/Entity/Model/DB/UserInfo.cs index 9a02c91..a29d331 100644 --- a/Entity/Model/DB/UserInfo.cs +++ b/Entity/Model/DB/UserInfo.cs @@ -5,12 +5,62 @@ namespace Fantasy; public class UserInfo : Entity { /// - /// 昵称 + /// 基础信息 /// - public string NickName { get; set; } - + public BasicInfo BasicInfo; + /// - /// 余额 + /// 统计信息 /// - public long Money { get; set; } + public UserStatisticsInfo Statistics; + + /// + /// 游戏信息 + /// + public GamingInfo GamingInfo; + + /// + /// 货币信息 + /// + public List Currency; + + /// + /// 拥有的物品 + /// + public List Items; + + /// + /// 鱼护 + /// + public List Fishes; + + /// + /// 参与的活动 + /// + public List Activity; + + /// + /// 任务列表 + /// + public List Missions; + + /// + /// 账号标识 + /// + public DayFlags DayFlags; + + /// + /// 拥有的技能 + /// + public List Abilities; + + /// + /// 引导情况 + /// + public List Guides; + + /// + /// 地图情况 + /// + public List MapMatters; } \ No newline at end of file diff --git a/Entity/Model/User.cs b/Entity/Model/User.cs deleted file mode 100644 index 43f1865..0000000 --- a/Entity/Model/User.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Fantasy.Entitas; - -namespace Fantasy.Model; - -public sealed class User : Entity -{ - public string NickName { get; set; } - public string Head { get; set; } - public string Country { get; set; } - -} \ No newline at end of file diff --git a/Examples/Client/Unity/Assets/Scripts/Hotfix/Generate/NetworkProtocol/RoamingType.cs b/Examples/Client/Unity/Assets/Scripts/Hotfix/Generate/NetworkProtocol/RoamingType.cs new file mode 100644 index 0000000..ce3008c --- /dev/null +++ b/Examples/Client/Unity/Assets/Scripts/Hotfix/Generate/NetworkProtocol/RoamingType.cs @@ -0,0 +1,8 @@ +using System.Collections.Generic; +namespace Fantasy +{ + // Roaming协议定义(需要定义10000以上、因为10000以内的框架预留) + public static class RoamingType + { + } +} diff --git a/Examples/Config/NetworkProtocol/RoamingType.Config b/Examples/Config/NetworkProtocol/RoamingType.Config new file mode 100644 index 0000000..3b89ab1 --- /dev/null +++ b/Examples/Config/NetworkProtocol/RoamingType.Config @@ -0,0 +1 @@ +// Roaming协议定义(需要定义10000以上、因为10000以内的框架预留) diff --git a/Examples/Config/NetworkProtocol/RouteType.Config b/Examples/Config/NetworkProtocol/RouteType.Config new file mode 100644 index 0000000..b8424a1 --- /dev/null +++ b/Examples/Config/NetworkProtocol/RouteType.Config @@ -0,0 +1 @@ +// Route协议定义(需要定义1000以上、因为1000以内的框架预留) diff --git a/Examples/Server/Entity/Generate/NetworkProtocol/RoamingType.cs b/Examples/Server/Entity/Generate/NetworkProtocol/RoamingType.cs new file mode 100644 index 0000000..ce3008c --- /dev/null +++ b/Examples/Server/Entity/Generate/NetworkProtocol/RoamingType.cs @@ -0,0 +1,8 @@ +using System.Collections.Generic; +namespace Fantasy +{ + // Roaming协议定义(需要定义10000以上、因为10000以内的框架预留) + public static class RoamingType + { + } +} diff --git a/Hotfix/Hotfix.csproj b/Hotfix/Hotfix.csproj index f45c1b8..b39f153 100644 --- a/Hotfix/Hotfix.csproj +++ b/Hotfix/Hotfix.csproj @@ -13,7 +13,7 @@ - + diff --git a/Hotfix/Outer/Addresable/C2G_CreateAddressableRequestHandler.cs b/Hotfix/Outer/Demo/Addresable/C2G_CreateAddressableRequestHandler.cs similarity index 100% rename from Hotfix/Outer/Addresable/C2G_CreateAddressableRequestHandler.cs rename to Hotfix/Outer/Demo/Addresable/C2G_CreateAddressableRequestHandler.cs diff --git a/Hotfix/Outer/Addresable/C2G_SendAddressableToMapHandler.cs b/Hotfix/Outer/Demo/Addresable/C2G_SendAddressableToMapHandler.cs similarity index 100% rename from Hotfix/Outer/Addresable/C2G_SendAddressableToMapHandler.cs rename to Hotfix/Outer/Demo/Addresable/C2G_SendAddressableToMapHandler.cs diff --git a/Hotfix/Outer/Addresable/C2M_MoveToMapRequestHandler.cs b/Hotfix/Outer/Demo/Addresable/C2M_MoveToMapRequestHandler.cs similarity index 100% rename from Hotfix/Outer/Addresable/C2M_MoveToMapRequestHandler.cs rename to Hotfix/Outer/Demo/Addresable/C2M_MoveToMapRequestHandler.cs diff --git a/Hotfix/Outer/Addresable/C2M_TestMessageHandler.cs b/Hotfix/Outer/Demo/Addresable/C2M_TestMessageHandler.cs similarity index 100% rename from Hotfix/Outer/Addresable/C2M_TestMessageHandler.cs rename to Hotfix/Outer/Demo/Addresable/C2M_TestMessageHandler.cs diff --git a/Hotfix/Outer/Addresable/C2M_TestRequestHandler.cs b/Hotfix/Outer/Demo/Addresable/C2M_TestRequestHandler.cs similarity index 100% rename from Hotfix/Outer/Addresable/C2M_TestRequestHandler.cs rename to Hotfix/Outer/Demo/Addresable/C2M_TestRequestHandler.cs diff --git a/Hotfix/Outer/Addresable/G2M_SendAddressableMessageHandler.cs b/Hotfix/Outer/Demo/Addresable/G2M_SendAddressableMessageHandler.cs similarity index 100% rename from Hotfix/Outer/Addresable/G2M_SendAddressableMessageHandler.cs rename to Hotfix/Outer/Demo/Addresable/G2M_SendAddressableMessageHandler.cs diff --git a/Hotfix/Outer/Addresable/M2M_SendUnitRequestHandler.cs b/Hotfix/Outer/Demo/Addresable/M2M_SendUnitRequestHandler.cs similarity index 100% rename from Hotfix/Outer/Addresable/M2M_SendUnitRequestHandler.cs rename to Hotfix/Outer/Demo/Addresable/M2M_SendUnitRequestHandler.cs diff --git a/Hotfix/Outer/NormalMessage/Gate/C2G_TestMessageHandler.cs b/Hotfix/Outer/Demo/NormalMessage/Gate/C2G_TestMessageHandler.cs similarity index 100% rename from Hotfix/Outer/NormalMessage/Gate/C2G_TestMessageHandler.cs rename to Hotfix/Outer/Demo/NormalMessage/Gate/C2G_TestMessageHandler.cs diff --git a/Hotfix/Outer/NormalMessage/Gate/C2G_TestRequestHandler.cs b/Hotfix/Outer/Demo/NormalMessage/Gate/C2G_TestRequestHandler.cs similarity index 100% rename from Hotfix/Outer/NormalMessage/Gate/C2G_TestRequestHandler.cs rename to Hotfix/Outer/Demo/NormalMessage/Gate/C2G_TestRequestHandler.cs diff --git a/Hotfix/Outer/NormalMessage/Gate/C2G_TestRequestPushMessageHandler.cs b/Hotfix/Outer/Demo/NormalMessage/Gate/C2G_TestRequestPushMessageHandler.cs similarity index 100% rename from Hotfix/Outer/NormalMessage/Gate/C2G_TestRequestPushMessageHandler.cs rename to Hotfix/Outer/Demo/NormalMessage/Gate/C2G_TestRequestPushMessageHandler.cs diff --git a/Hotfix/Outer/Roaming/Chat/C2Chat_TestRPCRoamingRequestHandler.cs b/Hotfix/Outer/Demo/Roaming/Chat/C2Chat_TestRPCRoamingRequestHandler.cs similarity index 100% rename from Hotfix/Outer/Roaming/Chat/C2Chat_TestRPCRoamingRequestHandler.cs rename to Hotfix/Outer/Demo/Roaming/Chat/C2Chat_TestRPCRoamingRequestHandler.cs diff --git a/Hotfix/Outer/Roaming/Chat/C2Chat_TestRoamingMessageHandler.cs b/Hotfix/Outer/Demo/Roaming/Chat/C2Chat_TestRoamingMessageHandler.cs similarity index 100% rename from Hotfix/Outer/Roaming/Chat/C2Chat_TestRoamingMessageHandler.cs rename to Hotfix/Outer/Demo/Roaming/Chat/C2Chat_TestRoamingMessageHandler.cs diff --git a/Hotfix/Outer/Roaming/Chat/C2Chat_TestSendMapMessageHandler.cs b/Hotfix/Outer/Demo/Roaming/Chat/C2Chat_TestSendMapMessageHandler.cs similarity index 100% rename from Hotfix/Outer/Roaming/Chat/C2Chat_TestSendMapMessageHandler.cs rename to Hotfix/Outer/Demo/Roaming/Chat/C2Chat_TestSendMapMessageHandler.cs diff --git a/Hotfix/Outer/Roaming/Gate/C2G_ConnectRoamingRequestHandler.cs b/Hotfix/Outer/Demo/Roaming/Gate/C2G_ConnectRoamingRequestHandler.cs similarity index 100% rename from Hotfix/Outer/Roaming/Gate/C2G_ConnectRoamingRequestHandler.cs rename to Hotfix/Outer/Demo/Roaming/Gate/C2G_ConnectRoamingRequestHandler.cs diff --git a/Hotfix/Outer/Roaming/Map/C2Map_PushMessageToClientHandler.cs b/Hotfix/Outer/Demo/Roaming/Map/C2Map_PushMessageToClientHandler.cs similarity index 100% rename from Hotfix/Outer/Roaming/Map/C2Map_PushMessageToClientHandler.cs rename to Hotfix/Outer/Demo/Roaming/Map/C2Map_PushMessageToClientHandler.cs diff --git a/Hotfix/Outer/Roaming/Map/C2Map_TestRoamingMessageHandler.cs b/Hotfix/Outer/Demo/Roaming/Map/C2Map_TestRoamingMessageHandler.cs similarity index 100% rename from Hotfix/Outer/Roaming/Map/C2Map_TestRoamingMessageHandler.cs rename to Hotfix/Outer/Demo/Roaming/Map/C2Map_TestRoamingMessageHandler.cs diff --git a/Hotfix/Outer/Roaming/Map/C2Map_TestTransferRequestHandler.cs b/Hotfix/Outer/Demo/Roaming/Map/C2Map_TestTransferRequestHandler.cs similarity index 100% rename from Hotfix/Outer/Roaming/Map/C2Map_TestTransferRequestHandler.cs rename to Hotfix/Outer/Demo/Roaming/Map/C2Map_TestTransferRequestHandler.cs diff --git a/Hotfix/Outer/Roaming/Map/Chat2M_TestMessageHandler.cs b/Hotfix/Outer/Demo/Roaming/Map/Chat2M_TestMessageHandler.cs similarity index 100% rename from Hotfix/Outer/Roaming/Map/Chat2M_TestMessageHandler.cs rename to Hotfix/Outer/Demo/Roaming/Map/Chat2M_TestMessageHandler.cs diff --git a/Hotfix/Outer/RouteMessage/C2Chat_TestMessageHandler.cs b/Hotfix/Outer/Demo/RouteMessage/C2Chat_TestMessageHandler.cs similarity index 100% rename from Hotfix/Outer/RouteMessage/C2Chat_TestMessageHandler.cs rename to Hotfix/Outer/Demo/RouteMessage/C2Chat_TestMessageHandler.cs diff --git a/Hotfix/Outer/RouteMessage/C2Chat_TestMessageRequestHandler.cs b/Hotfix/Outer/Demo/RouteMessage/C2Chat_TestMessageRequestHandler.cs similarity index 100% rename from Hotfix/Outer/RouteMessage/C2Chat_TestMessageRequestHandler.cs rename to Hotfix/Outer/Demo/RouteMessage/C2Chat_TestMessageRequestHandler.cs diff --git a/Hotfix/Outer/RouteMessage/C2Chat_TestRequestPushMessageHandler.cs b/Hotfix/Outer/Demo/RouteMessage/C2Chat_TestRequestPushMessageHandler.cs similarity index 100% rename from Hotfix/Outer/RouteMessage/C2Chat_TestRequestPushMessageHandler.cs rename to Hotfix/Outer/Demo/RouteMessage/C2Chat_TestRequestPushMessageHandler.cs diff --git a/Hotfix/Outer/RouteMessage/C2G_CreateChatRouteRequestHandler.cs b/Hotfix/Outer/Demo/RouteMessage/C2G_CreateChatRouteRequestHandler.cs similarity index 100% rename from Hotfix/Outer/RouteMessage/C2G_CreateChatRouteRequestHandler.cs rename to Hotfix/Outer/Demo/RouteMessage/C2G_CreateChatRouteRequestHandler.cs diff --git a/Hotfix/Outer/SubScene/C2G_CreateSubSceneAddressableRequestHandler.cs b/Hotfix/Outer/Demo/SubScene/C2G_CreateSubSceneAddressableRequestHandler.cs similarity index 100% rename from Hotfix/Outer/SubScene/C2G_CreateSubSceneAddressableRequestHandler.cs rename to Hotfix/Outer/Demo/SubScene/C2G_CreateSubSceneAddressableRequestHandler.cs diff --git a/Hotfix/Outer/SubScene/C2G_CreateSubSceneRequestHandler.cs b/Hotfix/Outer/Demo/SubScene/C2G_CreateSubSceneRequestHandler.cs similarity index 100% rename from Hotfix/Outer/SubScene/C2G_CreateSubSceneRequestHandler.cs rename to Hotfix/Outer/Demo/SubScene/C2G_CreateSubSceneRequestHandler.cs diff --git a/Hotfix/Outer/SubScene/C2G_SendToSubSceneMessageHandler.cs b/Hotfix/Outer/Demo/SubScene/C2G_SendToSubSceneMessageHandler.cs similarity index 100% rename from Hotfix/Outer/SubScene/C2G_SendToSubSceneMessageHandler.cs rename to Hotfix/Outer/Demo/SubScene/C2G_SendToSubSceneMessageHandler.cs diff --git a/Hotfix/Outer/SubScene/C2SubScene_TestDisposeMessageHandler.cs b/Hotfix/Outer/Demo/SubScene/C2SubScene_TestDisposeMessageHandler.cs similarity index 100% rename from Hotfix/Outer/SubScene/C2SubScene_TestDisposeMessageHandler.cs rename to Hotfix/Outer/Demo/SubScene/C2SubScene_TestDisposeMessageHandler.cs diff --git a/Hotfix/Outer/SubScene/C2SubScene_TestMessageHandler.cs b/Hotfix/Outer/Demo/SubScene/C2SubScene_TestMessageHandler.cs similarity index 100% rename from Hotfix/Outer/SubScene/C2SubScene_TestMessageHandler.cs rename to Hotfix/Outer/Demo/SubScene/C2SubScene_TestMessageHandler.cs diff --git a/Hotfix/Outer/Gate/C2G_LoginMessageHandler.cs b/Hotfix/Outer/Gate/C2G_LoginMessageHandler.cs new file mode 100644 index 0000000..40ac137 --- /dev/null +++ b/Hotfix/Outer/Gate/C2G_LoginMessageHandler.cs @@ -0,0 +1,14 @@ +// using Fantasy.Async; +// using Fantasy.Network; +// using Fantasy.Network.Interface; +// +// namespace Fantasy.Gate; +// +// public class C2G_LoginMessageHandler : Message +// { +// protected override async FTask Run(Session session, C2G_TestMessage message) +// { +// Log.Debug($"Receive C2G_TestMessage Tag={message.Tag}"); +// await FTask.CompletedTask; +// } +// } \ No newline at end of file diff --git a/Server.sln.DotSettings.user b/Server.sln.DotSettings.user index 0988c93..38edbbb 100644 --- a/Server.sln.DotSettings.user +++ b/Server.sln.DotSettings.user @@ -36,6 +36,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded diff --git a/Tools/Exporter/NetworkProtocol/Run.bat b/Tools/Exporter/NetworkProtocol/Run.bat index fe41258..e762f8d 100644 --- a/Tools/Exporter/NetworkProtocol/Run.bat +++ b/Tools/Exporter/NetworkProtocol/Run.bat @@ -18,4 +18,6 @@ if "%choice%"=="1" ( dotnet Fantasy.Tools.NetworkProtocol.dll --p 3 ) else ( echo Invalid option -) \ No newline at end of file +) + +PAUSE \ No newline at end of file diff --git a/Tools/NetworkProtocol/CommandLine.dll b/Tools/NetworkProtocol/CommandLine.dll new file mode 100644 index 0000000..3eab2be Binary files /dev/null and b/Tools/NetworkProtocol/CommandLine.dll differ diff --git a/Tools/NetworkProtocol/ExporterSettings.json b/Tools/NetworkProtocol/ExporterSettings.json new file mode 100644 index 0000000..5c9303b --- /dev/null +++ b/Tools/NetworkProtocol/ExporterSettings.json @@ -0,0 +1,29 @@ +{ + "Export": { + "NetworkProtocolDirectory": { + "Value": "../../Config/NetworkProtocol/", + "Comment": "ProtoBuf文件所在的文件夹位置" + }, + "NetworkProtocolServerDirectory": { + "Value": "../../Entity/Generate/NetworkProtocol/", + "Comment": "ProtoBuf生成到服务端的文件夹位置" + }, + "NetworkProtocolClientDirectory": { + "Value": "../../OutputClient/Generate/NetworkProtocol/", + "Comment": "ProtoBuf生成到客户端的文件夹位置" + }, + "Serializes": { + "Value": [ +// { +// "KeyIndex": 0, +// "NameSpace" : "MemoryPack", +// "SerializeName": "MemoryPack", +// "Attribute": "\t[MemoryPackable]", +// "Ignore": "\t\t[MemoryPackIgnore]", +// "Member": "MemoryPackOrder" +// } + ], + "Comment": "自定义序列化器" + } + } +} \ No newline at end of file diff --git a/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol b/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol new file mode 100644 index 0000000..25ceaf1 Binary files /dev/null and b/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol differ diff --git a/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.deps.json b/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.deps.json new file mode 100644 index 0000000..16d4b25 --- /dev/null +++ b/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.deps.json @@ -0,0 +1,264 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v8.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v8.0": { + "Fantasy.Tools.NetworkProtocol/1.0.0": { + "dependencies": { + "CommandLineParser": "2.9.1", + "Microsoft.Extensions.Configuration.Json": "9.0.6", + "Newtonsoft.Json": "13.0.3" + }, + "runtime": { + "Fantasy.Tools.NetworkProtocol.dll": {} + } + }, + "CommandLineParser/2.9.1": { + "runtime": { + "lib/netstandard2.0/CommandLine.dll": { + "assemblyVersion": "2.9.1.0", + "fileVersion": "2.9.1.0" + } + } + }, + "Microsoft.Extensions.Configuration/9.0.6": { + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "9.0.6", + "Microsoft.Extensions.Primitives": "9.0.6" + }, + "runtime": { + "lib/net8.0/Microsoft.Extensions.Configuration.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.625.26613" + } + } + }, + "Microsoft.Extensions.Configuration.Abstractions/9.0.6": { + "dependencies": { + "Microsoft.Extensions.Primitives": "9.0.6" + }, + "runtime": { + "lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.625.26613" + } + } + }, + "Microsoft.Extensions.Configuration.FileExtensions/9.0.6": { + "dependencies": { + "Microsoft.Extensions.Configuration": "9.0.6", + "Microsoft.Extensions.Configuration.Abstractions": "9.0.6", + "Microsoft.Extensions.FileProviders.Abstractions": "9.0.6", + "Microsoft.Extensions.FileProviders.Physical": "9.0.6", + "Microsoft.Extensions.Primitives": "9.0.6" + }, + "runtime": { + "lib/net8.0/Microsoft.Extensions.Configuration.FileExtensions.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.625.26613" + } + } + }, + "Microsoft.Extensions.Configuration.Json/9.0.6": { + "dependencies": { + "Microsoft.Extensions.Configuration": "9.0.6", + "Microsoft.Extensions.Configuration.Abstractions": "9.0.6", + "Microsoft.Extensions.Configuration.FileExtensions": "9.0.6", + "Microsoft.Extensions.FileProviders.Abstractions": "9.0.6", + "System.Text.Json": "9.0.6" + }, + "runtime": { + "lib/net8.0/Microsoft.Extensions.Configuration.Json.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.625.26613" + } + } + }, + "Microsoft.Extensions.FileProviders.Abstractions/9.0.6": { + "dependencies": { + "Microsoft.Extensions.Primitives": "9.0.6" + }, + "runtime": { + "lib/net8.0/Microsoft.Extensions.FileProviders.Abstractions.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.625.26613" + } + } + }, + "Microsoft.Extensions.FileProviders.Physical/9.0.6": { + "dependencies": { + "Microsoft.Extensions.FileProviders.Abstractions": "9.0.6", + "Microsoft.Extensions.FileSystemGlobbing": "9.0.6", + "Microsoft.Extensions.Primitives": "9.0.6" + }, + "runtime": { + "lib/net8.0/Microsoft.Extensions.FileProviders.Physical.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.625.26613" + } + } + }, + "Microsoft.Extensions.FileSystemGlobbing/9.0.6": { + "runtime": { + "lib/net8.0/Microsoft.Extensions.FileSystemGlobbing.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.625.26613" + } + } + }, + "Microsoft.Extensions.Primitives/9.0.6": { + "runtime": { + "lib/net8.0/Microsoft.Extensions.Primitives.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.625.26613" + } + } + }, + "Newtonsoft.Json/13.0.3": { + "runtime": { + "lib/net6.0/Newtonsoft.Json.dll": { + "assemblyVersion": "13.0.0.0", + "fileVersion": "13.0.3.27908" + } + } + }, + "System.IO.Pipelines/9.0.6": { + "runtime": { + "lib/net8.0/System.IO.Pipelines.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.625.26613" + } + } + }, + "System.Text.Encodings.Web/9.0.6": { + "runtime": { + "lib/net8.0/System.Text.Encodings.Web.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.625.26613" + } + }, + "runtimeTargets": { + "runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll": { + "rid": "browser", + "assetType": "runtime", + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.625.26613" + } + } + }, + "System.Text.Json/9.0.6": { + "dependencies": { + "System.IO.Pipelines": "9.0.6", + "System.Text.Encodings.Web": "9.0.6" + }, + "runtime": { + "lib/net8.0/System.Text.Json.dll": { + "assemblyVersion": "9.0.0.0", + "fileVersion": "9.0.625.26613" + } + } + } + } + }, + "libraries": { + "Fantasy.Tools.NetworkProtocol/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "CommandLineParser/2.9.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA==", + "path": "commandlineparser/2.9.1", + "hashPath": "commandlineparser.2.9.1.nupkg.sha512" + }, + "Microsoft.Extensions.Configuration/9.0.6": { + "type": "package", + "serviceable": true, + "sha512": "sha512-VWB5jdkxHsRiuoniTqwOL32R4OWyp5If/bAucLjRJczRVNcwb8iCXKLjn3Inv8fv+jHMVMnvQLg7xhSys+y5PA==", + "path": "microsoft.extensions.configuration/9.0.6", + "hashPath": "microsoft.extensions.configuration.9.0.6.nupkg.sha512" + }, + "Microsoft.Extensions.Configuration.Abstractions/9.0.6": { + "type": "package", + "serviceable": true, + "sha512": "sha512-3GgMIi2jP8g1fBW93Z9b9Unamc0SIsgyhiCmC91gq4loTixK9vQMuxxUsfJ1kRGwn+/FqLKwOHqmn0oYWn3Fvw==", + "path": "microsoft.extensions.configuration.abstractions/9.0.6", + "hashPath": "microsoft.extensions.configuration.abstractions.9.0.6.nupkg.sha512" + }, + "Microsoft.Extensions.Configuration.FileExtensions/9.0.6": { + "type": "package", + "serviceable": true, + "sha512": "sha512-pCEueasI5JhJ24KYzMFxtG40zyLnWpcQYawpARh9FNq9XbWozuWgexmdkPa8p8YoVNlpi3ecKfcjfoRMkKAufw==", + "path": "microsoft.extensions.configuration.fileextensions/9.0.6", + "hashPath": "microsoft.extensions.configuration.fileextensions.9.0.6.nupkg.sha512" + }, + "Microsoft.Extensions.Configuration.Json/9.0.6": { + "type": "package", + "serviceable": true, + "sha512": "sha512-N0dgOYQ9tDzJouL9Tyx2dgMCcHV2pBaY8yVtorbDqYYwiDRS2zd1TbhTA2FMHqXF3SMjBoO+gONZcDoA79gdSA==", + "path": "microsoft.extensions.configuration.json/9.0.6", + "hashPath": "microsoft.extensions.configuration.json.9.0.6.nupkg.sha512" + }, + "Microsoft.Extensions.FileProviders.Abstractions/9.0.6": { + "type": "package", + "serviceable": true, + "sha512": "sha512-q9FPkSGVA9ipI255p3PBAvWNXas5Tzjyp/DwYSwT+46mIFw9fWZahsF6vHpoxLt5/vtANotH2sAm7HunuFIx9g==", + "path": "microsoft.extensions.fileproviders.abstractions/9.0.6", + "hashPath": "microsoft.extensions.fileproviders.abstractions.9.0.6.nupkg.sha512" + }, + "Microsoft.Extensions.FileProviders.Physical/9.0.6": { + "type": "package", + "serviceable": true, + "sha512": "sha512-l+dFA0NRl90vSIiJNy5d7V0kpTEOWHTqbgoWYzlTwF5uiM5sWJ953haaELKE05jkyJdnemVTnqjrlgo4wo7oyg==", + "path": "microsoft.extensions.fileproviders.physical/9.0.6", + "hashPath": "microsoft.extensions.fileproviders.physical.9.0.6.nupkg.sha512" + }, + "Microsoft.Extensions.FileSystemGlobbing/9.0.6": { + "type": "package", + "serviceable": true, + "sha512": "sha512-1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==", + "path": "microsoft.extensions.filesystemglobbing/9.0.6", + "hashPath": "microsoft.extensions.filesystemglobbing.9.0.6.nupkg.sha512" + }, + "Microsoft.Extensions.Primitives/9.0.6": { + "type": "package", + "serviceable": true, + "sha512": "sha512-BHniU24QV67qp1pJknqYSofAPYGmijGI8D+ci9yfw33iuFdyOeB9lWTg78ThyYLyQwZw3s0vZ36VMb0MqbUuLw==", + "path": "microsoft.extensions.primitives/9.0.6", + "hashPath": "microsoft.extensions.primitives.9.0.6.nupkg.sha512" + }, + "Newtonsoft.Json/13.0.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==", + "path": "newtonsoft.json/13.0.3", + "hashPath": "newtonsoft.json.13.0.3.nupkg.sha512" + }, + "System.IO.Pipelines/9.0.6": { + "type": "package", + "serviceable": true, + "sha512": "sha512-0nlr0reXrRmkZNKifKqh2DgGhQgfkT7Qa3gQxIn/JI7/y3WDiTz67M+Sq3vFhUqcG8O5zVrpqHvIHeGPGUBsEw==", + "path": "system.io.pipelines/9.0.6", + "hashPath": "system.io.pipelines.9.0.6.nupkg.sha512" + }, + "System.Text.Encodings.Web/9.0.6": { + "type": "package", + "serviceable": true, + "sha512": "sha512-uWRgViw2yJAUyGxrzDLCc6fkzE2dZIoXxs8V6YjCujKsJuP0pnpYSlbm2/7tKd0SjBnMtwfDQhLenk3bXonVOA==", + "path": "system.text.encodings.web/9.0.6", + "hashPath": "system.text.encodings.web.9.0.6.nupkg.sha512" + }, + "System.Text.Json/9.0.6": { + "type": "package", + "serviceable": true, + "sha512": "sha512-h+ZtYTyTnTh5Ju6mHCKb3FPGx4ylJZgm9W7Y2psUnkhQRPMOIxX+TCN0ZgaR/+Yea+93XHWAaMzYTar1/EHIPg==", + "path": "system.text.json/9.0.6", + "hashPath": "system.text.json.9.0.6.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.dll b/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.dll new file mode 100644 index 0000000..26b0ed3 Binary files /dev/null and b/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.dll differ diff --git a/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.pdb b/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.pdb new file mode 100644 index 0000000..9c39e8a Binary files /dev/null and b/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.pdb differ diff --git a/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.runtimeconfig.json b/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.runtimeconfig.json new file mode 100644 index 0000000..becfaea --- /dev/null +++ b/Tools/NetworkProtocol/Fantasy.Tools.NetworkProtocol.runtimeconfig.json @@ -0,0 +1,12 @@ +{ + "runtimeOptions": { + "tfm": "net8.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "8.0.0" + }, + "configProperties": { + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false + } + } +} \ No newline at end of file diff --git a/Tools/NetworkProtocol/Microsoft.Extensions.Configuration.Abstractions.dll b/Tools/NetworkProtocol/Microsoft.Extensions.Configuration.Abstractions.dll new file mode 100644 index 0000000..99e2a39 Binary files /dev/null and b/Tools/NetworkProtocol/Microsoft.Extensions.Configuration.Abstractions.dll differ diff --git a/Tools/NetworkProtocol/Microsoft.Extensions.Configuration.FileExtensions.dll b/Tools/NetworkProtocol/Microsoft.Extensions.Configuration.FileExtensions.dll new file mode 100644 index 0000000..c695685 Binary files /dev/null and b/Tools/NetworkProtocol/Microsoft.Extensions.Configuration.FileExtensions.dll differ diff --git a/Tools/NetworkProtocol/Microsoft.Extensions.Configuration.Json.dll b/Tools/NetworkProtocol/Microsoft.Extensions.Configuration.Json.dll new file mode 100644 index 0000000..4734607 Binary files /dev/null and b/Tools/NetworkProtocol/Microsoft.Extensions.Configuration.Json.dll differ diff --git a/Tools/NetworkProtocol/Microsoft.Extensions.Configuration.dll b/Tools/NetworkProtocol/Microsoft.Extensions.Configuration.dll new file mode 100644 index 0000000..93add5f Binary files /dev/null and b/Tools/NetworkProtocol/Microsoft.Extensions.Configuration.dll differ diff --git a/Tools/NetworkProtocol/Microsoft.Extensions.FileProviders.Abstractions.dll b/Tools/NetworkProtocol/Microsoft.Extensions.FileProviders.Abstractions.dll new file mode 100644 index 0000000..f396702 Binary files /dev/null and b/Tools/NetworkProtocol/Microsoft.Extensions.FileProviders.Abstractions.dll differ diff --git a/Tools/NetworkProtocol/Microsoft.Extensions.FileProviders.Physical.dll b/Tools/NetworkProtocol/Microsoft.Extensions.FileProviders.Physical.dll new file mode 100644 index 0000000..30418e6 Binary files /dev/null and b/Tools/NetworkProtocol/Microsoft.Extensions.FileProviders.Physical.dll differ diff --git a/Tools/NetworkProtocol/Microsoft.Extensions.FileSystemGlobbing.dll b/Tools/NetworkProtocol/Microsoft.Extensions.FileSystemGlobbing.dll new file mode 100644 index 0000000..e77512d Binary files /dev/null and b/Tools/NetworkProtocol/Microsoft.Extensions.FileSystemGlobbing.dll differ diff --git a/Tools/NetworkProtocol/Microsoft.Extensions.Primitives.dll b/Tools/NetworkProtocol/Microsoft.Extensions.Primitives.dll new file mode 100644 index 0000000..dcc574e Binary files /dev/null and b/Tools/NetworkProtocol/Microsoft.Extensions.Primitives.dll differ diff --git a/Tools/NetworkProtocol/Newtonsoft.Json.dll b/Tools/NetworkProtocol/Newtonsoft.Json.dll new file mode 100644 index 0000000..d035c38 Binary files /dev/null and b/Tools/NetworkProtocol/Newtonsoft.Json.dll differ diff --git a/Tools/NetworkProtocol/Run.bat b/Tools/NetworkProtocol/Run.bat new file mode 100644 index 0000000..e762f8d --- /dev/null +++ b/Tools/NetworkProtocol/Run.bat @@ -0,0 +1,23 @@ +@echo off + +echo Please select an option: +echo 1. Client +echo 2. Server +echo 3. All + +set /p choice=Please select an option: + +if "%choice%"=="1" ( + echo Client + dotnet Fantasy.Tools.NetworkProtocol.dll --p 1 +) else if "%choice%"=="2" ( + echo Server + dotnet Fantasy.Tools.NetworkProtocol.dll --p 2 +) else if "%choice%"=="3" ( + echo All + dotnet Fantasy.Tools.NetworkProtocol.dll --p 3 +) else ( + echo Invalid option +) + +PAUSE \ No newline at end of file diff --git a/Tools/NetworkProtocol/Run.sh b/Tools/NetworkProtocol/Run.sh new file mode 100644 index 0000000..d5ed8b3 --- /dev/null +++ b/Tools/NetworkProtocol/Run.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +echo "1. Client" +echo "2. Server" +echo "3. All" + +read -n 1 -p "Please select an option:" choice +echo "" +echo "" +script_dir=$(cd $(dirname $0) && pwd) +case $choice in + 1) + dotnet $script_dir/Fantasy.Tools.NetworkProtocol.dll --p 1 --f $script_dir + ;; + 2) + dotnet $script_dir/Fantasy.Tools.NetworkProtocol.dll --p 2 --f $script_dir + ;; + 3) + dotnet $script_dir/Fantasy.Tools.NetworkProtocol.dll --p 3 --f $script_dir + ;; + *) + echo "Invalid option" + ;; +esac diff --git a/Tools/NetworkProtocol/System.IO.Pipelines.dll b/Tools/NetworkProtocol/System.IO.Pipelines.dll new file mode 100644 index 0000000..8c1c6e5 Binary files /dev/null and b/Tools/NetworkProtocol/System.IO.Pipelines.dll differ diff --git a/Tools/NetworkProtocol/System.Text.Encodings.Web.dll b/Tools/NetworkProtocol/System.Text.Encodings.Web.dll new file mode 100644 index 0000000..5bf355c Binary files /dev/null and b/Tools/NetworkProtocol/System.Text.Encodings.Web.dll differ diff --git a/Tools/NetworkProtocol/System.Text.Json.dll b/Tools/NetworkProtocol/System.Text.Json.dll new file mode 100644 index 0000000..1b52175 Binary files /dev/null and b/Tools/NetworkProtocol/System.Text.Json.dll differ diff --git a/Tools/NetworkProtocol/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll b/Tools/NetworkProtocol/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll new file mode 100644 index 0000000..0786a1d Binary files /dev/null and b/Tools/NetworkProtocol/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll differ