From 58911b2ef47f2f2be676a646a86de233385ebcd3 Mon Sep 17 00:00:00 2001
From: BobSong <605277374@qq.com>
Date: Sun, 18 Jan 2026 16:37:46 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=A1=86=E6=9E=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Entity/AssemblyHelper.cs | 2 +
.../Authentication/AuthenticationComponent.cs | 1 +
Entity/Entity.csproj | 3 +-
.../Cache/PlayerBasicCacheManageComponent.cs | 3 +-
Entity/Game/Fish/FishContainer.cs | 3 +-
.../Game/Item/PlayerItemContainerComponent.cs | 3 +-
.../Game/Map/Component/MapManageComponent.cs | 3 +-
.../Game/Map/Component/RoomManageComponent.cs | 3 +-
Entity/Game/Map/Entity/Map.cs | 3 +-
Entity/Game/Map/Entity/MapRoom.cs | 3 +-
Entity/Game/Player/PlayerManageComponent.cs | 1 +
Entity/Game/Player/PlayerWalletComponent.cs | 3 +-
Entity/Gate/GateUnit.cs | 3 +-
Entity/Gate/GateUnitManageComponent.cs | 3 +-
.../Generate/ConfigTable/Entity/BaitConfig.cs | 2 +-
.../ConfigTable/Entity/BasicConfig.cs | 2 +-
.../ConfigTable/Entity/BobberConfig.cs | 2 +-
.../ConfigTable/Entity/FeederConfig.cs | 2 +-
.../Generate/ConfigTable/Entity/FishConfig.cs | 2 +-
.../ConfigTable/Entity/GoodsConfig.cs | 2 +-
.../Generate/ConfigTable/Entity/HookConfig.cs | 2 +-
.../Generate/ConfigTable/Entity/InitConfig.cs | 2 +-
.../Generate/ConfigTable/Entity/ItemConfig.cs | 2 +-
.../Generate/ConfigTable/Entity/LineConfig.cs | 2 +-
.../Generate/ConfigTable/Entity/LureConfig.cs | 2 +-
.../Generate/ConfigTable/Entity/ReelConfig.cs | 2 +-
.../Generate/ConfigTable/Entity/RingConfig.cs | 2 +-
.../Generate/ConfigTable/Entity/RodConfig.cs | 2 +-
.../ConfigTable/Entity/RodRingConfig.cs | 2 +-
.../ConfigTable/Entity/WeightConfig.cs | 2 +-
.../NetworkProtocol/CommonProtoData.cs | 385 --
.../Generate/NetworkProtocol/GameMessage.cs | 568 --
.../Generate/NetworkProtocol/InnerMessage.cs | 871 ++-
.../Generate/NetworkProtocol/InnerOpcode.cs | 36 +-
Entity/Generate/NetworkProtocol/MapMessage.cs | 203 -
.../Generate/NetworkProtocol/MapProtoData.cs | 184 -
.../Generate/NetworkProtocol/OuterMessage.cs | 5289 ++++++++++++++++-
.../Generate/NetworkProtocol/OuterOpcode.cs | 170 +-
.../Generate/NetworkProtocol/RoamingType.cs | 34 +-
.../Generate/NetworkProtocol/RoomMessage.cs | 346 --
Entity/Generate/NetworkProtocol/RouteType.cs | 30 +-
.../Generate/NetworkProtocol/SocialMessage.cs | 957 ---
Entity/Modules/ConfigTable/ConfigContext.cs | 4 +
.../Modules/ConfigTable/ConfigTableHelper.cs | 3 +
Entity/Social/Chat/ChatChannel.cs | 3 +-
.../Social/Chat/ChatChannelCenterComponent.cs | 3 +-
Entity/Social/Club/ClubManageComponent.cs | 3 +-
.../Social/Mail/Components/MailComponent.cs | 3 +-
.../Mail/Components/MailManageComponent.cs | 3 +-
Entity/Social/Mail/Entity/Mail.cs | 3 +-
Entity/Social/Mail/Entity/MailBox.cs | 3 +-
Entity/Social/Mail/Entity/MailConversation.cs | 3 +-
Entity/Social/SocialUnitManageComponent.cs | 3 +-
.../Handler/C2A_LoginRequestHandler.cs | 3 +-
.../System/AuthenticationComponentSystem.cs | 1 +
.../Jwt/AuthenticationJwtComponentSystem.cs | 1 +
.../Handler/G2Common_EnterRequestHandler.cs | 5 +-
.../Handler/G2Common_ExitRequestHandler.cs | 5 +-
Hotfix/Common/Helper/SceneConfigHelper.cs | 3 +-
Hotfix/EntityHelper.cs | 3 +-
Hotfix/EntityTimeOutComponentSystem.cs | 3 +-
.../S2G_GetPlayerBasicInfoRequestHandler.cs | 5 +-
Hotfix/Game/Cache/Helper/CacheHandler.cs | 7 +-
.../PlayerBasicCacheManageComponentSystem.cs | 3 +-
.../Handler/C2Game_GetItemsRequestHandler.cs | 5 +-
.../C2Game_GetRoleInfoRequestHandler.cs | 5 +-
.../Handler/C2Game_RigChangeRequestHandler.cs | 7 +-
.../Handler/C2Game_SetSlotRequestHandler.cs | 5 +-
.../Handler/C2Game_UseItemRequestHandler.cs | 5 +-
Hotfix/Game/Item/AwardItemSystem.cs | 3 +-
Hotfix/Game/Item/ItemSystem.cs | 3 +-
.../PlayerItemContainerComponentSystem.cs | 3 +-
.../Handler/C2Map_CreateRoomRequestHandler.cs | 5 +-
Hotfix/Game/Map/Handler/C2Map_LookHandler.cs | 4 +-
Hotfix/Game/Map/Handler/C2Map_MoveHandler.cs | 4 +-
.../C2Map_RolePropertyChangeHandler.cs | 4 +-
.../Handler/C2Map_TakeItemRequestHandler.cs | 7 +-
.../Inner/G2Map_EnterMapRequestHandler.cs | 5 +-
.../Inner/G2Map_ExitRoomRequestHandler.cs | 5 +-
Hotfix/Game/Map/Helper/RoomHelper.cs | 3 +-
.../Map/System/MapManageComponentSystem.cs | 1 +
Hotfix/Game/Map/System/MapRoomSystem.cs | 3 +-
Hotfix/Game/Map/System/MapUnitSystem.cs | 3 +-
.../Map/System/RoomManageComponentSystem.cs | 4 +-
.../Components/PlayerManageComponentSystem.cs | 2 +
Hotfix/Game/Player/Entity/PlayerSystem.cs | 5 +-
Hotfix/Game/Player/Helper/PlayerHelper.cs | 2 +-
.../Wallet/PlayerWalletComponentSystem.cs | 1 +
.../Handler/Inner/S2G_ChatMessageHandler.cs | 2 +-
.../Outer/C2G_EnterMapRequestHandler.cs | 10 +-
.../Outer/C2G_ExitRoomRequestHandler.cs | 5 +-
.../Handler/Outer/C2G_LoginRequestHandler.cs | 1 +
.../System/GateUnitManageComponentSystem.cs | 3 +-
Hotfix/Gate/System/GateUnitSystem.cs | 11 +-
.../Gate/System/JWT/GateJWTComponentSystem.cs | 1 +
Hotfix/Gate/System/JWT/GateJWTHelper.cs | 1 +
.../C2S_CreateChannelRequestHandler.cs | 5 +-
.../C2S_GetOfflineMessageRequestHandler.cs | 2 +-
.../Handler/C2S_JoinChannelRequestHandler.cs | 5 +-
.../Handler/C2S_SendMessageRequestHandler.cs | 5 +-
.../Social/Chat/Helper/SocialSceneHelper.cs | 5 +-
.../System/ChatUnitManageComponentSystem.cs | 3 +-
.../Handler/C2S_DeleteMailRequestHandler.cs | 5 +-
.../C2S_GetConversationsRequestHandler.cs | 5 +-
.../Handler/C2S_SendMailRequestHandler.cs | 9 +-
Hotfix/Social/Mail/Helper/MailBoxFactory.cs | 3 +-
Hotfix/Social/Mail/Helper/MailFactory.cs | 8 +-
.../Social/Mail/System/MailComponentSystem.cs | 7 +-
.../Mail/System/MailConversationSystem.cs | 4 +-
.../Mail/System/MailManageComponentSystem.cs | 3 +-
Hotfix/Social/Mail/System/MailSystem.cs | 3 +-
Main/Program.cs | 1 +
Server.sln.DotSettings.user | 3 +
ThirdParty/Unity.Mathematics/matrix.cs | 2 +-
.../NetworkProtocol/Inner/InnerMessage.proto | 24 +-
.../CommandLine.dll | Bin
.../ExporterSettings.json | 20 +
.../Fantasy.Tools.NetworkProtocol | Bin
.../Fantasy.Tools.NetworkProtocol.deps.json | 0
.../Fantasy.Tools.NetworkProtocol.dll | Bin
.../Fantasy.Tools.NetworkProtocol.pdb | Bin
...y.Tools.NetworkProtocol.runtimeconfig.json | 0
....Extensions.Configuration.Abstractions.dll | Bin
...xtensions.Configuration.FileExtensions.dll | Bin
...icrosoft.Extensions.Configuration.Json.dll | Bin
.../Microsoft.Extensions.Configuration.dll | Bin
....Extensions.FileProviders.Abstractions.dll | Bin
...soft.Extensions.FileProviders.Physical.dll | Bin
...icrosoft.Extensions.FileSystemGlobbing.dll | Bin
.../Microsoft.Extensions.Primitives.dll | Bin
.../NetworkProtocolTemplate.txt | 0
.../Newtonsoft.Json.dll | Bin
Tools/ProtocolExportTool-Old/Run.bat | 21 +
Tools/ProtocolExportTool-Old/Run.sh | 24 +
.../System.IO.Pipelines.dll | Bin 0 -> 77616 bytes
.../System.Text.Encodings.Web.dll | Bin 0 -> 70968 bytes
.../System.Text.Json.dll | Bin 0 -> 643848 bytes
.../runtimes/.DS_Store | Bin
.../runtimes/browser/.DS_Store | Bin
.../runtimes/browser/lib/.DS_Store | Bin
.../lib/net8.0/System.Text.Encodings.Web.dll | Bin 0 -> 70968 bytes
.../ProtocolExportTool/ExporterSettings.json | 12 +-
.../Fantasy.ProtocolExportTool | Bin 0 -> 106520 bytes
.../Fantasy.ProtocolExportTool.deps.json | 120 +
.../Fantasy.ProtocolExportTool.dll | Bin 0 -> 104448 bytes
.../Fantasy.ProtocolExportTool.pdb | Bin 0 -> 42576 bytes
...tasy.ProtocolExportTool.runtimeconfig.json | 13 +
Tools/ProtocolExportTool/Run.bat | 111 +-
Tools/ProtocolExportTool/Run.sh | 129 +-
Tools/ProtocolExportTool/Spectre.Console.dll | Bin 0 -> 814592 bytes
.../ProtocolExportTool/System.CommandLine.dll | Bin 0 -> 151584 bytes
.../System.IO.Pipelines.dll | Bin 77616 -> 77608 bytes
.../System.Text.Encodings.Web.dll | Bin 70968 -> 70960 bytes
Tools/ProtocolExportTool/System.Text.Json.dll | Bin 643848 -> 643872 bytes
.../lib/net8.0/System.Text.Encodings.Web.dll | Bin 70968 -> 70968 bytes
.../zh-Hans/System.CommandLine.resources.dll | Bin 0 -> 19016 bytes
156 files changed, 6485 insertions(+), 3410 deletions(-)
delete mode 100644 Entity/Generate/NetworkProtocol/CommonProtoData.cs
delete mode 100644 Entity/Generate/NetworkProtocol/GameMessage.cs
delete mode 100644 Entity/Generate/NetworkProtocol/MapMessage.cs
delete mode 100644 Entity/Generate/NetworkProtocol/MapProtoData.cs
delete mode 100644 Entity/Generate/NetworkProtocol/RoomMessage.cs
delete mode 100644 Entity/Generate/NetworkProtocol/SocialMessage.cs
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/CommandLine.dll (100%)
create mode 100644 Tools/ProtocolExportTool-Old/ExporterSettings.json
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Fantasy.Tools.NetworkProtocol (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Fantasy.Tools.NetworkProtocol.deps.json (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Fantasy.Tools.NetworkProtocol.dll (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Fantasy.Tools.NetworkProtocol.pdb (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Fantasy.Tools.NetworkProtocol.runtimeconfig.json (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Microsoft.Extensions.Configuration.Abstractions.dll (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Microsoft.Extensions.Configuration.FileExtensions.dll (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Microsoft.Extensions.Configuration.Json.dll (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Microsoft.Extensions.Configuration.dll (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Microsoft.Extensions.FileProviders.Abstractions.dll (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Microsoft.Extensions.FileProviders.Physical.dll (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Microsoft.Extensions.FileSystemGlobbing.dll (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Microsoft.Extensions.Primitives.dll (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/NetworkProtocolTemplate.txt (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/Newtonsoft.Json.dll (100%)
create mode 100644 Tools/ProtocolExportTool-Old/Run.bat
create mode 100644 Tools/ProtocolExportTool-Old/Run.sh
create mode 100644 Tools/ProtocolExportTool-Old/System.IO.Pipelines.dll
create mode 100644 Tools/ProtocolExportTool-Old/System.Text.Encodings.Web.dll
create mode 100644 Tools/ProtocolExportTool-Old/System.Text.Json.dll
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/runtimes/.DS_Store (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/runtimes/browser/.DS_Store (100%)
rename Tools/{ProtocolExportTool => ProtocolExportTool-Old}/runtimes/browser/lib/.DS_Store (100%)
create mode 100644 Tools/ProtocolExportTool-Old/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll
create mode 100644 Tools/ProtocolExportTool/Fantasy.ProtocolExportTool
create mode 100644 Tools/ProtocolExportTool/Fantasy.ProtocolExportTool.deps.json
create mode 100644 Tools/ProtocolExportTool/Fantasy.ProtocolExportTool.dll
create mode 100644 Tools/ProtocolExportTool/Fantasy.ProtocolExportTool.pdb
create mode 100644 Tools/ProtocolExportTool/Fantasy.ProtocolExportTool.runtimeconfig.json
create mode 100644 Tools/ProtocolExportTool/Spectre.Console.dll
create mode 100644 Tools/ProtocolExportTool/System.CommandLine.dll
create mode 100644 Tools/ProtocolExportTool/zh-Hans/System.CommandLine.resources.dll
diff --git a/Entity/AssemblyHelper.cs b/Entity/AssemblyHelper.cs
index 8eae71b..cac9c04 100644
--- a/Entity/AssemblyHelper.cs
+++ b/Entity/AssemblyHelper.cs
@@ -1,3 +1,5 @@
+using System;
+using System.IO;
using System.Runtime.Loader;
using Fantasy.Helper;
diff --git a/Entity/Authentication/AuthenticationComponent.cs b/Entity/Authentication/AuthenticationComponent.cs
index e9868e2..b34a059 100644
--- a/Entity/Authentication/AuthenticationComponent.cs
+++ b/Entity/Authentication/AuthenticationComponent.cs
@@ -1,3 +1,4 @@
+using System.Collections.Generic;
using Fantasy.Entitas;
namespace NB;
diff --git a/Entity/Entity.csproj b/Entity/Entity.csproj
index 1155bae..4e906b2 100644
--- a/Entity/Entity.csproj
+++ b/Entity/Entity.csproj
@@ -9,7 +9,7 @@
-
+
@@ -20,6 +20,7 @@
+
\ No newline at end of file
diff --git a/Entity/Game/Cache/PlayerBasicCacheManageComponent.cs b/Entity/Game/Cache/PlayerBasicCacheManageComponent.cs
index a274bf5..4ff66b2 100644
--- a/Entity/Game/Cache/PlayerBasicCacheManageComponent.cs
+++ b/Entity/Game/Cache/PlayerBasicCacheManageComponent.cs
@@ -1,4 +1,5 @@
-using Fantasy.Entitas;
+using System.Collections.Generic;
+using Fantasy.Entitas;
namespace NB.Game;
diff --git a/Entity/Game/Fish/FishContainer.cs b/Entity/Game/Fish/FishContainer.cs
index 1dd3112..581f491 100644
--- a/Entity/Game/Fish/FishContainer.cs
+++ b/Entity/Game/Fish/FishContainer.cs
@@ -1,4 +1,5 @@
-using Fantasy.Entitas;
+using System.Collections.Generic;
+using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.Options;
diff --git a/Entity/Game/Item/PlayerItemContainerComponent.cs b/Entity/Game/Item/PlayerItemContainerComponent.cs
index e4371c5..ff50621 100644
--- a/Entity/Game/Item/PlayerItemContainerComponent.cs
+++ b/Entity/Game/Item/PlayerItemContainerComponent.cs
@@ -1,4 +1,5 @@
-using Fantasy.DataStructure.Collection;
+using System.Collections.Generic;
+using Fantasy.DataStructure.Collection;
using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.Options;
diff --git a/Entity/Game/Map/Component/MapManageComponent.cs b/Entity/Game/Map/Component/MapManageComponent.cs
index 3b3cdd7..7106d04 100644
--- a/Entity/Game/Map/Component/MapManageComponent.cs
+++ b/Entity/Game/Map/Component/MapManageComponent.cs
@@ -1,4 +1,5 @@
-using Fantasy.Entitas;
+using System.Collections.Generic;
+using Fantasy.Entitas;
namespace NB.Game;
diff --git a/Entity/Game/Map/Component/RoomManageComponent.cs b/Entity/Game/Map/Component/RoomManageComponent.cs
index b20f77f..f4c8386 100644
--- a/Entity/Game/Map/Component/RoomManageComponent.cs
+++ b/Entity/Game/Map/Component/RoomManageComponent.cs
@@ -1,4 +1,5 @@
-using Fantasy.Entitas;
+using System.Collections.Generic;
+using Fantasy.Entitas;
namespace NB.Game;
diff --git a/Entity/Game/Map/Entity/Map.cs b/Entity/Game/Map/Entity/Map.cs
index e10ed70..e5a3eea 100644
--- a/Entity/Game/Map/Entity/Map.cs
+++ b/Entity/Game/Map/Entity/Map.cs
@@ -1,4 +1,5 @@
-using Fantasy.Entitas;
+using System.Collections.Generic;
+using Fantasy.Entitas;
namespace NB.Game;
diff --git a/Entity/Game/Map/Entity/MapRoom.cs b/Entity/Game/Map/Entity/MapRoom.cs
index 1d2408a..eddda4e 100644
--- a/Entity/Game/Map/Entity/MapRoom.cs
+++ b/Entity/Game/Map/Entity/MapRoom.cs
@@ -1,4 +1,5 @@
-using Fantasy.Entitas;
+using System.Collections.Generic;
+using Fantasy.Entitas;
namespace NB.Game;
diff --git a/Entity/Game/Player/PlayerManageComponent.cs b/Entity/Game/Player/PlayerManageComponent.cs
index 1965dca..fe53d33 100644
--- a/Entity/Game/Player/PlayerManageComponent.cs
+++ b/Entity/Game/Player/PlayerManageComponent.cs
@@ -1,3 +1,4 @@
+using System.Collections.Generic;
using Fantasy.Entitas;
namespace NB.Game;
diff --git a/Entity/Game/Player/PlayerWalletComponent.cs b/Entity/Game/Player/PlayerWalletComponent.cs
index 0682333..8a24328 100644
--- a/Entity/Game/Player/PlayerWalletComponent.cs
+++ b/Entity/Game/Player/PlayerWalletComponent.cs
@@ -1,4 +1,5 @@
-using Fantasy.Entitas;
+using System.Collections.Generic;
+using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.Options;
diff --git a/Entity/Gate/GateUnit.cs b/Entity/Gate/GateUnit.cs
index de814d0..b83d449 100644
--- a/Entity/Gate/GateUnit.cs
+++ b/Entity/Gate/GateUnit.cs
@@ -1,4 +1,5 @@
-using Fantasy.Entitas;
+using System.Collections.Generic;
+using Fantasy.Entitas;
using Fantasy.Network;
namespace NB.Gate;
diff --git a/Entity/Gate/GateUnitManageComponent.cs b/Entity/Gate/GateUnitManageComponent.cs
index e5187cd..779ad1a 100644
--- a/Entity/Gate/GateUnitManageComponent.cs
+++ b/Entity/Gate/GateUnitManageComponent.cs
@@ -1,4 +1,5 @@
-using Fantasy.Entitas;
+using System.Collections.Generic;
+using Fantasy.Entitas;
using Fantasy.Network;
namespace NB.Gate;
diff --git a/Entity/Generate/ConfigTable/Entity/BaitConfig.cs b/Entity/Generate/ConfigTable/Entity/BaitConfig.cs
index 5a8723f..e8c4232 100644
--- a/Entity/Generate/ConfigTable/Entity/BaitConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/BaitConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/BasicConfig.cs b/Entity/Generate/ConfigTable/Entity/BasicConfig.cs
index 783a7ea..da33e55 100644
--- a/Entity/Generate/ConfigTable/Entity/BasicConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/BasicConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/BobberConfig.cs b/Entity/Generate/ConfigTable/Entity/BobberConfig.cs
index b728eca..eb715bf 100644
--- a/Entity/Generate/ConfigTable/Entity/BobberConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/BobberConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/FeederConfig.cs b/Entity/Generate/ConfigTable/Entity/FeederConfig.cs
index 25c867b..c189fe9 100644
--- a/Entity/Generate/ConfigTable/Entity/FeederConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/FeederConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/FishConfig.cs b/Entity/Generate/ConfigTable/Entity/FishConfig.cs
index 35aa809..489306c 100644
--- a/Entity/Generate/ConfigTable/Entity/FishConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/FishConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/GoodsConfig.cs b/Entity/Generate/ConfigTable/Entity/GoodsConfig.cs
index 209a9a6..a0d821c 100644
--- a/Entity/Generate/ConfigTable/Entity/GoodsConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/GoodsConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/HookConfig.cs b/Entity/Generate/ConfigTable/Entity/HookConfig.cs
index b5316e9..a5e2581 100644
--- a/Entity/Generate/ConfigTable/Entity/HookConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/HookConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/InitConfig.cs b/Entity/Generate/ConfigTable/Entity/InitConfig.cs
index b4e2547..fa11a8f 100644
--- a/Entity/Generate/ConfigTable/Entity/InitConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/InitConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/ItemConfig.cs b/Entity/Generate/ConfigTable/Entity/ItemConfig.cs
index e1aadc4..06e75b8 100644
--- a/Entity/Generate/ConfigTable/Entity/ItemConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/ItemConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/LineConfig.cs b/Entity/Generate/ConfigTable/Entity/LineConfig.cs
index 3059d1e..54a1502 100644
--- a/Entity/Generate/ConfigTable/Entity/LineConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/LineConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/LureConfig.cs b/Entity/Generate/ConfigTable/Entity/LureConfig.cs
index 08ce607..29f0037 100644
--- a/Entity/Generate/ConfigTable/Entity/LureConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/LureConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/ReelConfig.cs b/Entity/Generate/ConfigTable/Entity/ReelConfig.cs
index 359d6f7..6555e2f 100644
--- a/Entity/Generate/ConfigTable/Entity/ReelConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/ReelConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/RingConfig.cs b/Entity/Generate/ConfigTable/Entity/RingConfig.cs
index ea332f6..cf21659 100644
--- a/Entity/Generate/ConfigTable/Entity/RingConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/RingConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/RodConfig.cs b/Entity/Generate/ConfigTable/Entity/RodConfig.cs
index 8f7099e..646b639 100644
--- a/Entity/Generate/ConfigTable/Entity/RodConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/RodConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/RodRingConfig.cs b/Entity/Generate/ConfigTable/Entity/RodRingConfig.cs
index 808ae56..d1921cc 100644
--- a/Entity/Generate/ConfigTable/Entity/RodRingConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/RodRingConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/ConfigTable/Entity/WeightConfig.cs b/Entity/Generate/ConfigTable/Entity/WeightConfig.cs
index da45f6f..2758a31 100644
--- a/Entity/Generate/ConfigTable/Entity/WeightConfig.cs
+++ b/Entity/Generate/ConfigTable/Entity/WeightConfig.cs
@@ -1,5 +1,5 @@
using System;
-using ProtoBuf;
+using LightProto;
using Fantasy;
using System.Linq;
using System.Reflection;
diff --git a/Entity/Generate/NetworkProtocol/CommonProtoData.cs b/Entity/Generate/NetworkProtocol/CommonProtoData.cs
deleted file mode 100644
index fa4da06..0000000
--- a/Entity/Generate/NetworkProtocol/CommonProtoData.cs
+++ /dev/null
@@ -1,385 +0,0 @@
-using ProtoBuf;
-
-using System;
-using System.Collections.Generic;
-using MongoDB.Bson.Serialization.Attributes;
-using Fantasy;
-using Fantasy.Network.Interface;
-using Fantasy.Serialize;
-// ReSharper disable InconsistentNaming
-// ReSharper disable RedundantUsingDirective
-// ReSharper disable RedundantOverriddenMember
-// ReSharper disable PartialTypeWithSinglePart
-// ReSharper disable UnusedAutoPropertyAccessor.Global
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable CheckNamespace
-#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
-#pragma warning disable CS8618
-
-namespace Fantasy
-{
- ///
- /// 角色基础信息
- ///
- [ProtoContract]
- public partial class RoleBaseInfo : AMessage
- {
- public static RoleBaseInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- NickName = default;
- Head = default;
- Country = default;
- Level = default;
- Exp = default;
- VipInfo = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public string NickName { get; set; }
- [ProtoMember(2)]
- public string Head { get; set; }
- [ProtoMember(3)]
- public string Country { get; set; }
- [ProtoMember(4)]
- public int Level { get; set; }
- [ProtoMember(5)]
- public int Exp { get; set; }
- [ProtoMember(6)]
- public VipInfo VipInfo { get; set; }
- }
- [ProtoContract]
- public partial class KeyValueInt64 : AMessage
- {
- public static KeyValueInt64 Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Key = default;
- Value = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public int Key { get; set; }
- [ProtoMember(2)]
- public long Value { get; set; }
- }
- ///
- /// 角色信息
- ///
- [ProtoContract]
- public partial class RoleInfo : AMessage
- {
- public static RoleInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- BaseInfo = default;
- RoleId = default;
- Items.Clear();
- ItemBinds.Clear();
- Fishs.Clear();
- Activities.Clear();
- Currency.Clear();
- Slots.Clear();
- Skills.Clear();
- MapId = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public RoleBaseInfo BaseInfo { get; set; }
- [ProtoMember(2)]
- public long RoleId { get; set; }
- [ProtoMember(3)]
- public List Items = new List();
- [ProtoMember(4)]
- public List ItemBinds = new List();
- [ProtoMember(5)]
- public List Fishs = new List();
- [ProtoMember(6)]
- public List Activities = new List();
- [ProtoMember(7)]
- public List Currency = new List();
- [ProtoMember(8)]
- public List Slots = new List();
- [ProtoMember(9)]
- public List Skills = new List();
- [ProtoMember(10)]
- public int MapId { get; set; }
- }
- ///
- /// 角色信息
- ///
- [ProtoContract]
- public partial class RoleSimpleInfo : AMessage
- {
- public static RoleSimpleInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- RoleId = default;
- NickName = default;
- Head = default;
- Country = default;
- Level = default;
- Vip = default;
- MapId = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public long RoleId { get; set; }
- [ProtoMember(2)]
- public string NickName { get; set; }
- [ProtoMember(3)]
- public string Head { get; set; }
- [ProtoMember(4)]
- public string Country { get; set; }
- [ProtoMember(5)]
- public int Level { get; set; }
- [ProtoMember(6)]
- public int Vip { get; set; }
- [ProtoMember(7)]
- public int MapId { get; set; }
- }
- ///
- /// VIP信息
- ///
- [ProtoContract]
- public partial class VipInfo : AMessage
- {
- public static VipInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Level = default;
- OpenTime = default;
- ExpirationTime = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public int Level { get; set; }
- [ProtoMember(2)]
- public long OpenTime { get; set; }
- [ProtoMember(3)]
- public long ExpirationTime { get; set; }
- }
- ///
- /// 奖励信息
- ///
- [ProtoContract]
- public partial class AwardInfo : AMessage
- {
- public static AwardInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ConfigId = default;
- Count = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public long ConfigId { get; set; }
- [ProtoMember(2)]
- public int Count { get; set; }
- }
- ///
- /// 玩家当前使用钓组信息
- ///
- [ProtoContract]
- public partial class ItemBindInfo : AMessage
- {
- public static ItemBindInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Item = default;
- BindItems.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public long Item { get; set; }
- [ProtoMember(2)]
- public List BindItems = new List();
- }
- ///
- /// 物品信息
- ///
- [ProtoContract]
- public partial class ItemInfo : AMessage
- {
- public static ItemInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ConfigId = default;
- Id = default;
- Count = default;
- ExpirationTime = default;
- GetTime = default;
- Abrasion = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public uint ConfigId { get; set; }
- [ProtoMember(2)]
- public long Id { get; set; }
- [ProtoMember(3)]
- public int Count { get; set; }
- [ProtoMember(4)]
- public long ExpirationTime { get; set; }
- [ProtoMember(5)]
- public long GetTime { get; set; }
- [ProtoMember(6)]
- public int Abrasion { get; set; }
- }
- ///
- /// 商店物品信息
- ///
- [ProtoContract]
- public partial class ShopItemInfo : AMessage
- {
- public static ShopItemInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ConfigId = default;
- Price = default;
- Currency = default;
- Sort = default;
- Tag = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public uint ConfigId { get; set; }
- [ProtoMember(2)]
- public uint Price { get; set; }
- [ProtoMember(3)]
- public uint Currency { get; set; }
- [ProtoMember(4)]
- public uint Sort { get; set; }
- [ProtoMember(5)]
- public uint Tag { get; set; }
- }
- ///
- /// fish信息
- ///
- [ProtoContract]
- public partial class FishInfo : AMessage
- {
- public static FishInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ConfigId = default;
- Id = default;
- Weight = default;
- GetTime = default;
- ExpirationTime = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public uint ConfigId { get; set; }
- [ProtoMember(2)]
- public long Id { get; set; }
- [ProtoMember(3)]
- public int Weight { get; set; }
- [ProtoMember(4)]
- public long GetTime { get; set; }
- [ProtoMember(5)]
- public long ExpirationTime { get; set; }
- }
- [ProtoContract]
- public partial class ActivityInfo : AMessage
- {
- public static ActivityInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Id = default;
- StartTime = default;
- EndTime = default;
- Data.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public long Id { get; set; }
- [ProtoMember(2)]
- public long StartTime { get; set; }
- [ProtoMember(3)]
- public long EndTime { get; set; }
- [ProtoMember(4)]
- public List Data = new List();
- }
- ///
- /// 技能情况
- ///
- [ProtoContract]
- public partial class SkillInfo : AMessage
- {
- public static SkillInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ConfigId = default;
- Level = default;
- Exp = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public uint ConfigId { get; set; }
- [ProtoMember(2)]
- public int Level { get; set; }
- [ProtoMember(3)]
- public int Exp { get; set; }
- }
-}
-
diff --git a/Entity/Generate/NetworkProtocol/GameMessage.cs b/Entity/Generate/NetworkProtocol/GameMessage.cs
deleted file mode 100644
index 275d181..0000000
--- a/Entity/Generate/NetworkProtocol/GameMessage.cs
+++ /dev/null
@@ -1,568 +0,0 @@
-using ProtoBuf;
-
-using System;
-using System.Collections.Generic;
-using MongoDB.Bson.Serialization.Attributes;
-using Fantasy;
-using Fantasy.Network.Interface;
-using Fantasy.Serialize;
-// ReSharper disable InconsistentNaming
-// ReSharper disable RedundantUsingDirective
-// ReSharper disable RedundantOverriddenMember
-// ReSharper disable PartialTypeWithSinglePart
-// ReSharper disable UnusedAutoPropertyAccessor.Global
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable CheckNamespace
-#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
-#pragma warning disable CS8618
-
-namespace Fantasy
-{
- ///
- /// /////////// ******** 物品信息 *******/////////////
- ///
- ///
- /// 请求背包列表
- ///
- [ProtoContract]
- public partial class C2Game_GetItemsRequest : AMessage, ICustomRouteRequest
- {
- public static C2Game_GetItemsRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Game2C_GetItemsResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2Game_GetItemsRequest; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- }
- ///
- /// 请求背包列表响应
- ///
- [ProtoContract]
- public partial class Game2C_GetItemsResponse : AMessage, ICustomRouteResponse
- {
- public static Game2C_GetItemsResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- Items.Clear();
- Rigs.Clear();
- Slots.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_GetItemsResponse; }
- [ProtoMember(1)]
- public List Items = new List();
- [ProtoMember(2)]
- public List Rigs = new List();
- [ProtoMember(3)]
- public List Slots = new List();
- [ProtoMember(4)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// 请求使用物品
- ///
- [ProtoContract]
- public partial class C2Game_UseItemRequest : AMessage, ICustomRouteRequest
- {
- public static C2Game_UseItemRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ItemId = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Game2C_UseItemResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2Game_UseItemRequest; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- [ProtoMember(1)]
- public long ItemId { get; set; }
- }
- ///
- /// 请求使用物品响应
- ///
- [ProtoContract]
- public partial class Game2C_UseItemResponse : AMessage, ICustomRouteResponse
- {
- public static Game2C_UseItemResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_UseItemResponse; }
- [ProtoMember(1)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// 物品变化
- ///
- [ProtoContract]
- public partial class Game2C_ItemChange : AMessage, ICustomRouteMessage
- {
- public static Game2C_ItemChange Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Type = default;
- Items.Clear();
- Removes.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_ItemChange; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- [ProtoMember(1)]
- public int Type { get; set; }
- [ProtoMember(2)]
- public List Items = new List();
- [ProtoMember(3)]
- public List Removes = new List();
- }
- ///
- /// /////////// ******** 钓组 *******/////////////
- ///
- ///
- /// 请求安装或取下配件
- ///
- [ProtoContract]
- public partial class C2Game_RigChangeRequest : AMessage, ICustomRouteRequest
- {
- public static C2Game_RigChangeRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ItemId = default;
- RigId = default;
- OldRigId = default;
- IsAdd = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Game2C_RigChangeResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2Game_RigChangeRequest; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- [ProtoMember(1)]
- public long ItemId { get; set; }
- [ProtoMember(2)]
- public long RigId { get; set; }
- [ProtoMember(3)]
- public long OldRigId { get; set; }
- [ProtoMember(4)]
- public bool IsAdd { get; set; }
- }
- ///
- /// 请求安装配件响应
- ///
- [ProtoContract]
- public partial class Game2C_RigChangeResponse : AMessage, ICustomRouteResponse
- {
- public static Game2C_RigChangeResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- Rigs = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_RigChangeResponse; }
- [ProtoMember(1)]
- public ItemBindInfo Rigs { get; set; }
- [ProtoMember(2)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// /////////// ******** 快速使用插槽 *******/////////////
- ///
- ///
- /// 请求设置快速使用
- ///
- [ProtoContract]
- public partial class C2Game_SetSlotRequest : AMessage, ICustomRouteRequest
- {
- public static C2Game_SetSlotRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Index = default;
- Id = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Game2C_SetSlotResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2Game_SetSlotRequest; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- [ProtoMember(1)]
- public int Index { get; set; }
- [ProtoMember(2)]
- public long Id { get; set; }
- }
- ///
- /// 请求设置快速使用响应
- ///
- [ProtoContract]
- public partial class Game2C_SetSlotResponse : AMessage, ICustomRouteResponse
- {
- public static Game2C_SetSlotResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- Slots.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_SetSlotResponse; }
- [ProtoMember(1)]
- public List Slots = new List();
- [ProtoMember(2)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// /////////// ******** 鱼护 *******/////////////
- ///
- ///
- /// 请求鱼护列表
- ///
- [ProtoContract]
- public partial class C2Game_GetFishsRequest : AMessage, ICustomRouteRequest
- {
- public static C2Game_GetFishsRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Game2C_GetFishsResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2Game_GetFishsRequest; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- }
- ///
- /// 请求鱼护列表响应
- ///
- [ProtoContract]
- public partial class Game2C_GetFishsResponse : AMessage, ICustomRouteResponse
- {
- public static Game2C_GetFishsResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- Fishs.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_GetFishsResponse; }
- [ProtoMember(1)]
- public List Fishs = new List();
- [ProtoMember(2)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// 鱼护变化
- ///
- [ProtoContract]
- public partial class Game2C_FishChange : AMessage, ICustomRouteMessage
- {
- public static Game2C_FishChange Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Type = default;
- Fishs.Clear();
- Removes.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_FishChange; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- [ProtoMember(1)]
- public int Type { get; set; }
- [ProtoMember(2)]
- public List Fishs = new List();
- [ProtoMember(3)]
- public List Removes = new List();
- }
- ///
- /// 请求出售
- ///
- [ProtoContract]
- public partial class C2Game_SellFishRequest : AMessage, ICustomRouteRequest
- {
- public static C2Game_SellFishRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Ids.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Game2C_SellFishResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2Game_SellFishRequest; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- [ProtoMember(1)]
- public List Ids = new List();
- }
- ///
- /// 请求出售响应
- ///
- [ProtoContract]
- public partial class Game2C_SellFishResponse : AMessage, ICustomRouteResponse
- {
- public static Game2C_SellFishResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- Awards.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_SellFishResponse; }
- [ProtoMember(1)]
- public List Awards = new List();
- [ProtoMember(2)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// /////////// ******** 商店 *******/////////////
- ///
- ///
- /// 请求商店商品列表
- ///
- [ProtoContract]
- public partial class C2Game_GetShopItemsRequest : AMessage, ICustomRouteRequest
- {
- public static C2Game_GetShopItemsRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Shop = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Game2C_GetShopItemsResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2Game_GetShopItemsRequest; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- [ProtoMember(1)]
- public uint Shop { get; set; }
- }
- ///
- /// 请求商店商品列表响应
- ///
- [ProtoContract]
- public partial class Game2C_GetShopItemsResponse : AMessage, ICustomRouteResponse
- {
- public static Game2C_GetShopItemsResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- Items.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_GetShopItemsResponse; }
- [ProtoMember(1)]
- public List Items = new List();
- [ProtoMember(2)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// 请求购买
- ///
- [ProtoContract]
- public partial class C2Game_BuyRequest : AMessage, ICustomRouteRequest
- {
- public static C2Game_BuyRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- BuyId = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Game2C_GetFishsResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2Game_BuyRequest; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- [ProtoMember(1)]
- public uint BuyId { get; set; }
- }
- ///
- /// 请求购买响应
- ///
- [ProtoContract]
- public partial class Game2C_BuyResponse : AMessage, ICustomRouteResponse
- {
- public static Game2C_BuyResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_BuyResponse; }
- [ProtoMember(1)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// 活动奖励推送
- ///
- [ProtoContract]
- public partial class Game2C_RewardNotify : AMessage, ICustomRouteMessage
- {
- public static Game2C_RewardNotify Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Awards.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_RewardNotify; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- [ProtoMember(1)]
- public List Awards = new List();
- }
- ///
- /// /////////// ******** GM *******/////////////
- ///
- ///
- /// 请求执行GM
- ///
- [ProtoContract]
- public partial class C2Game_GMRequest : AMessage, ICustomRouteRequest
- {
- public static C2Game_GMRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Cmd = default;
- Args = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Game2C_GMResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2Game_GMRequest; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- [ProtoMember(1)]
- public string Cmd { get; set; }
- [ProtoMember(2)]
- public string Args { get; set; }
- }
- ///
- /// 执行GM返回
- ///
- [ProtoContract]
- public partial class Game2C_GMResponse : AMessage, ICustomRouteResponse
- {
- public static Game2C_GMResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_GMResponse; }
- [ProtoMember(1)]
- public uint ErrorCode { get; set; }
- }
-}
-
diff --git a/Entity/Generate/NetworkProtocol/InnerMessage.cs b/Entity/Generate/NetworkProtocol/InnerMessage.cs
index 60806ce..8ce56b8 100644
--- a/Entity/Generate/NetworkProtocol/InnerMessage.cs
+++ b/Entity/Generate/NetworkProtocol/InnerMessage.cs
@@ -1,311 +1,592 @@
-using ProtoBuf;
-
+using LightProto;
+using MemoryPack;
using System;
using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes;
using Fantasy;
+using Fantasy.Pool;
using Fantasy.Network.Interface;
using Fantasy.Serialize;
+
// ReSharper disable InconsistentNaming
-// ReSharper disable RedundantUsingDirective
-// ReSharper disable RedundantOverriddenMember
+// ReSharper disable CollectionNeverUpdated.Global
+// ReSharper disable RedundantTypeArgumentsOfMethod
// ReSharper disable PartialTypeWithSinglePart
// ReSharper disable UnusedAutoPropertyAccessor.Global
+// ReSharper disable PreferConcreteValueOverDefault
+// ReSharper disable RedundantNameQualifier
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable CheckNamespace
+// ReSharper disable FieldCanBeMadeReadOnly.Global
+// ReSharper disable RedundantUsingDirective
+// ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8618
-
namespace Fantasy
{
- ///
- /// 通知游戏服角色进入该游戏服
- ///
- [ProtoContract]
- public partial class G2Common_EnterRequest : AMessage, IRouteRequest
- {
- public static G2Common_EnterRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- AccountId = default;
- GateRouteId = default;
- RouteType = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public G2Common_EnterResponse ResponseType { get; set; }
- public uint OpCode() { return InnerOpcode.G2Common_EnterRequest; }
- [ProtoMember(1)]
- public long AccountId { get; set; }
- [ProtoMember(2)]
- public long GateRouteId { get; set; }
- [ProtoMember(3)]
- public int RouteType { get; set; }
- }
- [ProtoContract]
- public partial class G2Common_EnterResponse : AMessage, IRouteResponse
- {
- public static G2Common_EnterResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- UnitRouteId = default;
- RouteType = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return InnerOpcode.G2Common_EnterResponse; }
- [ProtoMember(1)]
- public long UnitRouteId { get; set; }
- [ProtoMember(2)]
- public int RouteType { get; set; }
- [ProtoMember(3)]
- public uint ErrorCode { get; set; }
- }
- [ProtoContract]
- public partial class G2Common_ExitRequest : AMessage, IRouteRequest
- {
- public static G2Common_ExitRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- AccountId = default;
- GateRouteId = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Common2G_ExitResponse ResponseType { get; set; }
- public uint OpCode() { return InnerOpcode.G2Common_ExitRequest; }
- [ProtoMember(1)]
- public long AccountId { get; set; }
- [ProtoMember(2)]
- public long GateRouteId { get; set; }
- }
- [ProtoContract]
- public partial class Common2G_ExitResponse : AMessage, IRouteResponse
- {
- public static Common2G_ExitResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return InnerOpcode.Common2G_ExitResponse; }
- [ProtoMember(1)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// 获取玩家基础信息
- ///
- [ProtoContract]
- public partial class S2G_GetPlayerBasicInfoRequest : AMessage, IRouteRequest
- {
- public static S2G_GetPlayerBasicInfoRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- IdList.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public G2S_GetPlayerBasicInfoResponse ResponseType { get; set; }
- public uint OpCode() { return InnerOpcode.S2G_GetPlayerBasicInfoRequest; }
- [ProtoMember(1)]
- public List IdList = new List();
- }
- ///
- /// 获取玩家基础信息响应
- ///
- [ProtoContract]
- public partial class G2S_GetPlayerBasicInfoResponse : AMessage, IRouteResponse
- {
- public static G2S_GetPlayerBasicInfoResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- RoleList.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return InnerOpcode.G2S_GetPlayerBasicInfoResponse; }
- [ProtoMember(1)]
- public List RoleList = new List();
- [ProtoMember(2)]
- public uint ErrorCode { get; set; }
- }
- [ProtoContract]
- public partial class S2G_ChatMessage : AMessage, IRouteMessage
- {
- public static S2G_ChatMessage Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Message = default;
- IdList.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return InnerOpcode.S2G_ChatMessage; }
- [ProtoMember(1)]
- public ChatMessageInfo Message { get; set; }
- [ProtoMember(2)]
- public List IdList = new List();
- }
- ///
- /// 创建聊天频道
- ///
- [ProtoContract]
- public partial class Club2Chat_CreateChannel : AMessage, IRouteMessage
- {
- public static Club2Chat_CreateChannel Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ChannelId = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return InnerOpcode.Club2Chat_CreateChannel; }
- [ProtoMember(1)]
- public long ChannelId { get; set; }
- }
- ///
- /// 请求进入房间
- ///
- [ProtoContract]
- public partial class G2Map_EnterMapRequest : AMessage, IRouteRequest
- {
- public static G2Map_EnterMapRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- RoomCode = default;
- AccountId = default;
- MapId = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Map2G_EnterMapResponse ResponseType { get; set; }
- public uint OpCode() { return InnerOpcode.G2Map_EnterMapRequest; }
- [ProtoMember(1)]
- public string RoomCode { get; set; }
- [ProtoMember(2)]
- public long AccountId { get; set; }
- [ProtoMember(3)]
- public int MapId { get; set; }
- }
- ///
- /// 请求进入房间响应
- ///
- [ProtoContract]
- public partial class Map2G_EnterMapResponse : AMessage, IRouteResponse
- {
- public static Map2G_EnterMapResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- RoomCode = default;
- MapId = default;
- Units.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return InnerOpcode.Map2G_EnterMapResponse; }
- [ProtoMember(1)]
- public string RoomCode { get; set; }
- [ProtoMember(2)]
- public int MapId { get; set; }
- [ProtoMember(3)]
- public List Units = new List();
- [ProtoMember(4)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// 请求离开房间
- ///
- [ProtoContract]
- public partial class G2Map_ExitRoomRequest : AMessage, IRouteRequest
- {
- public static G2Map_ExitRoomRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- RoomCode = default;
- AccountId = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Map2G_ExiRoomResponse ResponseType { get; set; }
- public uint OpCode() { return InnerOpcode.G2Map_ExitRoomRequest; }
- [ProtoMember(1)]
- public string RoomCode { get; set; }
- [ProtoMember(2)]
- public long AccountId { get; set; }
- }
- ///
- /// 请求离开房间响应
- ///
- [ProtoContract]
- public partial class Map2G_ExiRoomResponse : AMessage, IRouteResponse
- {
- public static Map2G_ExiRoomResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return InnerOpcode.Map2G_ExiRoomResponse; }
- [ProtoMember(1)]
- public uint ErrorCode { get; set; }
- }
-}
+ ///
+ /// 通知游戏服角色进入该游戏服
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class G2Common_EnterRequest : AMessage, IAddressRequest
+ {
+ public static G2Common_EnterRequest Create(bool autoReturn = true)
+ {
+ var g2Common_EnterRequest = MessageObjectPool.Rent();
+ g2Common_EnterRequest.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ g2Common_EnterRequest.SetIsPool(false);
+ }
+
+ return g2Common_EnterRequest;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ AccountId = default;
+ GateRouteId = default;
+ RouteType = default;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return InnerOpcode.G2Common_EnterRequest; }
+ [ProtoIgnore]
+ public G2Common_EnterResponse ResponseType { get; set; }
+ [ProtoMember(1)]
+ public long AccountId { get; set; }
+ [ProtoMember(2)]
+ public long GateRouteId { get; set; }
+ [ProtoMember(3)]
+ public int RouteType { get; set; }
+ }
+ [Serializable]
+ [ProtoContract]
+ public partial class G2Common_EnterResponse : AMessage, IAddressResponse
+ {
+ public static G2Common_EnterResponse Create(bool autoReturn = true)
+ {
+ var g2Common_EnterResponse = MessageObjectPool.Rent();
+ g2Common_EnterResponse.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ g2Common_EnterResponse.SetIsPool(false);
+ }
+
+ return g2Common_EnterResponse;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ ErrorCode = 0;
+ UnitRouteId = default;
+ RouteType = default;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return InnerOpcode.G2Common_EnterResponse; }
+ [ProtoMember(1)]
+ public uint ErrorCode { get; set; }
+ [ProtoMember(2)]
+ public long UnitRouteId { get; set; }
+ [ProtoMember(3)]
+ public int RouteType { get; set; }
+ }
+ [Serializable]
+ [ProtoContract]
+ public partial class G2Common_ExitRequest : AMessage, IAddressRequest
+ {
+ public static G2Common_ExitRequest Create(bool autoReturn = true)
+ {
+ var g2Common_ExitRequest = MessageObjectPool.Rent();
+ g2Common_ExitRequest.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ g2Common_ExitRequest.SetIsPool(false);
+ }
+
+ return g2Common_ExitRequest;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ AccountId = default;
+ GateRouteId = default;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return InnerOpcode.G2Common_ExitRequest; }
+ [ProtoIgnore]
+ public Common2G_ExitResponse ResponseType { get; set; }
+ [ProtoMember(1)]
+ public long AccountId { get; set; }
+ [ProtoMember(2)]
+ public long GateRouteId { get; set; }
+ }
+ [Serializable]
+ [ProtoContract]
+ public partial class Common2G_ExitResponse : AMessage, IAddressResponse
+ {
+ public static Common2G_ExitResponse Create(bool autoReturn = true)
+ {
+ var common2G_ExitResponse = MessageObjectPool.Rent();
+ common2G_ExitResponse.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ common2G_ExitResponse.SetIsPool(false);
+ }
+
+ return common2G_ExitResponse;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ ErrorCode = 0;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return InnerOpcode.Common2G_ExitResponse; }
+ [ProtoMember(1)]
+ public uint ErrorCode { get; set; }
+ }
+ ///
+ /// 获取玩家基础信息
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class S2G_GetPlayerBasicInfoRequest : AMessage, IAddressRequest
+ {
+ public static S2G_GetPlayerBasicInfoRequest Create(bool autoReturn = true)
+ {
+ var s2G_GetPlayerBasicInfoRequest = MessageObjectPool.Rent();
+ s2G_GetPlayerBasicInfoRequest.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ s2G_GetPlayerBasicInfoRequest.SetIsPool(false);
+ }
+
+ return s2G_GetPlayerBasicInfoRequest;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ IdList.Clear();
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return InnerOpcode.S2G_GetPlayerBasicInfoRequest; }
+ [ProtoIgnore]
+ public G2S_GetPlayerBasicInfoResponse ResponseType { get; set; }
+ [ProtoMember(1)]
+ public List IdList { get; set; } = new List();
+ }
+ ///
+ /// 获取玩家基础信息响应
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class G2S_GetPlayerBasicInfoResponse : AMessage, IAddressResponse
+ {
+ public static G2S_GetPlayerBasicInfoResponse Create(bool autoReturn = true)
+ {
+ var g2S_GetPlayerBasicInfoResponse = MessageObjectPool.Rent();
+ g2S_GetPlayerBasicInfoResponse.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ g2S_GetPlayerBasicInfoResponse.SetIsPool(false);
+ }
+
+ return g2S_GetPlayerBasicInfoResponse;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ ErrorCode = 0;
+ RoleList.Clear();
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return InnerOpcode.G2S_GetPlayerBasicInfoResponse; }
+ [ProtoMember(1)]
+ public uint ErrorCode { get; set; }
+ [ProtoMember(2)]
+ public List RoleList { get; set; } = new List();
+ }
+ [Serializable]
+ [ProtoContract]
+ public partial class S2G_ChatMessage : AMessage, IAddressMessage
+ {
+ public static S2G_ChatMessage Create(bool autoReturn = true)
+ {
+ var s2G_ChatMessage = MessageObjectPool.Rent();
+ s2G_ChatMessage.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ s2G_ChatMessage.SetIsPool(false);
+ }
+
+ return s2G_ChatMessage;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ Message = default;
+ IdList.Clear();
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return InnerOpcode.S2G_ChatMessage; }
+ [ProtoMember(1)]
+ public ChatMessageInfo Message { get; set; }
+ [ProtoMember(2)]
+ public List IdList { get; set; } = new List();
+ }
+ ///
+ /// 创建聊天频道
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class Club2Chat_CreateChannel : AMessage, IAddressMessage
+ {
+ public static Club2Chat_CreateChannel Create(bool autoReturn = true)
+ {
+ var club2Chat_CreateChannel = MessageObjectPool.Rent();
+ club2Chat_CreateChannel.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ club2Chat_CreateChannel.SetIsPool(false);
+ }
+
+ return club2Chat_CreateChannel;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ ChannelId = default;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return InnerOpcode.Club2Chat_CreateChannel; }
+ [ProtoMember(1)]
+ public long ChannelId { get; set; }
+ }
+ ///
+ /// 请求进入房间
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class G2Map_EnterMapRequest : AMessage, IAddressRequest
+ {
+ public static G2Map_EnterMapRequest Create(bool autoReturn = true)
+ {
+ var g2Map_EnterMapRequest = MessageObjectPool.Rent();
+ g2Map_EnterMapRequest.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ g2Map_EnterMapRequest.SetIsPool(false);
+ }
+
+ return g2Map_EnterMapRequest;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ RoomCode = default;
+ AccountId = default;
+ MapId = default;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return InnerOpcode.G2Map_EnterMapRequest; }
+ [ProtoIgnore]
+ public Map2G_EnterMapResponse ResponseType { get; set; }
+ [ProtoMember(1)]
+ public string RoomCode { get; set; }
+ [ProtoMember(2)]
+ public long AccountId { get; set; }
+ [ProtoMember(3)]
+ public int MapId { get; set; }
+ }
+ ///
+ /// 请求进入房间响应
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class Map2G_EnterMapResponse : AMessage, IAddressResponse
+ {
+ public static Map2G_EnterMapResponse Create(bool autoReturn = true)
+ {
+ var map2G_EnterMapResponse = MessageObjectPool.Rent();
+ map2G_EnterMapResponse.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ map2G_EnterMapResponse.SetIsPool(false);
+ }
+
+ return map2G_EnterMapResponse;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ ErrorCode = 0;
+ RoomCode = default;
+ MapId = default;
+ Units.Clear();
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return InnerOpcode.Map2G_EnterMapResponse; }
+ [ProtoMember(1)]
+ public uint ErrorCode { get; set; }
+ [ProtoMember(2)]
+ public string RoomCode { get; set; }
+ [ProtoMember(3)]
+ public int MapId { get; set; }
+ [ProtoMember(4)]
+ public List Units { get; set; } = new List();
+ }
+ ///
+ /// 请求离开房间
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class G2Map_ExitRoomRequest : AMessage, IAddressRequest
+ {
+ public static G2Map_ExitRoomRequest Create(bool autoReturn = true)
+ {
+ var g2Map_ExitRoomRequest = MessageObjectPool.Rent();
+ g2Map_ExitRoomRequest.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ g2Map_ExitRoomRequest.SetIsPool(false);
+ }
+
+ return g2Map_ExitRoomRequest;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ RoomCode = default;
+ AccountId = default;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return InnerOpcode.G2Map_ExitRoomRequest; }
+ [ProtoIgnore]
+ public Map2G_ExiRoomResponse ResponseType { get; set; }
+ [ProtoMember(1)]
+ public string RoomCode { get; set; }
+ [ProtoMember(2)]
+ public long AccountId { get; set; }
+ }
+ ///
+ /// 请求离开房间响应
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class Map2G_ExiRoomResponse : AMessage, IAddressResponse
+ {
+ public static Map2G_ExiRoomResponse Create(bool autoReturn = true)
+ {
+ var map2G_ExiRoomResponse = MessageObjectPool.Rent();
+ map2G_ExiRoomResponse.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ map2G_ExiRoomResponse.SetIsPool(false);
+ }
+
+ return map2G_ExiRoomResponse;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ ErrorCode = 0;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return InnerOpcode.Map2G_ExiRoomResponse; }
+ [ProtoMember(1)]
+ public uint ErrorCode { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Entity/Generate/NetworkProtocol/InnerOpcode.cs b/Entity/Generate/NetworkProtocol/InnerOpcode.cs
index 41c9d03..18bc561 100644
--- a/Entity/Generate/NetworkProtocol/InnerOpcode.cs
+++ b/Entity/Generate/NetworkProtocol/InnerOpcode.cs
@@ -1,18 +1,22 @@
+// ReSharper disable InconsistentNaming
namespace Fantasy
{
- public static partial class InnerOpcode
- {
- public const uint G2Common_EnterRequest = 1073751825;
- public const uint G2Common_EnterResponse = 1207969553;
- public const uint G2Common_ExitRequest = 1073751826;
- public const uint Common2G_ExitResponse = 1207969554;
- public const uint S2G_GetPlayerBasicInfoRequest = 1073751827;
- public const uint G2S_GetPlayerBasicInfoResponse = 1207969555;
- public const uint S2G_ChatMessage = 939534097;
- public const uint Club2Chat_CreateChannel = 939534098;
- public const uint G2Map_EnterMapRequest = 1073751828;
- public const uint Map2G_EnterMapResponse = 1207969556;
- public const uint G2Map_ExitRoomRequest = 1073751829;
- public const uint Map2G_ExiRoomResponse = 1207969557;
- }
-}
+ ///
+ /// 本代码有编辑器生成,请不要再这里进行编辑。
+ ///
+ public static partial class InnerOpcode
+ {
+ public const uint G2Common_EnterRequest = 1073751825;
+ public const uint G2Common_EnterResponse = 1207969553;
+ public const uint G2Common_ExitRequest = 1073751826;
+ public const uint Common2G_ExitResponse = 1207969554;
+ public const uint S2G_GetPlayerBasicInfoRequest = 1073751827;
+ public const uint G2S_GetPlayerBasicInfoResponse = 1207969555;
+ public const uint S2G_ChatMessage = 939534097;
+ public const uint Club2Chat_CreateChannel = 939534098;
+ public const uint G2Map_EnterMapRequest = 1073751828;
+ public const uint Map2G_EnterMapResponse = 1207969556;
+ public const uint G2Map_ExitRoomRequest = 1073751829;
+ public const uint Map2G_ExiRoomResponse = 1207969557;
+ }
+}
\ No newline at end of file
diff --git a/Entity/Generate/NetworkProtocol/MapMessage.cs b/Entity/Generate/NetworkProtocol/MapMessage.cs
deleted file mode 100644
index 738256b..0000000
--- a/Entity/Generate/NetworkProtocol/MapMessage.cs
+++ /dev/null
@@ -1,203 +0,0 @@
-using ProtoBuf;
-
-using System;
-using System.Collections.Generic;
-using MongoDB.Bson.Serialization.Attributes;
-using Fantasy;
-using Fantasy.Network.Interface;
-using Fantasy.Serialize;
-// ReSharper disable InconsistentNaming
-// ReSharper disable RedundantUsingDirective
-// ReSharper disable RedundantOverriddenMember
-// ReSharper disable PartialTypeWithSinglePart
-// ReSharper disable UnusedAutoPropertyAccessor.Global
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable CheckNamespace
-#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
-#pragma warning disable CS8618
-
-namespace Fantasy
-{
- ///
- /// 请求创建房间
- ///
- [ProtoContract]
- public partial class C2Map_CreateRoomRequest : AMessage, ICustomRouteRequest
- {
- public static C2Map_CreateRoomRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- MapId = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Map2C_CreateRoomResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2Map_CreateRoomRequest; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- [ProtoMember(1)]
- public int MapId { get; set; }
- }
- ///
- /// 请求创建房间成功
- ///
- [ProtoContract]
- public partial class Map2C_CreateRoomResponse : AMessage, ICustomRouteResponse
- {
- public static Map2C_CreateRoomResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- RoomCode = default;
- Units.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Map2C_CreateRoomResponse; }
- [ProtoMember(1)]
- public string RoomCode { get; set; }
- [ProtoMember(2)]
- public List Units = new List();
- [ProtoMember(3)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// 请求网关离开房间(离开房间,但是不离开地图)
- ///
- [ProtoContract]
- public partial class C2G_ExitRoomRequest : AMessage, IRequest
- {
- public static C2G_ExitRoomRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- RoomCode = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public G2C_ExitRoomResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2G_ExitRoomRequest; }
- [ProtoMember(1)]
- public string RoomCode { get; set; }
- }
- ///
- /// 请求网关进入离开响应
- ///
- [ProtoContract]
- public partial class G2C_ExitRoomResponse : AMessage, IResponse
- {
- public static G2C_ExitRoomResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- RoomCode = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.G2C_ExitRoomResponse; }
- [ProtoMember(1)]
- public string RoomCode { get; set; }
- [ProtoMember(2)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// 请求网关进入地图
- ///
- [ProtoContract]
- public partial class C2G_EnterMapRequest : AMessage, IRequest
- {
- public static C2G_EnterMapRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- RoomCode = default;
- MapId = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public G2C_EnterMapResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2G_EnterMapRequest; }
- [ProtoMember(1)]
- public string RoomCode { get; set; }
- [ProtoMember(2)]
- public int MapId { get; set; }
- }
- ///
- /// 请求网关进入房间响应
- ///
- [ProtoContract]
- public partial class G2C_EnterMapResponse : AMessage, IResponse
- {
- public static G2C_EnterMapResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- MapId = default;
- RoomCode = default;
- Units.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.G2C_EnterMapResponse; }
- [ProtoMember(1)]
- public int MapId { get; set; }
- [ProtoMember(2)]
- public string RoomCode { get; set; }
- [ProtoMember(3)]
- public List Units = new List();
- [ProtoMember(4)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// 通知客户端切换地图
- ///
- [ProtoContract]
- public partial class Map2C_ChangeMap : AMessage, ICustomRouteMessage
- {
- public static Map2C_ChangeMap Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- MapId = default;
- Node = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Map2C_ChangeMap; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- [ProtoMember(1)]
- public int MapId { get; set; }
- [ProtoMember(2)]
- public int Node { get; set; }
- }
-}
-
diff --git a/Entity/Generate/NetworkProtocol/MapProtoData.cs b/Entity/Generate/NetworkProtocol/MapProtoData.cs
deleted file mode 100644
index d3d5c33..0000000
--- a/Entity/Generate/NetworkProtocol/MapProtoData.cs
+++ /dev/null
@@ -1,184 +0,0 @@
-using ProtoBuf;
-
-using System;
-using System.Collections.Generic;
-using MongoDB.Bson.Serialization.Attributes;
-using Fantasy;
-using Fantasy.Network.Interface;
-using Fantasy.Serialize;
-// ReSharper disable InconsistentNaming
-// ReSharper disable RedundantUsingDirective
-// ReSharper disable RedundantOverriddenMember
-// ReSharper disable PartialTypeWithSinglePart
-// ReSharper disable UnusedAutoPropertyAccessor.Global
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable CheckNamespace
-#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
-#pragma warning disable CS8618
-
-namespace Fantasy
-{
- [ProtoContract]
- public partial class Vector3Info : AMessage
- {
- public static Vector3Info Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- x = default;
- y = default;
- z = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public float x { get; set; }
- [ProtoMember(2)]
- public float y { get; set; }
- [ProtoMember(3)]
- public float z { get; set; }
- }
- [ProtoContract]
- public partial class Vector2Info : AMessage
- {
- public static Vector2Info Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- x = default;
- y = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public float x { get; set; }
- [ProtoMember(2)]
- public float y { get; set; }
- }
- [ProtoContract]
- public partial class QuaternionInfo : AMessage
- {
- public static QuaternionInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- x = default;
- y = default;
- z = default;
- w = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public float x { get; set; }
- [ProtoMember(2)]
- public float y { get; set; }
- [ProtoMember(3)]
- public float z { get; set; }
- [ProtoMember(4)]
- public float w { get; set; }
- }
- ///
- /// 玩家当前使用钓组信息
- ///
- [ProtoContract]
- public partial class GearInfo : AMessage
- {
- public static GearInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Item = default;
- Binds.Clear();
- Position = default;
- Rotation = default;
- Propertys.Clear();
- InUse = default;
- InHand = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public ItemInfo Item { get; set; }
- [ProtoMember(2)]
- public List Binds = new List();
- [ProtoMember(3)]
- public Vector3Info Position { get; set; }
- [ProtoMember(4)]
- public Vector3Info Rotation { get; set; }
- [ProtoMember(5)]
- public List Propertys = new List();
- [ProtoMember(6)]
- public bool InUse { get; set; }
- [ProtoMember(7)]
- public bool InHand { get; set; }
- }
- [ProtoContract]
- public partial class UnitStateInfo : AMessage
- {
- public static UnitStateInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- State = default;
- Propertys.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public int State { get; set; }
- [ProtoMember(2)]
- public List Propertys = new List();
- }
- [ProtoContract]
- public partial class MapUnitInfo : AMessage
- {
- public static MapUnitInfo Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Id = default;
- RoleInfo = default;
- Position = default;
- Rotation = default;
- State = default;
- Gears.Clear();
- Propertys.Clear();
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoMember(1)]
- public long Id { get; set; }
- [ProtoMember(2)]
- public RoleSimpleInfo RoleInfo { get; set; }
- [ProtoMember(3)]
- public Vector3Info Position { get; set; }
- [ProtoMember(4)]
- public Vector3Info Rotation { get; set; }
- [ProtoMember(5)]
- public UnitStateInfo State { get; set; }
- [ProtoMember(6)]
- public List Gears = new List();
- [ProtoMember(7)]
- public List Propertys = new List();
- }
-}
-
diff --git a/Entity/Generate/NetworkProtocol/OuterMessage.cs b/Entity/Generate/NetworkProtocol/OuterMessage.cs
index a90f841..a42e338 100644
--- a/Entity/Generate/NetworkProtocol/OuterMessage.cs
+++ b/Entity/Generate/NetworkProtocol/OuterMessage.cs
@@ -1,177 +1,5132 @@
-using ProtoBuf;
-
+using LightProto;
using System;
+using MemoryPack;
using System.Collections.Generic;
-using MongoDB.Bson.Serialization.Attributes;
using Fantasy;
+using Fantasy.Pool;
using Fantasy.Network.Interface;
using Fantasy.Serialize;
-// ReSharper disable InconsistentNaming
-// ReSharper disable RedundantUsingDirective
-// ReSharper disable RedundantOverriddenMember
-// ReSharper disable PartialTypeWithSinglePart
-// ReSharper disable UnusedAutoPropertyAccessor.Global
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable CheckNamespace
+
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8618
-
+// ReSharper disable InconsistentNaming
+// ReSharper disable CollectionNeverUpdated.Global
+// ReSharper disable RedundantTypeArgumentsOfMethod
+// ReSharper disable PartialTypeWithSinglePart
+// ReSharper disable UnusedAutoPropertyAccessor.Global
+// ReSharper disable PreferConcreteValueOverDefault
+// ReSharper disable RedundantNameQualifier
+// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable CheckNamespace
+// ReSharper disable FieldCanBeMadeReadOnly.Global
+// ReSharper disable RedundantUsingDirective
+// ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
namespace Fantasy
{
- [ProtoContract]
- public partial class C2A_LoginRequest : AMessage, IRequest
- {
- public static C2A_LoginRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- Username = default;
- Password = default;
- LoginType = default;
- Region = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public A2C_LoginResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2A_LoginRequest; }
- [ProtoMember(1)]
- public string Username { get; set; }
- [ProtoMember(2)]
- public string Password { get; set; }
- [ProtoMember(3)]
- public int LoginType { get; set; }
- [ProtoMember(4)]
- public int Region { get; set; }
- }
- [ProtoContract]
- public partial class A2C_LoginResponse : AMessage, IResponse
- {
- public static A2C_LoginResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- ToKen = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.A2C_LoginResponse; }
- [ProtoMember(1)]
- public string ToKen { get; set; }
- [ProtoMember(2)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// 客户端登录到Gate服务器
- ///
- [ProtoContract]
- public partial class C2G_LoginRequest : AMessage, IRequest
- {
- public static C2G_LoginRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ToKen = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public G2C_LoginResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2G_LoginRequest; }
- [ProtoMember(1)]
- public string ToKen { get; set; }
- }
- [ProtoContract]
- public partial class G2C_LoginResponse : AMessage, IResponse
- {
- public static G2C_LoginResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- RoleId = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.G2C_LoginResponse; }
- [ProtoMember(1)]
- public long RoleId { get; set; }
- [ProtoMember(2)]
- public uint ErrorCode { get; set; }
- }
- ///
- /// 通知客户端重复登录
- ///
- [ProtoContract]
- public partial class G2C_RepeatLogin : AMessage, IMessage
- {
- public static G2C_RepeatLogin Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.G2C_RepeatLogin; }
- }
- [ProtoContract]
- public partial class C2Game_GetRoleInfoRequest : AMessage, ICustomRouteRequest
- {
- public static C2Game_GetRoleInfoRequest Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- [ProtoIgnore]
- public Game2C_GetRoleInfoResponse ResponseType { get; set; }
- public uint OpCode() { return OuterOpcode.C2Game_GetRoleInfoRequest; }
- [ProtoIgnore]
- public int RouteType => Fantasy.RouteType.GameRoute;
- }
- [ProtoContract]
- public partial class Game2C_GetRoleInfoResponse : AMessage, ICustomRouteResponse
- {
- public static Game2C_GetRoleInfoResponse Create(Scene scene)
- {
- return scene.MessagePoolComponent.Rent();
- }
- public override void Dispose()
- {
- ErrorCode = default;
- RoleInfo = default;
- RoomCode = default;
-#if FANTASY_NET || FANTASY_UNITY
- GetScene().MessagePoolComponent.Return(this);
-#endif
- }
- public uint OpCode() { return OuterOpcode.Game2C_GetRoleInfoResponse; }
- [ProtoMember(1)]
- public RoleInfo RoleInfo { get; set; }
- [ProtoMember(2)]
- public string RoomCode { get; set; }
- [ProtoMember(3)]
- public uint ErrorCode { get; set; }
- }
-}
+ ///
+ /// 请求背包列表
+ ///
+////////// ******** 物品信息 *******/////////////
+ [Serializable]
+ [ProtoContract]
+ public partial class C2Game_GetItemsRequest : AMessage, ICustomRouteRequest
+ {
+ public static C2Game_GetItemsRequest Create(bool autoReturn = true)
+ {
+ var c2Game_GetItemsRequest = MessageObjectPool.Rent();
+ c2Game_GetItemsRequest.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ c2Game_GetItemsRequest.SetIsPool(false);
+ }
+
+ return c2Game_GetItemsRequest;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return OuterOpcode.C2Game_GetItemsRequest; }
+ [ProtoIgnore]
+ public Game2C_GetItemsResponse ResponseType { get; set; }
+ [ProtoIgnore]
+ public int RouteType => Fantasy.RouteType.GameRoute;
+ }
+ ///
+ /// 请求背包列表响应
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class Game2C_GetItemsResponse : AMessage, ICustomRouteResponse
+ {
+ public static Game2C_GetItemsResponse Create(bool autoReturn = true)
+ {
+ var game2C_GetItemsResponse = MessageObjectPool.Rent();
+ game2C_GetItemsResponse.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ game2C_GetItemsResponse.SetIsPool(false);
+ }
+
+ return game2C_GetItemsResponse;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ ErrorCode = 0;
+ Items.Clear();
+ Rigs.Clear();
+ Slots.Clear();
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return OuterOpcode.Game2C_GetItemsResponse; }
+ [ProtoMember(1)]
+ public uint ErrorCode { get; set; }
+ [ProtoMember(2)]
+ public List Items { get; set; } = new List();
+ [ProtoMember(3)]
+ public List Rigs { get; set; } = new List();
+ [ProtoMember(4)]
+ public List Slots { get; set; } = new List();
+ }
+ ///
+ /// 请求使用物品
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class C2Game_UseItemRequest : AMessage, ICustomRouteRequest
+ {
+ public static C2Game_UseItemRequest Create(bool autoReturn = true)
+ {
+ var c2Game_UseItemRequest = MessageObjectPool.Rent();
+ c2Game_UseItemRequest.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ c2Game_UseItemRequest.SetIsPool(false);
+ }
+
+ return c2Game_UseItemRequest;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ ItemId = default;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return OuterOpcode.C2Game_UseItemRequest; }
+ [ProtoIgnore]
+ public Game2C_UseItemResponse ResponseType { get; set; }
+ [ProtoIgnore]
+ public int RouteType => Fantasy.RouteType.GameRoute;
+ [ProtoMember(1)]
+ public long ItemId { get; set; }
+ }
+ ///
+ /// 请求使用物品响应
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class Game2C_UseItemResponse : AMessage, ICustomRouteResponse
+ {
+ public static Game2C_UseItemResponse Create(bool autoReturn = true)
+ {
+ var game2C_UseItemResponse = MessageObjectPool.Rent();
+ game2C_UseItemResponse.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ game2C_UseItemResponse.SetIsPool(false);
+ }
+
+ return game2C_UseItemResponse;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ ErrorCode = 0;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return OuterOpcode.Game2C_UseItemResponse; }
+ [ProtoMember(1)]
+ public uint ErrorCode { get; set; }
+ }
+ ///
+ /// 物品变化
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class Game2C_ItemChange : AMessage, ICustomRouteMessage
+ {
+ public static Game2C_ItemChange Create(bool autoReturn = true)
+ {
+ var game2C_ItemChange = MessageObjectPool.Rent();
+ game2C_ItemChange.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ game2C_ItemChange.SetIsPool(false);
+ }
+
+ return game2C_ItemChange;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ Type = default;
+ Items.Clear();
+ Removes.Clear();
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return OuterOpcode.Game2C_ItemChange; }
+ [ProtoIgnore]
+ public int RouteType => Fantasy.RouteType.GameRoute;
+ [ProtoMember(1)]
+ public int Type { get; set; }
+ [ProtoMember(2)]
+ public List Items { get; set; } = new List();
+ [ProtoMember(3)]
+ public List Removes { get; set; } = new List();
+ }
+ ///
+ /// 请求安装或取下配件
+ ///
+////////// ******** 钓组 *******/////////////
+ [Serializable]
+ [ProtoContract]
+ public partial class C2Game_RigChangeRequest : AMessage, ICustomRouteRequest
+ {
+ public static C2Game_RigChangeRequest Create(bool autoReturn = true)
+ {
+ var c2Game_RigChangeRequest = MessageObjectPool.Rent();
+ c2Game_RigChangeRequest.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ c2Game_RigChangeRequest.SetIsPool(false);
+ }
+
+ return c2Game_RigChangeRequest;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ ItemId = default;
+ RigId = default;
+ OldRigId = default;
+ IsAdd = default;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return OuterOpcode.C2Game_RigChangeRequest; }
+ [ProtoIgnore]
+ public Game2C_RigChangeResponse ResponseType { get; set; }
+ [ProtoIgnore]
+ public int RouteType => Fantasy.RouteType.GameRoute;
+ [ProtoMember(1)]
+ public long ItemId { get; set; }
+ [ProtoMember(2)]
+ public long RigId { get; set; }
+ [ProtoMember(3)]
+ public long OldRigId { get; set; }
+ [ProtoMember(4)]
+ public bool IsAdd { get; set; }
+ }
+ ///
+ /// 请求安装配件响应
+ ///
+ [Serializable]
+ [ProtoContract]
+ public partial class Game2C_RigChangeResponse : AMessage, ICustomRouteResponse
+ {
+ public static Game2C_RigChangeResponse Create(bool autoReturn = true)
+ {
+ var game2C_RigChangeResponse = MessageObjectPool.Rent();
+ game2C_RigChangeResponse.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ game2C_RigChangeResponse.SetIsPool(false);
+ }
+
+ return game2C_RigChangeResponse;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ ErrorCode = 0;
+ if (Rigs != null)
+ {
+ Rigs.Dispose();
+ Rigs = null;
+ }
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return OuterOpcode.Game2C_RigChangeResponse; }
+ [ProtoMember(1)]
+ public uint ErrorCode { get; set; }
+ [ProtoMember(2)]
+ public ItemBindInfo Rigs { get; set; }
+ }
+ ///
+ /// 请求设置快速使用
+ ///
+////////// ******** 快速使用插槽 *******/////////////
+ [Serializable]
+ [ProtoContract]
+ public partial class C2Game_SetSlotRequest : AMessage, ICustomRouteRequest
+ {
+ public static C2Game_SetSlotRequest Create(bool autoReturn = true)
+ {
+ var c2Game_SetSlotRequest = MessageObjectPool.Rent();
+ c2Game_SetSlotRequest.AutoReturn = autoReturn;
+
+ if (!autoReturn)
+ {
+ c2Game_SetSlotRequest.SetIsPool(false);
+ }
+
+ return c2Game_SetSlotRequest;
+ }
+
+ public void Return()
+ {
+ if (!AutoReturn)
+ {
+ SetIsPool(true);
+ AutoReturn = true;
+ }
+ else if (!IsPool())
+ {
+ return;
+ }
+ Dispose();
+ }
+
+ public void Dispose()
+ {
+ if (!IsPool()) return;
+ Index = default;
+ Id = default;
+ MessageObjectPool.Return(this);
+ }
+ public uint OpCode() { return OuterOpcode.C2Game_SetSlotRequest; }
+ [ProtoIgnore]
+ public Game2C_SetSlotResponse ResponseType { get; set; }
+ [ProtoIgnore]
+ public int RouteType => Fantasy.RouteType.GameRoute;
+ [ProtoMember(1)]
+ public int Index { get; set; }
+ [ProtoMember(2)]
+ public long Id { get; set; }
+ }
+ ///