From c2ec7226c0c171d389936ad0db91124b0ff6b87a Mon Sep 17 00:00:00 2001 From: "Bob.Song" Date: Wed, 11 Mar 2026 10:15:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/Fantasy.config | 8 - Entity/Game/Player/Player.cs | 6 +- .../Components/ChatChannelCenterComponent.cs | 0 .../Chat/Components/ChatChannelComponent.cs | 0 .../Social/Chat/Enum/ChatChannelType.cs | 0 .../Social/Chat/Model/ChatInfoTree.cs | 0 .../{ => Game}/Social/Chat/Model/ChatUnit.cs | 0 Entity/{ => Game}/Social/Club/Club.cs | 0 .../Social/Club/ClubManageComponent.cs | 0 .../Social/Mail/Components/MailComponent.cs | 0 .../Mail/Components/MailManageComponent.cs | 0 Entity/{ => Game}/Social/Mail/Entity/Mail.cs | 0 .../{ => Game}/Social/Mail/Entity/MailBox.cs | 0 .../Social/Mail/Entity/MailConversation.cs | 0 .../{ => Game}/Social/Mail/Enum/MailEnum.cs | 0 Entity/Game/Social/SocialUnit.cs | 33 + .../Game/Social/SocialUnitManageComponent.cs | 17 + .../Generate/NetworkProtocol/OuterMessage.cs | 965 ++++++++---------- .../Generate/NetworkProtocol/OuterOpcode.cs | 97 +- Entity/Generate/NetworkProtocol/RouteType.cs | 4 +- Entity/Social/SocialUnit.cs | 33 - Entity/Social/SocialUnitManageComponent.cs | 17 - .../Handler/G2Common_EnterRequestHandler.cs | 40 +- .../Handler/G2Common_ExitRequestHandler.cs | 25 +- Hotfix/Common/Helper/SceneConfigHelper.cs | 4 - .../Handler/C2Map_CreateRoomRequestHandler.cs | 6 +- Hotfix/Game/Map/Handler/C2Map_LookHandler.cs | 6 +- Hotfix/Game/Map/Handler/C2Map_MoveHandler.cs | 6 +- .../C2Map_RolePropertyChangeHandler.cs | 6 +- .../Handler/C2Map_TakeItemRequestHandler.cs | 6 +- .../Inner/G2Chat_LoginRequestHandler.cs | 0 .../Inner/G2Chat_OfflineRequestHandler.cs | 0 .../Inner/Other2Chat_ChatMessageHandler.cs | 20 + .../Outer/C2Chat_SendMessageRequestHandler.cs | 5 +- .../Chat/Helper/ChatChannelCenterHelper.cs | 0 .../Social/Chat/Helper/ChatHelper.cs | 10 +- .../Social/Chat/Helper/ChatNodeFactory.cs | 0 .../Social/Chat/Helper/ChatSceneHelper.cs | 22 +- .../Social/Chat/Helper/ChatTreeFactory.cs | 0 .../ChatChannelCenterComponentSystem.cs | 0 .../Chat/System/ChatChannelComponentSystem.cs | 23 +- .../System/ChatUnitManageComponentSystem.cs | 0 .../C2Game_DeleteMailRequestHandler.cs} | 7 +- .../C2Game_GetConversationsRequestHandler.cs} | 7 +- .../Handler/C2Game_SendMailRequestHandler.cs} | 11 +- .../Social/Mail/Helper/MailBoxFactory.cs | 0 .../Mail/Helper/MailConversationHelper.cs | 0 .../Social/Mail/Helper/MailFactory.cs | 0 .../Social/Mail/Helper/MailHelper.cs | 0 .../Social/Mail/System/MailBoxSystem.cs | 0 .../Social/Mail/System/MailComponentSystem.cs | 4 +- .../Mail/System/MailConversationSystem.cs | 0 .../Mail/System/MailManageComponentSystem.cs | 0 .../Social/Mail/System/MailSystem.cs | 0 .../Social/SocialUnitManageComponentSystem.cs | 146 +++ Hotfix/Game/Social/SocialUnitSystem.cs | 22 + .../Handler/Inner/S2G_ChatMessageHandler.cs | 4 +- Hotfix/Gate/Helper/GateLoginHelper.cs | 4 +- Hotfix/Hotfix.csproj | 4 - Hotfix/OnCreateSceneEvent.cs | 14 +- .../Inner/Other2Chat_ChatMessageHandler.cs | 20 - .../Social/SocialUnitManageComponentSystem.cs | 146 --- Hotfix/Social/SocialUnitSystem.cs | 22 - Server.sln.DotSettings.user | 1 + Tools/NetworkProtocol/Outer/MapMessage.proto | 6 +- Tools/NetworkProtocol/Outer/RoomMessage.proto | 24 +- .../NetworkProtocol/Outer/SocialMessage.proto | 94 +- Tools/NetworkProtocol/RouteType.Config | 3 +- 68 files changed, 866 insertions(+), 1032 deletions(-) rename Entity/{ => Game}/Social/Chat/Components/ChatChannelCenterComponent.cs (100%) rename Entity/{ => Game}/Social/Chat/Components/ChatChannelComponent.cs (100%) rename Entity/{ => Game}/Social/Chat/Enum/ChatChannelType.cs (100%) rename Entity/{ => Game}/Social/Chat/Model/ChatInfoTree.cs (100%) rename Entity/{ => Game}/Social/Chat/Model/ChatUnit.cs (100%) rename Entity/{ => Game}/Social/Club/Club.cs (100%) rename Entity/{ => Game}/Social/Club/ClubManageComponent.cs (100%) rename Entity/{ => Game}/Social/Mail/Components/MailComponent.cs (100%) rename Entity/{ => Game}/Social/Mail/Components/MailManageComponent.cs (100%) rename Entity/{ => Game}/Social/Mail/Entity/Mail.cs (100%) rename Entity/{ => Game}/Social/Mail/Entity/MailBox.cs (100%) rename Entity/{ => Game}/Social/Mail/Entity/MailConversation.cs (100%) rename Entity/{ => Game}/Social/Mail/Enum/MailEnum.cs (100%) create mode 100644 Entity/Game/Social/SocialUnit.cs create mode 100644 Entity/Game/Social/SocialUnitManageComponent.cs delete mode 100644 Entity/Social/SocialUnit.cs delete mode 100644 Entity/Social/SocialUnitManageComponent.cs rename Hotfix/{ => Game}/Social/Chat/Handler/Inner/G2Chat_LoginRequestHandler.cs (100%) rename Hotfix/{ => Game}/Social/Chat/Handler/Inner/G2Chat_OfflineRequestHandler.cs (100%) create mode 100644 Hotfix/Game/Social/Chat/Handler/Inner/Other2Chat_ChatMessageHandler.cs rename Hotfix/{ => Game}/Social/Chat/Handler/Outer/C2Chat_SendMessageRequestHandler.cs (57%) rename Hotfix/{ => Game}/Social/Chat/Helper/ChatChannelCenterHelper.cs (100%) rename Hotfix/{ => Game}/Social/Chat/Helper/ChatHelper.cs (80%) rename Hotfix/{ => Game}/Social/Chat/Helper/ChatNodeFactory.cs (100%) rename Hotfix/{ => Game}/Social/Chat/Helper/ChatSceneHelper.cs (91%) rename Hotfix/{ => Game}/Social/Chat/Helper/ChatTreeFactory.cs (100%) rename Hotfix/{ => Game}/Social/Chat/System/ChatChannelCenterComponentSystem.cs (100%) rename Hotfix/{ => Game}/Social/Chat/System/ChatChannelComponentSystem.cs (78%) rename Hotfix/{ => Game}/Social/Chat/System/ChatUnitManageComponentSystem.cs (100%) rename Hotfix/{Social/Mail/Handler/C2S_DeleteMailRequestHandler.cs => Game/Social/Mail/Handler/C2Game_DeleteMailRequestHandler.cs} (79%) rename Hotfix/{Social/Mail/Handler/C2S_GetConversationsRequestHandler.cs => Game/Social/Mail/Handler/C2Game_GetConversationsRequestHandler.cs} (65%) rename Hotfix/{Social/Mail/Handler/C2S_SendMailRequestHandler.cs => Game/Social/Mail/Handler/C2Game_SendMailRequestHandler.cs} (79%) rename Hotfix/{ => Game}/Social/Mail/Helper/MailBoxFactory.cs (100%) rename Hotfix/{ => Game}/Social/Mail/Helper/MailConversationHelper.cs (100%) rename Hotfix/{ => Game}/Social/Mail/Helper/MailFactory.cs (100%) rename Hotfix/{ => Game}/Social/Mail/Helper/MailHelper.cs (100%) rename Hotfix/{ => Game}/Social/Mail/System/MailBoxSystem.cs (100%) rename Hotfix/{ => Game}/Social/Mail/System/MailComponentSystem.cs (92%) rename Hotfix/{ => Game}/Social/Mail/System/MailConversationSystem.cs (100%) rename Hotfix/{ => Game}/Social/Mail/System/MailManageComponentSystem.cs (100%) rename Hotfix/{ => Game}/Social/Mail/System/MailSystem.cs (100%) create mode 100644 Hotfix/Game/Social/SocialUnitManageComponentSystem.cs create mode 100644 Hotfix/Game/Social/SocialUnitSystem.cs delete mode 100644 Hotfix/Social/Chat/Handler/Inner/Other2Chat_ChatMessageHandler.cs delete mode 100644 Hotfix/Social/SocialUnitManageComponentSystem.cs delete mode 100644 Hotfix/Social/SocialUnitSystem.cs diff --git a/Entity/Fantasy.config b/Entity/Fantasy.config index 14f6c58..eb56289 100644 --- a/Entity/Fantasy.config +++ b/Entity/Fantasy.config @@ -57,14 +57,6 @@ networkProtocol="" outerPort="0" innerPort="11031" /> - - diff --git a/Entity/Game/Player/Player.cs b/Entity/Game/Player/Player.cs index 483bea1..624e133 100644 --- a/Entity/Game/Player/Player.cs +++ b/Entity/Game/Player/Player.cs @@ -2,6 +2,7 @@ using Fantasy.Entitas; using Fantasy.Helper; using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson.Serialization.Options; +using NB.Chat; namespace NB.Game; @@ -63,5 +64,8 @@ public sealed class Player : Entity [BsonIgnore] public long SessionRunTimeId; - + + + [BsonIgnore] public readonly Dictionary Channels = new(); + [BsonIgnore] public readonly Dictionary SendTime = new Dictionary(); } \ No newline at end of file diff --git a/Entity/Social/Chat/Components/ChatChannelCenterComponent.cs b/Entity/Game/Social/Chat/Components/ChatChannelCenterComponent.cs similarity index 100% rename from Entity/Social/Chat/Components/ChatChannelCenterComponent.cs rename to Entity/Game/Social/Chat/Components/ChatChannelCenterComponent.cs diff --git a/Entity/Social/Chat/Components/ChatChannelComponent.cs b/Entity/Game/Social/Chat/Components/ChatChannelComponent.cs similarity index 100% rename from Entity/Social/Chat/Components/ChatChannelComponent.cs rename to Entity/Game/Social/Chat/Components/ChatChannelComponent.cs diff --git a/Entity/Social/Chat/Enum/ChatChannelType.cs b/Entity/Game/Social/Chat/Enum/ChatChannelType.cs similarity index 100% rename from Entity/Social/Chat/Enum/ChatChannelType.cs rename to Entity/Game/Social/Chat/Enum/ChatChannelType.cs diff --git a/Entity/Social/Chat/Model/ChatInfoTree.cs b/Entity/Game/Social/Chat/Model/ChatInfoTree.cs similarity index 100% rename from Entity/Social/Chat/Model/ChatInfoTree.cs rename to Entity/Game/Social/Chat/Model/ChatInfoTree.cs diff --git a/Entity/Social/Chat/Model/ChatUnit.cs b/Entity/Game/Social/Chat/Model/ChatUnit.cs similarity index 100% rename from Entity/Social/Chat/Model/ChatUnit.cs rename to Entity/Game/Social/Chat/Model/ChatUnit.cs diff --git a/Entity/Social/Club/Club.cs b/Entity/Game/Social/Club/Club.cs similarity index 100% rename from Entity/Social/Club/Club.cs rename to Entity/Game/Social/Club/Club.cs diff --git a/Entity/Social/Club/ClubManageComponent.cs b/Entity/Game/Social/Club/ClubManageComponent.cs similarity index 100% rename from Entity/Social/Club/ClubManageComponent.cs rename to Entity/Game/Social/Club/ClubManageComponent.cs diff --git a/Entity/Social/Mail/Components/MailComponent.cs b/Entity/Game/Social/Mail/Components/MailComponent.cs similarity index 100% rename from Entity/Social/Mail/Components/MailComponent.cs rename to Entity/Game/Social/Mail/Components/MailComponent.cs diff --git a/Entity/Social/Mail/Components/MailManageComponent.cs b/Entity/Game/Social/Mail/Components/MailManageComponent.cs similarity index 100% rename from Entity/Social/Mail/Components/MailManageComponent.cs rename to Entity/Game/Social/Mail/Components/MailManageComponent.cs diff --git a/Entity/Social/Mail/Entity/Mail.cs b/Entity/Game/Social/Mail/Entity/Mail.cs similarity index 100% rename from Entity/Social/Mail/Entity/Mail.cs rename to Entity/Game/Social/Mail/Entity/Mail.cs diff --git a/Entity/Social/Mail/Entity/MailBox.cs b/Entity/Game/Social/Mail/Entity/MailBox.cs similarity index 100% rename from Entity/Social/Mail/Entity/MailBox.cs rename to Entity/Game/Social/Mail/Entity/MailBox.cs diff --git a/Entity/Social/Mail/Entity/MailConversation.cs b/Entity/Game/Social/Mail/Entity/MailConversation.cs similarity index 100% rename from Entity/Social/Mail/Entity/MailConversation.cs rename to Entity/Game/Social/Mail/Entity/MailConversation.cs diff --git a/Entity/Social/Mail/Enum/MailEnum.cs b/Entity/Game/Social/Mail/Enum/MailEnum.cs similarity index 100% rename from Entity/Social/Mail/Enum/MailEnum.cs rename to Entity/Game/Social/Mail/Enum/MailEnum.cs diff --git a/Entity/Game/Social/SocialUnit.cs b/Entity/Game/Social/SocialUnit.cs new file mode 100644 index 0000000..e6fe65f --- /dev/null +++ b/Entity/Game/Social/SocialUnit.cs @@ -0,0 +1,33 @@ +// using Fantasy; +// using Fantasy.Entitas; +// +// namespace NB.Chat; +// +// public sealed class SocialUnit : Entity +// { +// public long GateRouteId; +// +// public RoleSimpleInfo Role; +// +// /// +// /// 当前所在地图 +// /// +// public long MapId; +// +// +// public readonly Dictionary Channels = new(); +// public readonly Dictionary SendTime = new Dictionary(); +// +// +// public override void Dispose() +// { +// if (IsDisposed) +// { +// return; +// } +// +// GateRouteId = 0; +// Role = null; +// base.Dispose(); +// } +// } \ No newline at end of file diff --git a/Entity/Game/Social/SocialUnitManageComponent.cs b/Entity/Game/Social/SocialUnitManageComponent.cs new file mode 100644 index 0000000..20f0c34 --- /dev/null +++ b/Entity/Game/Social/SocialUnitManageComponent.cs @@ -0,0 +1,17 @@ +// using System.Collections.Generic; +// using Fantasy; +// using Fantasy.DataStructure.Collection; +// using Fantasy.Entitas; +// +// namespace NB.Chat; +// +// public class SocialUnitManageComponent : Entity +// { +// public readonly Dictionary Units = new(); +// +// // public List +// // /// +// // /// 不在线消息缓存 +// // /// +// // public readonly OneToManyList NotSendMessage = new(); +// } \ No newline at end of file diff --git a/Entity/Generate/NetworkProtocol/OuterMessage.cs b/Entity/Generate/NetworkProtocol/OuterMessage.cs index 0bfd71d..9e3b230 100644 --- a/Entity/Generate/NetworkProtocol/OuterMessage.cs +++ b/Entity/Generate/NetworkProtocol/OuterMessage.cs @@ -1049,19 +1049,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2Map_CreateRoomRequest : AMessage, ICustomRouteRequest + public partial class C2Game_CreateRoomRequest : AMessage, ICustomRouteRequest { - public static C2Map_CreateRoomRequest Create(bool autoReturn = true) + public static C2Game_CreateRoomRequest Create(bool autoReturn = true) { - var c2Map_CreateRoomRequest = MessageObjectPool.Rent(); - c2Map_CreateRoomRequest.AutoReturn = autoReturn; + var c2Game_CreateRoomRequest = MessageObjectPool.Rent(); + c2Game_CreateRoomRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2Map_CreateRoomRequest.SetIsPool(false); + c2Game_CreateRoomRequest.SetIsPool(false); } - return c2Map_CreateRoomRequest; + return c2Game_CreateRoomRequest; } public void Return() @@ -1082,11 +1082,11 @@ namespace Fantasy { if (!IsPool()) return; MapId = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2Map_CreateRoomRequest; } + public uint OpCode() { return OuterOpcode.C2Game_CreateRoomRequest; } [ProtoIgnore] - public Map2C_CreateRoomResponse ResponseType { get; set; } + public Game2C_CreateRoomResponse ResponseType { get; set; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -1097,19 +1097,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class Map2C_CreateRoomResponse : AMessage, ICustomRouteResponse + public partial class Game2C_CreateRoomResponse : AMessage, ICustomRouteResponse { - public static Map2C_CreateRoomResponse Create(bool autoReturn = true) + public static Game2C_CreateRoomResponse Create(bool autoReturn = true) { - var map2C_CreateRoomResponse = MessageObjectPool.Rent(); - map2C_CreateRoomResponse.AutoReturn = autoReturn; + var game2C_CreateRoomResponse = MessageObjectPool.Rent(); + game2C_CreateRoomResponse.AutoReturn = autoReturn; if (!autoReturn) { - map2C_CreateRoomResponse.SetIsPool(false); + game2C_CreateRoomResponse.SetIsPool(false); } - return map2C_CreateRoomResponse; + return game2C_CreateRoomResponse; } public void Return() @@ -1132,9 +1132,9 @@ namespace Fantasy ErrorCode = 0; RoomCode = default; Units.Clear(); - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.Map2C_CreateRoomResponse; } + public uint OpCode() { return OuterOpcode.Game2C_CreateRoomResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -1342,19 +1342,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class Map2C_ChangeMap : AMessage, ICustomRouteMessage + public partial class Game2C_ChangeMap : AMessage, ICustomRouteMessage { - public static Map2C_ChangeMap Create(bool autoReturn = true) + public static Game2C_ChangeMap Create(bool autoReturn = true) { - var map2C_ChangeMap = MessageObjectPool.Rent(); - map2C_ChangeMap.AutoReturn = autoReturn; + var game2C_ChangeMap = MessageObjectPool.Rent(); + game2C_ChangeMap.AutoReturn = autoReturn; if (!autoReturn) { - map2C_ChangeMap.SetIsPool(false); + game2C_ChangeMap.SetIsPool(false); } - return map2C_ChangeMap; + return game2C_ChangeMap; } public void Return() @@ -1376,9 +1376,9 @@ namespace Fantasy if (!IsPool()) return; MapId = default; Node = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.Map2C_ChangeMap; } + public uint OpCode() { return OuterOpcode.Game2C_ChangeMap; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -1711,19 +1711,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class Map2C_RoleEnterRoomNotify : AMessage, ICustomRouteMessage + public partial class Game2C_RoleEnterRoomNotify : AMessage, ICustomRouteMessage { - public static Map2C_RoleEnterRoomNotify Create(bool autoReturn = true) + public static Game2C_RoleEnterRoomNotify Create(bool autoReturn = true) { - var map2C_RoleEnterRoomNotify = MessageObjectPool.Rent(); - map2C_RoleEnterRoomNotify.AutoReturn = autoReturn; + var game2C_RoleEnterRoomNotify = MessageObjectPool.Rent(); + game2C_RoleEnterRoomNotify.AutoReturn = autoReturn; if (!autoReturn) { - map2C_RoleEnterRoomNotify.SetIsPool(false); + game2C_RoleEnterRoomNotify.SetIsPool(false); } - return map2C_RoleEnterRoomNotify; + return game2C_RoleEnterRoomNotify; } public void Return() @@ -1748,9 +1748,9 @@ namespace Fantasy Info.Dispose(); Info = null; } - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.Map2C_RoleEnterRoomNotify; } + public uint OpCode() { return OuterOpcode.Game2C_RoleEnterRoomNotify; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -1761,19 +1761,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class Map2C_RoleExitRoomNotify : AMessage, ICustomRouteMessage + public partial class Game2C_RoleExitRoomNotify : AMessage, ICustomRouteMessage { - public static Map2C_RoleExitRoomNotify Create(bool autoReturn = true) + public static Game2C_RoleExitRoomNotify Create(bool autoReturn = true) { - var map2C_RoleExitRoomNotify = MessageObjectPool.Rent(); - map2C_RoleExitRoomNotify.AutoReturn = autoReturn; + var game2C_RoleExitRoomNotify = MessageObjectPool.Rent(); + game2C_RoleExitRoomNotify.AutoReturn = autoReturn; if (!autoReturn) { - map2C_RoleExitRoomNotify.SetIsPool(false); + game2C_RoleExitRoomNotify.SetIsPool(false); } - return map2C_RoleExitRoomNotify; + return game2C_RoleExitRoomNotify; } public void Return() @@ -1794,9 +1794,9 @@ namespace Fantasy { if (!IsPool()) return; Id = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.Map2C_RoleExitRoomNotify; } + public uint OpCode() { return OuterOpcode.Game2C_RoleExitRoomNotify; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -1807,19 +1807,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2Map_TakeItemRequest : AMessage, ICustomRouteRequest + public partial class C2Game_TakeItemRequest : AMessage, ICustomRouteRequest { - public static C2Map_TakeItemRequest Create(bool autoReturn = true) + public static C2Game_TakeItemRequest Create(bool autoReturn = true) { - var c2Map_TakeItemRequest = MessageObjectPool.Rent(); - c2Map_TakeItemRequest.AutoReturn = autoReturn; + var c2Game_TakeItemRequest = MessageObjectPool.Rent(); + c2Game_TakeItemRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2Map_TakeItemRequest.SetIsPool(false); + c2Game_TakeItemRequest.SetIsPool(false); } - return c2Map_TakeItemRequest; + return c2Game_TakeItemRequest; } public void Return() @@ -1841,11 +1841,11 @@ namespace Fantasy if (!IsPool()) return; Id = default; Task = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2Map_TakeItemRequest; } + public uint OpCode() { return OuterOpcode.C2Game_TakeItemRequest; } [ProtoIgnore] - public Map2C_TakeItemResponse ResponseType { get; set; } + public Game2C_TakeItemResponse ResponseType { get; set; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -1858,19 +1858,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class Map2C_TakeItemResponse : AMessage, ICustomRouteResponse + public partial class Game2C_TakeItemResponse : AMessage, ICustomRouteResponse { - public static Map2C_TakeItemResponse Create(bool autoReturn = true) + public static Game2C_TakeItemResponse Create(bool autoReturn = true) { - var map2C_TakeItemResponse = MessageObjectPool.Rent(); - map2C_TakeItemResponse.AutoReturn = autoReturn; + var game2C_TakeItemResponse = MessageObjectPool.Rent(); + game2C_TakeItemResponse.AutoReturn = autoReturn; if (!autoReturn) { - map2C_TakeItemResponse.SetIsPool(false); + game2C_TakeItemResponse.SetIsPool(false); } - return map2C_TakeItemResponse; + return game2C_TakeItemResponse; } public void Return() @@ -1893,9 +1893,9 @@ namespace Fantasy ErrorCode = 0; Id = default; Task = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.Map2C_TakeItemResponse; } + public uint OpCode() { return OuterOpcode.Game2C_TakeItemResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -1905,19 +1905,19 @@ namespace Fantasy } [Serializable] [ProtoContract] - public partial class C2Map_RolePropertyChange : AMessage, ICustomRouteMessage + public partial class C2Game_RolePropertyChange : AMessage, ICustomRouteMessage { - public static C2Map_RolePropertyChange Create(bool autoReturn = true) + public static C2Game_RolePropertyChange Create(bool autoReturn = true) { - var c2Map_RolePropertyChange = MessageObjectPool.Rent(); - c2Map_RolePropertyChange.AutoReturn = autoReturn; + var c2Game_RolePropertyChange = MessageObjectPool.Rent(); + c2Game_RolePropertyChange.AutoReturn = autoReturn; if (!autoReturn) { - c2Map_RolePropertyChange.SetIsPool(false); + c2Game_RolePropertyChange.SetIsPool(false); } - return c2Map_RolePropertyChange; + return c2Game_RolePropertyChange; } public void Return() @@ -1938,9 +1938,9 @@ namespace Fantasy { if (!IsPool()) return; Propertys.Clear(); - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2Map_RolePropertyChange; } + public uint OpCode() { return OuterOpcode.C2Game_RolePropertyChange; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -1951,19 +1951,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class Map2C_RoleStateNotify : AMessage, ICustomRouteMessage + public partial class Game2C_RoleStateNotify : AMessage, ICustomRouteMessage { - public static Map2C_RoleStateNotify Create(bool autoReturn = true) + public static Game2C_RoleStateNotify Create(bool autoReturn = true) { - var map2C_RoleStateNotify = MessageObjectPool.Rent(); - map2C_RoleStateNotify.AutoReturn = autoReturn; + var game2C_RoleStateNotify = MessageObjectPool.Rent(); + game2C_RoleStateNotify.AutoReturn = autoReturn; if (!autoReturn) { - map2C_RoleStateNotify.SetIsPool(false); + game2C_RoleStateNotify.SetIsPool(false); } - return map2C_RoleStateNotify; + return game2C_RoleStateNotify; } public void Return() @@ -1989,9 +1989,9 @@ namespace Fantasy State.Dispose(); State = null; } - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.Map2C_RoleStateNotify; } + public uint OpCode() { return OuterOpcode.Game2C_RoleStateNotify; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -2004,19 +2004,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class Map2C_RoleGearChangeNotify : AMessage, ICustomRouteMessage + public partial class Game2C_RoleGearChangeNotify : AMessage, ICustomRouteMessage { - public static Map2C_RoleGearChangeNotify Create(bool autoReturn = true) + public static Game2C_RoleGearChangeNotify Create(bool autoReturn = true) { - var map2C_RoleGearChangeNotify = MessageObjectPool.Rent(); - map2C_RoleGearChangeNotify.AutoReturn = autoReturn; + var game2C_RoleGearChangeNotify = MessageObjectPool.Rent(); + game2C_RoleGearChangeNotify.AutoReturn = autoReturn; if (!autoReturn) { - map2C_RoleGearChangeNotify.SetIsPool(false); + game2C_RoleGearChangeNotify.SetIsPool(false); } - return map2C_RoleGearChangeNotify; + return game2C_RoleGearChangeNotify; } public void Return() @@ -2038,9 +2038,9 @@ namespace Fantasy if (!IsPool()) return; Id = default; Gears.Clear(); - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.Map2C_RoleGearChangeNotify; } + public uint OpCode() { return OuterOpcode.Game2C_RoleGearChangeNotify; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -2050,19 +2050,19 @@ namespace Fantasy } [Serializable] [ProtoContract] - public partial class Map2C_RolePropertyChangeNotify : AMessage, ICustomRouteMessage + public partial class Game2C_RolePropertyChangeNotify : AMessage, ICustomRouteMessage { - public static Map2C_RolePropertyChangeNotify Create(bool autoReturn = true) + public static Game2C_RolePropertyChangeNotify Create(bool autoReturn = true) { - var map2C_RolePropertyChangeNotify = MessageObjectPool.Rent(); - map2C_RolePropertyChangeNotify.AutoReturn = autoReturn; + var game2C_RolePropertyChangeNotify = MessageObjectPool.Rent(); + game2C_RolePropertyChangeNotify.AutoReturn = autoReturn; if (!autoReturn) { - map2C_RolePropertyChangeNotify.SetIsPool(false); + game2C_RolePropertyChangeNotify.SetIsPool(false); } - return map2C_RolePropertyChangeNotify; + return game2C_RolePropertyChangeNotify; } public void Return() @@ -2084,9 +2084,9 @@ namespace Fantasy if (!IsPool()) return; Id = default; Propertys.Clear(); - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.Map2C_RolePropertyChangeNotify; } + public uint OpCode() { return OuterOpcode.Game2C_RolePropertyChangeNotify; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -2096,19 +2096,19 @@ namespace Fantasy } [Serializable] [ProtoContract] - public partial class C2Map_Move : AMessage, ICustomRouteMessage + public partial class C2Game_Move : AMessage, ICustomRouteMessage { - public static C2Map_Move Create(bool autoReturn = true) + public static C2Game_Move Create(bool autoReturn = true) { - var c2Map_Move = MessageObjectPool.Rent(); - c2Map_Move.AutoReturn = autoReturn; + var c2Game_Move = MessageObjectPool.Rent(); + c2Game_Move.AutoReturn = autoReturn; if (!autoReturn) { - c2Map_Move.SetIsPool(false); + c2Game_Move.SetIsPool(false); } - return c2Map_Move; + return c2Game_Move; } public void Return() @@ -2146,9 +2146,9 @@ namespace Fantasy IsStop = default; IsRun = default; Timestamp = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2Map_Move; } + public uint OpCode() { return OuterOpcode.C2Game_Move; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -2166,19 +2166,19 @@ namespace Fantasy } [Serializable] [ProtoContract] - public partial class C2Map_Look : AMessage, ICustomRouteMessage + public partial class C2Game_Look : AMessage, ICustomRouteMessage { - public static C2Map_Look Create(bool autoReturn = true) + public static C2Game_Look Create(bool autoReturn = true) { - var c2Map_Look = MessageObjectPool.Rent(); - c2Map_Look.AutoReturn = autoReturn; + var c2Game_Look = MessageObjectPool.Rent(); + c2Game_Look.AutoReturn = autoReturn; if (!autoReturn) { - c2Map_Look.SetIsPool(false); + c2Game_Look.SetIsPool(false); } - return c2Map_Look; + return c2Game_Look; } public void Return() @@ -2204,9 +2204,9 @@ namespace Fantasy Rotation = null; } Timestamp = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2Map_Look; } + public uint OpCode() { return OuterOpcode.C2Game_Look; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -2219,19 +2219,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class Map2C_MoveNotify : AMessage, ICustomRouteMessage + public partial class Game2C_MoveNotify : AMessage, ICustomRouteMessage { - public static Map2C_MoveNotify Create(bool autoReturn = true) + public static Game2C_MoveNotify Create(bool autoReturn = true) { - var map2C_MoveNotify = MessageObjectPool.Rent(); - map2C_MoveNotify.AutoReturn = autoReturn; + var game2C_MoveNotify = MessageObjectPool.Rent(); + game2C_MoveNotify.AutoReturn = autoReturn; if (!autoReturn) { - map2C_MoveNotify.SetIsPool(false); + game2C_MoveNotify.SetIsPool(false); } - return map2C_MoveNotify; + return game2C_MoveNotify; } public void Return() @@ -2270,9 +2270,9 @@ namespace Fantasy IsStop = default; IsRun = default; Timestamp = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.Map2C_MoveNotify; } + public uint OpCode() { return OuterOpcode.Game2C_MoveNotify; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -2295,19 +2295,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class Map2C_LookeNotify : AMessage, ICustomRouteMessage + public partial class Game2C_LookeNotify : AMessage, ICustomRouteMessage { - public static Map2C_LookeNotify Create(bool autoReturn = true) + public static Game2C_LookeNotify Create(bool autoReturn = true) { - var map2C_LookeNotify = MessageObjectPool.Rent(); - map2C_LookeNotify.AutoReturn = autoReturn; + var game2C_LookeNotify = MessageObjectPool.Rent(); + game2C_LookeNotify.AutoReturn = autoReturn; if (!autoReturn) { - map2C_LookeNotify.SetIsPool(false); + game2C_LookeNotify.SetIsPool(false); } - return map2C_LookeNotify; + return game2C_LookeNotify; } public void Return() @@ -2334,9 +2334,9 @@ namespace Fantasy Rotation = null; } Timestamp = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.Map2C_LookeNotify; } + public uint OpCode() { return OuterOpcode.Game2C_LookeNotify; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] @@ -2460,19 +2460,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_GetConversationsRequest : AMessage, ICustomRouteRequest + public partial class C2Game_GetConversationsRequest : AMessage, ICustomRouteRequest { - public static C2S_GetConversationsRequest Create(bool autoReturn = true) + public static C2Game_GetConversationsRequest Create(bool autoReturn = true) { - var c2S_GetConversationsRequest = MessageObjectPool.Rent(); - c2S_GetConversationsRequest.AutoReturn = autoReturn; + var c2Game_GetConversationsRequest = MessageObjectPool.Rent(); + c2Game_GetConversationsRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_GetConversationsRequest.SetIsPool(false); + c2Game_GetConversationsRequest.SetIsPool(false); } - return c2S_GetConversationsRequest; + return c2Game_GetConversationsRequest; } public void Return() @@ -2492,32 +2492,32 @@ namespace Fantasy public void Dispose() { if (!IsPool()) return; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_GetConversationsRequest; } + public uint OpCode() { return OuterOpcode.C2Game_GetConversationsRequest; } [ProtoIgnore] - public S2C_GetConversationsResponse ResponseType { get; set; } + public Game2C_GetConversationsResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; } /// /// 请求会话列表响应 /// [Serializable] [ProtoContract] - public partial class S2C_GetConversationsResponse : AMessage, ICustomRouteResponse + public partial class Game2C_GetConversationsResponse : AMessage, ICustomRouteResponse { - public static S2C_GetConversationsResponse Create(bool autoReturn = true) + public static Game2C_GetConversationsResponse Create(bool autoReturn = true) { - var s2C_GetConversationsResponse = MessageObjectPool.Rent(); - s2C_GetConversationsResponse.AutoReturn = autoReturn; + var game2C_GetConversationsResponse = MessageObjectPool.Rent(); + game2C_GetConversationsResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_GetConversationsResponse.SetIsPool(false); + game2C_GetConversationsResponse.SetIsPool(false); } - return s2C_GetConversationsResponse; + return game2C_GetConversationsResponse; } public void Return() @@ -2539,9 +2539,9 @@ namespace Fantasy if (!IsPool()) return; ErrorCode = 0; List.Clear(); - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_GetConversationsResponse; } + public uint OpCode() { return OuterOpcode.Game2C_GetConversationsResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -2552,19 +2552,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_SendMailRequest : AMessage, ICustomRouteRequest + public partial class C2Game_SendMailRequest : AMessage, ICustomRouteRequest { - public static C2S_SendMailRequest Create(bool autoReturn = true) + public static C2Game_SendMailRequest Create(bool autoReturn = true) { - var c2S_SendMailRequest = MessageObjectPool.Rent(); - c2S_SendMailRequest.AutoReturn = autoReturn; + var c2Game_SendMailRequest = MessageObjectPool.Rent(); + c2Game_SendMailRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_SendMailRequest.SetIsPool(false); + c2Game_SendMailRequest.SetIsPool(false); } - return c2S_SendMailRequest; + return c2Game_SendMailRequest; } public void Return() @@ -2587,13 +2587,13 @@ namespace Fantasy Target = default; Content = default; Items.Clear(); - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_SendMailRequest; } + public uint OpCode() { return OuterOpcode.C2Game_SendMailRequest; } [ProtoIgnore] - public S2C_SendMailResponse ResponseType { get; set; } + public Game2C_SendMailResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public long Target { get; set; } [ProtoMember(2)] @@ -2606,19 +2606,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_SendMailResponse : AMessage, ICustomRouteResponse + public partial class Game2C_SendMailResponse : AMessage, ICustomRouteResponse { - public static S2C_SendMailResponse Create(bool autoReturn = true) + public static Game2C_SendMailResponse Create(bool autoReturn = true) { - var s2C_SendMailResponse = MessageObjectPool.Rent(); - s2C_SendMailResponse.AutoReturn = autoReturn; + var game2C_SendMailResponse = MessageObjectPool.Rent(); + game2C_SendMailResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_SendMailResponse.SetIsPool(false); + game2C_SendMailResponse.SetIsPool(false); } - return s2C_SendMailResponse; + return game2C_SendMailResponse; } public void Return() @@ -2639,9 +2639,9 @@ namespace Fantasy { if (!IsPool()) return; ErrorCode = 0; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_SendMailResponse; } + public uint OpCode() { return OuterOpcode.Game2C_SendMailResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } } @@ -2650,19 +2650,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_DeleteMailRequest : AMessage, ICustomRouteRequest + public partial class C2Game_DeleteMailRequest : AMessage, ICustomRouteRequest { - public static C2S_DeleteMailRequest Create(bool autoReturn = true) + public static C2Game_DeleteMailRequest Create(bool autoReturn = true) { - var c2S_DeleteMailRequest = MessageObjectPool.Rent(); - c2S_DeleteMailRequest.AutoReturn = autoReturn; + var c2Game_DeleteMailRequest = MessageObjectPool.Rent(); + c2Game_DeleteMailRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_DeleteMailRequest.SetIsPool(false); + c2Game_DeleteMailRequest.SetIsPool(false); } - return c2S_DeleteMailRequest; + return c2Game_DeleteMailRequest; } public void Return() @@ -2683,13 +2683,13 @@ namespace Fantasy { if (!IsPool()) return; Id = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_DeleteMailRequest; } + public uint OpCode() { return OuterOpcode.C2Game_DeleteMailRequest; } [ProtoIgnore] - public S2C_DeleteMailResponse ResponseType { get; set; } + public Game2C_DeleteMailResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public long Id { get; set; } } @@ -2698,19 +2698,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_DeleteMailResponse : AMessage, ICustomRouteResponse + public partial class Game2C_DeleteMailResponse : AMessage, ICustomRouteResponse { - public static S2C_DeleteMailResponse Create(bool autoReturn = true) + public static Game2C_DeleteMailResponse Create(bool autoReturn = true) { - var s2C_DeleteMailResponse = MessageObjectPool.Rent(); - s2C_DeleteMailResponse.AutoReturn = autoReturn; + var game2C_DeleteMailResponse = MessageObjectPool.Rent(); + game2C_DeleteMailResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_DeleteMailResponse.SetIsPool(false); + game2C_DeleteMailResponse.SetIsPool(false); } - return s2C_DeleteMailResponse; + return game2C_DeleteMailResponse; } public void Return() @@ -2732,9 +2732,9 @@ namespace Fantasy if (!IsPool()) return; ErrorCode = 0; Id = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_DeleteMailResponse; } + public uint OpCode() { return OuterOpcode.Game2C_DeleteMailResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -2745,19 +2745,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_HaveMail : AMessage, ICustomRouteMessage + public partial class Game2C_HaveMail : AMessage, ICustomRouteMessage { - public static S2C_HaveMail Create(bool autoReturn = true) + public static Game2C_HaveMail Create(bool autoReturn = true) { - var s2C_HaveMail = MessageObjectPool.Rent(); - s2C_HaveMail.AutoReturn = autoReturn; + var game2C_HaveMail = MessageObjectPool.Rent(); + game2C_HaveMail.AutoReturn = autoReturn; if (!autoReturn) { - s2C_HaveMail.SetIsPool(false); + game2C_HaveMail.SetIsPool(false); } - return s2C_HaveMail; + return game2C_HaveMail; } public void Return() @@ -2783,11 +2783,11 @@ namespace Fantasy Mail = null; } Key = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_HaveMail; } + public uint OpCode() { return OuterOpcode.Game2C_HaveMail; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public MailInfo Mail { get; set; } [ProtoMember(2)] @@ -2795,19 +2795,19 @@ namespace Fantasy } [Serializable] [ProtoContract] - public partial class S2C_MailState : AMessage, ICustomRouteMessage + public partial class Game2C_MailState : AMessage, ICustomRouteMessage { - public static S2C_MailState Create(bool autoReturn = true) + public static Game2C_MailState Create(bool autoReturn = true) { - var s2C_MailState = MessageObjectPool.Rent(); - s2C_MailState.AutoReturn = autoReturn; + var game2C_MailState = MessageObjectPool.Rent(); + game2C_MailState.AutoReturn = autoReturn; if (!autoReturn) { - s2C_MailState.SetIsPool(false); + game2C_MailState.SetIsPool(false); } - return s2C_MailState; + return game2C_MailState; } public void Return() @@ -2829,11 +2829,11 @@ namespace Fantasy if (!IsPool()) return; MailState = default; MailId = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_MailState; } + public uint OpCode() { return OuterOpcode.Game2C_MailState; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public int MailState { get; set; } [ProtoMember(2)] @@ -2845,19 +2845,19 @@ namespace Fantasy ////////// ******** 频道聊天 *******///////////// [Serializable] [ProtoContract] - public partial class C2Chat_SendMessageRequest : AMessage, ICustomRouteRequest + public partial class C2Game_SendMessageRequest : AMessage, ICustomRouteRequest { - public static C2Chat_SendMessageRequest Create(bool autoReturn = true) + public static C2Game_SendMessageRequest Create(bool autoReturn = true) { - var c2Chat_SendMessageRequest = MessageObjectPool.Rent(); - c2Chat_SendMessageRequest.AutoReturn = autoReturn; + var c2Game_SendMessageRequest = MessageObjectPool.Rent(); + c2Game_SendMessageRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2Chat_SendMessageRequest.SetIsPool(false); + c2Game_SendMessageRequest.SetIsPool(false); } - return c2Chat_SendMessageRequest; + return c2Game_SendMessageRequest; } public void Return() @@ -2882,31 +2882,31 @@ namespace Fantasy ChatInfoTree.Dispose(); ChatInfoTree = null; } - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2Chat_SendMessageRequest; } + public uint OpCode() { return OuterOpcode.C2Game_SendMessageRequest; } [ProtoIgnore] - public Chat2C_SendMessageResponse ResponseType { get; set; } + public Game2C_SendMessageResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public ChatInfoTree ChatInfoTree { get; set; } } [Serializable] [ProtoContract] - public partial class Chat2C_SendMessageResponse : AMessage, ICustomRouteResponse + public partial class Game2C_SendMessageResponse : AMessage, ICustomRouteResponse { - public static Chat2C_SendMessageResponse Create(bool autoReturn = true) + public static Game2C_SendMessageResponse Create(bool autoReturn = true) { - var chat2C_SendMessageResponse = MessageObjectPool.Rent(); - chat2C_SendMessageResponse.AutoReturn = autoReturn; + var game2C_SendMessageResponse = MessageObjectPool.Rent(); + game2C_SendMessageResponse.AutoReturn = autoReturn; if (!autoReturn) { - chat2C_SendMessageResponse.SetIsPool(false); + game2C_SendMessageResponse.SetIsPool(false); } - return chat2C_SendMessageResponse; + return game2C_SendMessageResponse; } public void Return() @@ -2927,27 +2927,27 @@ namespace Fantasy { if (!IsPool()) return; ErrorCode = 0; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.Chat2C_SendMessageResponse; } + public uint OpCode() { return OuterOpcode.Game2C_SendMessageResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } } [Serializable] [ProtoContract] - public partial class Chat2C_Message : AMessage, ICustomRouteMessage + public partial class Game2C_Message : AMessage, ICustomRouteMessage { - public static Chat2C_Message Create(bool autoReturn = true) + public static Game2C_Message Create(bool autoReturn = true) { - var chat2C_Message = MessageObjectPool.Rent(); - chat2C_Message.AutoReturn = autoReturn; + var game2C_Message = MessageObjectPool.Rent(); + game2C_Message.AutoReturn = autoReturn; if (!autoReturn) { - chat2C_Message.SetIsPool(false); + game2C_Message.SetIsPool(false); } - return chat2C_Message; + return game2C_Message; } public void Return() @@ -2972,11 +2972,11 @@ namespace Fantasy ChatInfoTree.Dispose(); ChatInfoTree = null; } - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.Chat2C_Message; } + public uint OpCode() { return OuterOpcode.Game2C_Message; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public ChatInfoTree ChatInfoTree { get; set; } } @@ -3335,19 +3335,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_CreateChannelRequest : AMessage, ICustomRouteRequest + public partial class C2Game_CreateChannelRequest : AMessage, ICustomRouteRequest { - public static C2S_CreateChannelRequest Create(bool autoReturn = true) + public static C2Game_CreateChannelRequest Create(bool autoReturn = true) { - var c2S_CreateChannelRequest = MessageObjectPool.Rent(); - c2S_CreateChannelRequest.AutoReturn = autoReturn; + var c2Game_CreateChannelRequest = MessageObjectPool.Rent(); + c2Game_CreateChannelRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_CreateChannelRequest.SetIsPool(false); + c2Game_CreateChannelRequest.SetIsPool(false); } - return c2S_CreateChannelRequest; + return c2Game_CreateChannelRequest; } public void Return() @@ -3368,13 +3368,13 @@ namespace Fantasy { if (!IsPool()) return; Name = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_CreateChannelRequest; } + public uint OpCode() { return OuterOpcode.C2Game_CreateChannelRequest; } [ProtoIgnore] - public S2C_CreateChannelResponse ResponseType { get; set; } + public Game2C_CreateChannelResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public string Name { get; set; } } @@ -3383,19 +3383,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_CreateChannelResponse : AMessage, ICustomRouteResponse + public partial class Game2C_CreateChannelResponse : AMessage, ICustomRouteResponse { - public static S2C_CreateChannelResponse Create(bool autoReturn = true) + public static Game2C_CreateChannelResponse Create(bool autoReturn = true) { - var s2C_CreateChannelResponse = MessageObjectPool.Rent(); - s2C_CreateChannelResponse.AutoReturn = autoReturn; + var game2C_CreateChannelResponse = MessageObjectPool.Rent(); + game2C_CreateChannelResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_CreateChannelResponse.SetIsPool(false); + game2C_CreateChannelResponse.SetIsPool(false); } - return s2C_CreateChannelResponse; + return game2C_CreateChannelResponse; } public void Return() @@ -3417,9 +3417,9 @@ namespace Fantasy if (!IsPool()) return; ErrorCode = 0; ChannelId = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_CreateChannelResponse; } + public uint OpCode() { return OuterOpcode.Game2C_CreateChannelResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -3430,19 +3430,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_JoinChannelRequest : AMessage, ICustomRouteRequest + public partial class C2Game_JoinChannelRequest : AMessage, ICustomRouteRequest { - public static C2S_JoinChannelRequest Create(bool autoReturn = true) + public static C2Game_JoinChannelRequest Create(bool autoReturn = true) { - var c2S_JoinChannelRequest = MessageObjectPool.Rent(); - c2S_JoinChannelRequest.AutoReturn = autoReturn; + var c2Game_JoinChannelRequest = MessageObjectPool.Rent(); + c2Game_JoinChannelRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_JoinChannelRequest.SetIsPool(false); + c2Game_JoinChannelRequest.SetIsPool(false); } - return c2S_JoinChannelRequest; + return c2Game_JoinChannelRequest; } public void Return() @@ -3463,13 +3463,13 @@ namespace Fantasy { if (!IsPool()) return; Target = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_JoinChannelRequest; } + public uint OpCode() { return OuterOpcode.C2Game_JoinChannelRequest; } [ProtoIgnore] - public S2C_JoinChannelResponse ResponseType { get; set; } + public Game2C_JoinChannelResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public long Target { get; set; } } @@ -3478,19 +3478,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_JoinChannelResponse : AMessage, ICustomRouteResponse + public partial class Game2C_JoinChannelResponse : AMessage, ICustomRouteResponse { - public static S2C_JoinChannelResponse Create(bool autoReturn = true) + public static Game2C_JoinChannelResponse Create(bool autoReturn = true) { - var s2C_JoinChannelResponse = MessageObjectPool.Rent(); - s2C_JoinChannelResponse.AutoReturn = autoReturn; + var game2C_JoinChannelResponse = MessageObjectPool.Rent(); + game2C_JoinChannelResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_JoinChannelResponse.SetIsPool(false); + game2C_JoinChannelResponse.SetIsPool(false); } - return s2C_JoinChannelResponse; + return game2C_JoinChannelResponse; } public void Return() @@ -3511,157 +3511,12 @@ namespace Fantasy { if (!IsPool()) return; ErrorCode = 0; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_JoinChannelResponse; } + public uint OpCode() { return OuterOpcode.Game2C_JoinChannelResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } } - /// - /// 发送消息 - /// - [Serializable] - [ProtoContract] - public partial class C2S_SendMessageRequest : AMessage, ICustomRouteRequest - { - public static C2S_SendMessageRequest Create(bool autoReturn = true) - { - var c2S_SendMessageRequest = MessageObjectPool.Rent(); - c2S_SendMessageRequest.AutoReturn = autoReturn; - - if (!autoReturn) - { - c2S_SendMessageRequest.SetIsPool(false); - } - - return c2S_SendMessageRequest; - } - - public void Return() - { - if (!AutoReturn) - { - SetIsPool(true); - AutoReturn = true; - } - else if (!IsPool()) - { - return; - } - Dispose(); - } - - public void Dispose() - { - if (!IsPool()) return; - Message = default; - Target = default; - MessageObjectPool.Return(this); - } - public uint OpCode() { return OuterOpcode.C2S_SendMessageRequest; } - [ProtoIgnore] - public S2C_SendMessageResponse ResponseType { get; set; } - [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; - [ProtoMember(1)] - public string Message { get; set; } - [ProtoMember(2)] - public long Target { get; set; } - } - /// - /// 发送消息响应 - /// - [Serializable] - [ProtoContract] - public partial class S2C_SendMessageResponse : AMessage, ICustomRouteResponse - { - public static S2C_SendMessageResponse Create(bool autoReturn = true) - { - var s2C_SendMessageResponse = MessageObjectPool.Rent(); - s2C_SendMessageResponse.AutoReturn = autoReturn; - - if (!autoReturn) - { - s2C_SendMessageResponse.SetIsPool(false); - } - - return s2C_SendMessageResponse; - } - - 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.S2C_SendMessageResponse; } - [ProtoMember(1)] - public uint ErrorCode { get; set; } - } - /// - /// 推送消息 - /// - [Serializable] - [ProtoContract] - public partial class S2C_Message : AMessage, ICustomRouteMessage - { - public static S2C_Message Create(bool autoReturn = true) - { - var s2C_Message = MessageObjectPool.Rent(); - s2C_Message.AutoReturn = autoReturn; - - if (!autoReturn) - { - s2C_Message.SetIsPool(false); - } - - return s2C_Message; - } - - public void Return() - { - if (!AutoReturn) - { - SetIsPool(true); - AutoReturn = true; - } - else if (!IsPool()) - { - return; - } - Dispose(); - } - - public void Dispose() - { - if (!IsPool()) return; - if (Msg != null) - { - Msg.Dispose(); - Msg = null; - } - MessageObjectPool.Return(this); - } - public uint OpCode() { return OuterOpcode.S2C_Message; } - [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; - [ProtoMember(1)] - public ChatMessageInfo Msg { get; set; } - } ////////// ******** 工会 *******///////////// [Serializable] [ProtoContract] @@ -3720,19 +3575,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_CreateClubRequest : AMessage, ICustomRouteRequest + public partial class C2Game_CreateClubRequest : AMessage, ICustomRouteRequest { - public static C2S_CreateClubRequest Create(bool autoReturn = true) + public static C2Game_CreateClubRequest Create(bool autoReturn = true) { - var c2S_CreateClubRequest = MessageObjectPool.Rent(); - c2S_CreateClubRequest.AutoReturn = autoReturn; + var c2Game_CreateClubRequest = MessageObjectPool.Rent(); + c2Game_CreateClubRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_CreateClubRequest.SetIsPool(false); + c2Game_CreateClubRequest.SetIsPool(false); } - return c2S_CreateClubRequest; + return c2Game_CreateClubRequest; } public void Return() @@ -3753,13 +3608,13 @@ namespace Fantasy { if (!IsPool()) return; Name = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_CreateClubRequest; } + public uint OpCode() { return OuterOpcode.C2Game_CreateClubRequest; } [ProtoIgnore] - public S2C_CreateClubResponse ResponseType { get; set; } + public Game2C_CreateClubResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public string Name { get; set; } } @@ -3768,19 +3623,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_CreateClubResponse : AMessage, ICustomRouteResponse + public partial class Game2C_CreateClubResponse : AMessage, ICustomRouteResponse { - public static S2C_CreateClubResponse Create(bool autoReturn = true) + public static Game2C_CreateClubResponse Create(bool autoReturn = true) { - var s2C_CreateClubResponse = MessageObjectPool.Rent(); - s2C_CreateClubResponse.AutoReturn = autoReturn; + var game2C_CreateClubResponse = MessageObjectPool.Rent(); + game2C_CreateClubResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_CreateClubResponse.SetIsPool(false); + game2C_CreateClubResponse.SetIsPool(false); } - return s2C_CreateClubResponse; + return game2C_CreateClubResponse; } public void Return() @@ -3806,9 +3661,9 @@ namespace Fantasy Club.Dispose(); Club = null; } - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_CreateClubResponse; } + public uint OpCode() { return OuterOpcode.Game2C_CreateClubResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -3819,19 +3674,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_GetClubInfoRequest : AMessage, ICustomRouteRequest + public partial class C2Game_GetClubInfoRequest : AMessage, ICustomRouteRequest { - public static C2S_GetClubInfoRequest Create(bool autoReturn = true) + public static C2Game_GetClubInfoRequest Create(bool autoReturn = true) { - var c2S_GetClubInfoRequest = MessageObjectPool.Rent(); - c2S_GetClubInfoRequest.AutoReturn = autoReturn; + var c2Game_GetClubInfoRequest = MessageObjectPool.Rent(); + c2Game_GetClubInfoRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_GetClubInfoRequest.SetIsPool(false); + c2Game_GetClubInfoRequest.SetIsPool(false); } - return c2S_GetClubInfoRequest; + return c2Game_GetClubInfoRequest; } public void Return() @@ -3852,13 +3707,13 @@ namespace Fantasy { if (!IsPool()) return; ClubId = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_GetClubInfoRequest; } + public uint OpCode() { return OuterOpcode.C2Game_GetClubInfoRequest; } [ProtoIgnore] - public S2C_GetClubInfoResponse ResponseType { get; set; } + public Game2C_GetClubInfoResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public long ClubId { get; set; } } @@ -3867,19 +3722,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_GetClubInfoResponse : AMessage, ICustomRouteResponse + public partial class Game2C_GetClubInfoResponse : AMessage, ICustomRouteResponse { - public static S2C_GetClubInfoResponse Create(bool autoReturn = true) + public static Game2C_GetClubInfoResponse Create(bool autoReturn = true) { - var s2C_GetClubInfoResponse = MessageObjectPool.Rent(); - s2C_GetClubInfoResponse.AutoReturn = autoReturn; + var game2C_GetClubInfoResponse = MessageObjectPool.Rent(); + game2C_GetClubInfoResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_GetClubInfoResponse.SetIsPool(false); + game2C_GetClubInfoResponse.SetIsPool(false); } - return s2C_GetClubInfoResponse; + return game2C_GetClubInfoResponse; } public void Return() @@ -3901,9 +3756,9 @@ namespace Fantasy if (!IsPool()) return; ErrorCode = 0; Name = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_GetClubInfoResponse; } + public uint OpCode() { return OuterOpcode.Game2C_GetClubInfoResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -3914,19 +3769,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_GetMemberListRequest : AMessage, ICustomRouteRequest + public partial class C2Game_GetMemberListRequest : AMessage, ICustomRouteRequest { - public static C2S_GetMemberListRequest Create(bool autoReturn = true) + public static C2Game_GetMemberListRequest Create(bool autoReturn = true) { - var c2S_GetMemberListRequest = MessageObjectPool.Rent(); - c2S_GetMemberListRequest.AutoReturn = autoReturn; + var c2Game_GetMemberListRequest = MessageObjectPool.Rent(); + c2Game_GetMemberListRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_GetMemberListRequest.SetIsPool(false); + c2Game_GetMemberListRequest.SetIsPool(false); } - return c2S_GetMemberListRequest; + return c2Game_GetMemberListRequest; } public void Return() @@ -3947,13 +3802,13 @@ namespace Fantasy { if (!IsPool()) return; ClubId = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_GetMemberListRequest; } + public uint OpCode() { return OuterOpcode.C2Game_GetMemberListRequest; } [ProtoIgnore] - public S2C_GetMemberListResponse ResponseType { get; set; } + public Game2C_GetMemberListResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public long ClubId { get; set; } } @@ -3962,19 +3817,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_GetMemberListResponse : AMessage, ICustomRouteResponse + public partial class Game2C_GetMemberListResponse : AMessage, ICustomRouteResponse { - public static S2C_GetMemberListResponse Create(bool autoReturn = true) + public static Game2C_GetMemberListResponse Create(bool autoReturn = true) { - var s2C_GetMemberListResponse = MessageObjectPool.Rent(); - s2C_GetMemberListResponse.AutoReturn = autoReturn; + var game2C_GetMemberListResponse = MessageObjectPool.Rent(); + game2C_GetMemberListResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_GetMemberListResponse.SetIsPool(false); + game2C_GetMemberListResponse.SetIsPool(false); } - return s2C_GetMemberListResponse; + return game2C_GetMemberListResponse; } public void Return() @@ -3996,9 +3851,9 @@ namespace Fantasy if (!IsPool()) return; ErrorCode = 0; Members.Clear(); - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_GetMemberListResponse; } + public uint OpCode() { return OuterOpcode.Game2C_GetMemberListResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -4009,19 +3864,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_GetClubListRequest : AMessage, ICustomRouteRequest + public partial class C2Game_GetClubListRequest : AMessage, ICustomRouteRequest { - public static C2S_GetClubListRequest Create(bool autoReturn = true) + public static C2Game_GetClubListRequest Create(bool autoReturn = true) { - var c2S_GetClubListRequest = MessageObjectPool.Rent(); - c2S_GetClubListRequest.AutoReturn = autoReturn; + var c2Game_GetClubListRequest = MessageObjectPool.Rent(); + c2Game_GetClubListRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_GetClubListRequest.SetIsPool(false); + c2Game_GetClubListRequest.SetIsPool(false); } - return c2S_GetClubListRequest; + return c2Game_GetClubListRequest; } public void Return() @@ -4041,32 +3896,32 @@ namespace Fantasy public void Dispose() { if (!IsPool()) return; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_GetClubListRequest; } + public uint OpCode() { return OuterOpcode.C2Game_GetClubListRequest; } [ProtoIgnore] - public S2C_GetClubListResponse ResponseType { get; set; } + public Game2C_GetClubListResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; } /// /// 获取工会列表响应 /// [Serializable] [ProtoContract] - public partial class S2C_GetClubListResponse : AMessage, ICustomRouteResponse + public partial class Game2C_GetClubListResponse : AMessage, ICustomRouteResponse { - public static S2C_GetClubListResponse Create(bool autoReturn = true) + public static Game2C_GetClubListResponse Create(bool autoReturn = true) { - var s2C_GetClubListResponse = MessageObjectPool.Rent(); - s2C_GetClubListResponse.AutoReturn = autoReturn; + var game2C_GetClubListResponse = MessageObjectPool.Rent(); + game2C_GetClubListResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_GetClubListResponse.SetIsPool(false); + game2C_GetClubListResponse.SetIsPool(false); } - return s2C_GetClubListResponse; + return game2C_GetClubListResponse; } public void Return() @@ -4088,9 +3943,9 @@ namespace Fantasy if (!IsPool()) return; ErrorCode = 0; Clubs.Clear(); - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_GetClubListResponse; } + public uint OpCode() { return OuterOpcode.Game2C_GetClubListResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -4101,19 +3956,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_JoinClubRequest : AMessage, ICustomRouteRequest + public partial class C2Game_JoinClubRequest : AMessage, ICustomRouteRequest { - public static C2S_JoinClubRequest Create(bool autoReturn = true) + public static C2Game_JoinClubRequest Create(bool autoReturn = true) { - var c2S_JoinClubRequest = MessageObjectPool.Rent(); - c2S_JoinClubRequest.AutoReturn = autoReturn; + var c2Game_JoinClubRequest = MessageObjectPool.Rent(); + c2Game_JoinClubRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_JoinClubRequest.SetIsPool(false); + c2Game_JoinClubRequest.SetIsPool(false); } - return c2S_JoinClubRequest; + return c2Game_JoinClubRequest; } public void Return() @@ -4134,13 +3989,13 @@ namespace Fantasy { if (!IsPool()) return; ClubId = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_JoinClubRequest; } + public uint OpCode() { return OuterOpcode.C2Game_JoinClubRequest; } [ProtoIgnore] - public S2C_JoinClubResponse ResponseType { get; set; } + public Game2C_JoinClubResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public long ClubId { get; set; } } @@ -4149,19 +4004,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_JoinClubResponse : AMessage, ICustomRouteResponse + public partial class Game2C_JoinClubResponse : AMessage, ICustomRouteResponse { - public static S2C_JoinClubResponse Create(bool autoReturn = true) + public static Game2C_JoinClubResponse Create(bool autoReturn = true) { - var s2C_JoinClubResponse = MessageObjectPool.Rent(); - s2C_JoinClubResponse.AutoReturn = autoReturn; + var game2C_JoinClubResponse = MessageObjectPool.Rent(); + game2C_JoinClubResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_JoinClubResponse.SetIsPool(false); + game2C_JoinClubResponse.SetIsPool(false); } - return s2C_JoinClubResponse; + return game2C_JoinClubResponse; } public void Return() @@ -4187,9 +4042,9 @@ namespace Fantasy Club.Dispose(); Club = null; } - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_JoinClubResponse; } + public uint OpCode() { return OuterOpcode.Game2C_JoinClubResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -4200,19 +4055,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_LeaveClubRequest : AMessage, ICustomRouteRequest + public partial class C2Game_LeaveClubRequest : AMessage, ICustomRouteRequest { - public static C2S_LeaveClubRequest Create(bool autoReturn = true) + public static C2Game_LeaveClubRequest Create(bool autoReturn = true) { - var c2S_LeaveClubRequest = MessageObjectPool.Rent(); - c2S_LeaveClubRequest.AutoReturn = autoReturn; + var c2Game_LeaveClubRequest = MessageObjectPool.Rent(); + c2Game_LeaveClubRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_LeaveClubRequest.SetIsPool(false); + c2Game_LeaveClubRequest.SetIsPool(false); } - return c2S_LeaveClubRequest; + return c2Game_LeaveClubRequest; } public void Return() @@ -4233,13 +4088,13 @@ namespace Fantasy { if (!IsPool()) return; ClubId = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_LeaveClubRequest; } + public uint OpCode() { return OuterOpcode.C2Game_LeaveClubRequest; } [ProtoIgnore] - public S2C_LeaveClubResponse ResponseType { get; set; } + public Game2C_LeaveClubResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public long ClubId { get; set; } } @@ -4248,19 +4103,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_LeaveClubResponse : AMessage, ICustomRouteResponse + public partial class Game2C_LeaveClubResponse : AMessage, ICustomRouteResponse { - public static S2C_LeaveClubResponse Create(bool autoReturn = true) + public static Game2C_LeaveClubResponse Create(bool autoReturn = true) { - var s2C_LeaveClubResponse = MessageObjectPool.Rent(); - s2C_LeaveClubResponse.AutoReturn = autoReturn; + var game2C_LeaveClubResponse = MessageObjectPool.Rent(); + game2C_LeaveClubResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_LeaveClubResponse.SetIsPool(false); + game2C_LeaveClubResponse.SetIsPool(false); } - return s2C_LeaveClubResponse; + return game2C_LeaveClubResponse; } public void Return() @@ -4282,9 +4137,9 @@ namespace Fantasy if (!IsPool()) return; ErrorCode = 0; ClubId = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_LeaveClubResponse; } + public uint OpCode() { return OuterOpcode.Game2C_LeaveClubResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -4295,19 +4150,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_DissolveClubRequest : AMessage, ICustomRouteRequest + public partial class C2Game_DissolveClubRequest : AMessage, ICustomRouteRequest { - public static C2S_DissolveClubRequest Create(bool autoReturn = true) + public static C2Game_DissolveClubRequest Create(bool autoReturn = true) { - var c2S_DissolveClubRequest = MessageObjectPool.Rent(); - c2S_DissolveClubRequest.AutoReturn = autoReturn; + var c2Game_DissolveClubRequest = MessageObjectPool.Rent(); + c2Game_DissolveClubRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_DissolveClubRequest.SetIsPool(false); + c2Game_DissolveClubRequest.SetIsPool(false); } - return c2S_DissolveClubRequest; + return c2Game_DissolveClubRequest; } public void Return() @@ -4328,13 +4183,13 @@ namespace Fantasy { if (!IsPool()) return; ClubId = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_DissolveClubRequest; } + public uint OpCode() { return OuterOpcode.C2Game_DissolveClubRequest; } [ProtoIgnore] - public S2C_DissolveClubResponse ResponseType { get; set; } + public Game2C_DissolveClubResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public long ClubId { get; set; } } @@ -4343,19 +4198,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_DissolveClubResponse : AMessage, ICustomRouteResponse + public partial class Game2C_DissolveClubResponse : AMessage, ICustomRouteResponse { - public static S2C_DissolveClubResponse Create(bool autoReturn = true) + public static Game2C_DissolveClubResponse Create(bool autoReturn = true) { - var s2C_DissolveClubResponse = MessageObjectPool.Rent(); - s2C_DissolveClubResponse.AutoReturn = autoReturn; + var game2C_DissolveClubResponse = MessageObjectPool.Rent(); + game2C_DissolveClubResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_DissolveClubResponse.SetIsPool(false); + game2C_DissolveClubResponse.SetIsPool(false); } - return s2C_DissolveClubResponse; + return game2C_DissolveClubResponse; } public void Return() @@ -4377,9 +4232,9 @@ namespace Fantasy if (!IsPool()) return; ErrorCode = 0; ClubId = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_DissolveClubResponse; } + public uint OpCode() { return OuterOpcode.Game2C_DissolveClubResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -4390,19 +4245,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class C2S_DisposeJoinRequest : AMessage, ICustomRouteRequest + public partial class C2Game_DisposeJoinRequest : AMessage, ICustomRouteRequest { - public static C2S_DisposeJoinRequest Create(bool autoReturn = true) + public static C2Game_DisposeJoinRequest Create(bool autoReturn = true) { - var c2S_DisposeJoinRequest = MessageObjectPool.Rent(); - c2S_DisposeJoinRequest.AutoReturn = autoReturn; + var c2Game_DisposeJoinRequest = MessageObjectPool.Rent(); + c2Game_DisposeJoinRequest.AutoReturn = autoReturn; if (!autoReturn) { - c2S_DisposeJoinRequest.SetIsPool(false); + c2Game_DisposeJoinRequest.SetIsPool(false); } - return c2S_DisposeJoinRequest; + return c2Game_DisposeJoinRequest; } public void Return() @@ -4425,13 +4280,13 @@ namespace Fantasy ClubId = default; ApplicantId = default; Agree = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.C2S_DisposeJoinRequest; } + public uint OpCode() { return OuterOpcode.C2Game_DisposeJoinRequest; } [ProtoIgnore] - public S2C_DisposeJoinResponse ResponseType { get; set; } + public Game2C_DisposeJoinResponse ResponseType { get; set; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public long ClubId { get; set; } [ProtoMember(2)] @@ -4444,19 +4299,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_DisposeJoinResponse : AMessage, ICustomRouteResponse + public partial class Game2C_DisposeJoinResponse : AMessage, ICustomRouteResponse { - public static S2C_DisposeJoinResponse Create(bool autoReturn = true) + public static Game2C_DisposeJoinResponse Create(bool autoReturn = true) { - var s2C_DisposeJoinResponse = MessageObjectPool.Rent(); - s2C_DisposeJoinResponse.AutoReturn = autoReturn; + var game2C_DisposeJoinResponse = MessageObjectPool.Rent(); + game2C_DisposeJoinResponse.AutoReturn = autoReturn; if (!autoReturn) { - s2C_DisposeJoinResponse.SetIsPool(false); + game2C_DisposeJoinResponse.SetIsPool(false); } - return s2C_DisposeJoinResponse; + return game2C_DisposeJoinResponse; } public void Return() @@ -4480,9 +4335,9 @@ namespace Fantasy ClubId = default; ApplicantId = default; Agree = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_DisposeJoinResponse; } + public uint OpCode() { return OuterOpcode.Game2C_DisposeJoinResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } [ProtoMember(2)] @@ -4497,19 +4352,19 @@ namespace Fantasy /// [Serializable] [ProtoContract] - public partial class S2C_ClubChange : AMessage, ICustomRouteMessage + public partial class Game2C_ClubChange : AMessage, ICustomRouteMessage { - public static S2C_ClubChange Create(bool autoReturn = true) + public static Game2C_ClubChange Create(bool autoReturn = true) { - var s2C_ClubChange = MessageObjectPool.Rent(); - s2C_ClubChange.AutoReturn = autoReturn; + var game2C_ClubChange = MessageObjectPool.Rent(); + game2C_ClubChange.AutoReturn = autoReturn; if (!autoReturn) { - s2C_ClubChange.SetIsPool(false); + game2C_ClubChange.SetIsPool(false); } - return s2C_ClubChange; + return game2C_ClubChange; } public void Return() @@ -4535,11 +4390,11 @@ namespace Fantasy Club = null; } ChangeType = default; - MessageObjectPool.Return(this); + MessageObjectPool.Return(this); } - public uint OpCode() { return OuterOpcode.S2C_ClubChange; } + public uint OpCode() { return OuterOpcode.Game2C_ClubChange; } [ProtoIgnore] - public int RouteType => Fantasy.RouteType.SocialRoute; + public int RouteType => Fantasy.RouteType.GameRoute; [ProtoMember(1)] public ClubInfo Club { get; set; } [ProtoMember(2)] diff --git a/Entity/Generate/NetworkProtocol/OuterOpcode.cs b/Entity/Generate/NetworkProtocol/OuterOpcode.cs index fda636e..d8ca519 100644 --- a/Entity/Generate/NetworkProtocol/OuterOpcode.cs +++ b/Entity/Generate/NetworkProtocol/OuterOpcode.cs @@ -27,13 +27,13 @@ namespace Fantasy public const uint Game2C_RewardNotify = 2147493651; public const uint C2Game_GMRequest = 2281711385; public const uint Game2C_GMResponse = 2415929113; - public const uint C2Map_CreateRoomRequest = 2281711386; - public const uint Map2C_CreateRoomResponse = 2415929114; + public const uint C2Game_CreateRoomRequest = 2281711386; + public const uint Game2C_CreateRoomResponse = 2415929114; public const uint C2G_ExitRoomRequest = 268445457; public const uint G2C_ExitRoomResponse = 402663185; public const uint C2G_EnterMapRequest = 268445458; public const uint G2C_EnterMapResponse = 402663186; - public const uint Map2C_ChangeMap = 2147493652; + public const uint Game2C_ChangeMap = 2147493652; public const uint C2A_LoginRequest = 268445459; public const uint A2C_LoginResponse = 402663187; public const uint C2G_LoginRequest = 268445460; @@ -41,52 +41,49 @@ namespace Fantasy public const uint G2C_RepeatLogin = 134227729; public const uint C2Game_GetRoleInfoRequest = 2281711387; public const uint Game2C_GetRoleInfoResponse = 2415929115; - public const uint Map2C_RoleEnterRoomNotify = 2147493653; - public const uint Map2C_RoleExitRoomNotify = 2147493654; - public const uint C2Map_TakeItemRequest = 2281711388; - public const uint Map2C_TakeItemResponse = 2415929116; - public const uint C2Map_RolePropertyChange = 2147493655; - public const uint Map2C_RoleStateNotify = 2147493656; - public const uint Map2C_RoleGearChangeNotify = 2147493657; - public const uint Map2C_RolePropertyChangeNotify = 2147493658; - public const uint C2Map_Move = 2147493659; - public const uint C2Map_Look = 2147493660; - public const uint Map2C_MoveNotify = 2147493661; - public const uint Map2C_LookeNotify = 2147493662; - public const uint C2S_GetConversationsRequest = 2281711389; - public const uint S2C_GetConversationsResponse = 2415929117; - public const uint C2S_SendMailRequest = 2281711390; - public const uint S2C_SendMailResponse = 2415929118; - public const uint C2S_DeleteMailRequest = 2281711391; - public const uint S2C_DeleteMailResponse = 2415929119; - public const uint S2C_HaveMail = 2147493663; - public const uint S2C_MailState = 2147493664; - public const uint C2Chat_SendMessageRequest = 2281711392; - public const uint Chat2C_SendMessageResponse = 2415929120; - public const uint Chat2C_Message = 2147493665; - public const uint C2S_CreateChannelRequest = 2281711393; - public const uint S2C_CreateChannelResponse = 2415929121; - public const uint C2S_JoinChannelRequest = 2281711394; - public const uint S2C_JoinChannelResponse = 2415929122; - public const uint C2S_SendMessageRequest = 2281711395; - public const uint S2C_SendMessageResponse = 2415929123; - public const uint S2C_Message = 2147493666; - public const uint C2S_CreateClubRequest = 2281711396; - public const uint S2C_CreateClubResponse = 2415929124; - public const uint C2S_GetClubInfoRequest = 2281711397; - public const uint S2C_GetClubInfoResponse = 2415929125; - public const uint C2S_GetMemberListRequest = 2281711398; - public const uint S2C_GetMemberListResponse = 2415929126; - public const uint C2S_GetClubListRequest = 2281711399; - public const uint S2C_GetClubListResponse = 2415929127; - public const uint C2S_JoinClubRequest = 2281711400; - public const uint S2C_JoinClubResponse = 2415929128; - public const uint C2S_LeaveClubRequest = 2281711401; - public const uint S2C_LeaveClubResponse = 2415929129; - public const uint C2S_DissolveClubRequest = 2281711402; - public const uint S2C_DissolveClubResponse = 2415929130; - public const uint C2S_DisposeJoinRequest = 2281711403; - public const uint S2C_DisposeJoinResponse = 2415929131; - public const uint S2C_ClubChange = 2147493667; + public const uint Game2C_RoleEnterRoomNotify = 2147493653; + public const uint Game2C_RoleExitRoomNotify = 2147493654; + public const uint C2Game_TakeItemRequest = 2281711388; + public const uint Game2C_TakeItemResponse = 2415929116; + public const uint C2Game_RolePropertyChange = 2147493655; + public const uint Game2C_RoleStateNotify = 2147493656; + public const uint Game2C_RoleGearChangeNotify = 2147493657; + public const uint Game2C_RolePropertyChangeNotify = 2147493658; + public const uint C2Game_Move = 2147493659; + public const uint C2Game_Look = 2147493660; + public const uint Game2C_MoveNotify = 2147493661; + public const uint Game2C_LookeNotify = 2147493662; + public const uint C2Game_GetConversationsRequest = 2281711389; + public const uint Game2C_GetConversationsResponse = 2415929117; + public const uint C2Game_SendMailRequest = 2281711390; + public const uint Game2C_SendMailResponse = 2415929118; + public const uint C2Game_DeleteMailRequest = 2281711391; + public const uint Game2C_DeleteMailResponse = 2415929119; + public const uint Game2C_HaveMail = 2147493663; + public const uint Game2C_MailState = 2147493664; + public const uint C2Game_SendMessageRequest = 2281711392; + public const uint Game2C_SendMessageResponse = 2415929120; + public const uint Game2C_Message = 2147493665; + public const uint C2Game_CreateChannelRequest = 2281711393; + public const uint Game2C_CreateChannelResponse = 2415929121; + public const uint C2Game_JoinChannelRequest = 2281711394; + public const uint Game2C_JoinChannelResponse = 2415929122; + public const uint C2Game_CreateClubRequest = 2281711395; + public const uint Game2C_CreateClubResponse = 2415929123; + public const uint C2Game_GetClubInfoRequest = 2281711396; + public const uint Game2C_GetClubInfoResponse = 2415929124; + public const uint C2Game_GetMemberListRequest = 2281711397; + public const uint Game2C_GetMemberListResponse = 2415929125; + public const uint C2Game_GetClubListRequest = 2281711398; + public const uint Game2C_GetClubListResponse = 2415929126; + public const uint C2Game_JoinClubRequest = 2281711399; + public const uint Game2C_JoinClubResponse = 2415929127; + public const uint C2Game_LeaveClubRequest = 2281711400; + public const uint Game2C_LeaveClubResponse = 2415929128; + public const uint C2Game_DissolveClubRequest = 2281711401; + public const uint Game2C_DissolveClubResponse = 2415929129; + public const uint C2Game_DisposeJoinRequest = 2281711402; + public const uint Game2C_DisposeJoinResponse = 2415929130; + public const uint Game2C_ClubChange = 2147493666; } } \ No newline at end of file diff --git a/Entity/Generate/NetworkProtocol/RouteType.cs b/Entity/Generate/NetworkProtocol/RouteType.cs index f9ebaff..d840119 100644 --- a/Entity/Generate/NetworkProtocol/RouteType.cs +++ b/Entity/Generate/NetworkProtocol/RouteType.cs @@ -8,15 +8,13 @@ namespace Fantasy public static partial class RouteType { public const int GateRoute = 1001; // Gate - public const int SocialRoute = 1002; // Social - public const int GameRoute = 1003; // Game + public const int GameRoute = 1002; // Game public static IEnumerable RoamingTypes { get { yield return GateRoute; - yield return SocialRoute; yield return GameRoute; } } diff --git a/Entity/Social/SocialUnit.cs b/Entity/Social/SocialUnit.cs deleted file mode 100644 index 06840d6..0000000 --- a/Entity/Social/SocialUnit.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Fantasy; -using Fantasy.Entitas; - -namespace NB.Chat; - -public sealed class SocialUnit : Entity -{ - public long GateRouteId; - - public RoleSimpleInfo Role; - - /// - /// 当前所在地图 - /// - public long MapId; - - - public readonly Dictionary Channels = new(); - public readonly Dictionary SendTime = new Dictionary(); - - - public override void Dispose() - { - if (IsDisposed) - { - return; - } - - GateRouteId = 0; - Role = null; - base.Dispose(); - } -} \ No newline at end of file diff --git a/Entity/Social/SocialUnitManageComponent.cs b/Entity/Social/SocialUnitManageComponent.cs deleted file mode 100644 index d23d0c1..0000000 --- a/Entity/Social/SocialUnitManageComponent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; -using Fantasy; -using Fantasy.DataStructure.Collection; -using Fantasy.Entitas; - -namespace NB.Chat; - -public class SocialUnitManageComponent : Entity -{ - public readonly Dictionary Units = new(); - - // public List - // /// - // /// 不在线消息缓存 - // /// - // public readonly OneToManyList NotSendMessage = new(); -} \ No newline at end of file diff --git a/Hotfix/Common/Handler/G2Common_EnterRequestHandler.cs b/Hotfix/Common/Handler/G2Common_EnterRequestHandler.cs index fe9fa24..df347fb 100644 --- a/Hotfix/Common/Handler/G2Common_EnterRequestHandler.cs +++ b/Hotfix/Common/Handler/G2Common_EnterRequestHandler.cs @@ -4,7 +4,6 @@ using Fantasy.Async; using Fantasy.Network.Interface; using NB.Chat; using NB.Game; -using NBF.Social; namespace NB.Common; @@ -23,14 +22,9 @@ public class G2Common_EnterRequestHandler : AddressRPC(); - var account = await chatUnitManageComponent.Online(scene, request.AccountId, request.GateRouteId); - - if (account == null) - { - response.ErrorCode = ErrorCode.ErrServer; - return; - } - - response.UnitRouteId = account.RuntimeId; - Log.Info($"登录到社交服成功,id={response.UnitRouteId}"); - } + // private async FTask RunSocial(Scene scene, G2Common_EnterRequest request, G2Common_EnterResponse response) + // { + // // 在缓存中检查该账号是否存在 + // var chatUnitManageComponent = scene.GetComponent(); + // var account = await chatUnitManageComponent.Online(scene, request.AccountId, request.GateRouteId); + // + // if (account == null) + // { + // response.ErrorCode = ErrorCode.ErrServer; + // return; + // } + // + // response.UnitRouteId = account.RuntimeId; + // Log.Info($"登录到社交服成功,id={response.UnitRouteId}"); + // } // private async FTask RunMap(Scene scene, G2Common_EnterRequest request, G2Common_EnterResponse response) // { diff --git a/Hotfix/Common/Handler/G2Common_ExitRequestHandler.cs b/Hotfix/Common/Handler/G2Common_ExitRequestHandler.cs index 73ed1a2..9fee770 100644 --- a/Hotfix/Common/Handler/G2Common_ExitRequestHandler.cs +++ b/Hotfix/Common/Handler/G2Common_ExitRequestHandler.cs @@ -4,7 +4,6 @@ using Fantasy.Async; using Fantasy.Network.Interface; using NB.Chat; using NB.Game; -using NBF.Social; namespace NB.Common; @@ -21,11 +20,11 @@ public class G2Common_ExitRequestHandler : AddressRPC(); - await chatUnitManageComponent.Offline(scene, request.AccountId, request.GateRouteId); - Log.Info("退出聊天服成功=="); - } + // private async FTask RunSocial(Scene scene, G2Common_ExitRequest request, Common2G_ExitResponse response) + // { + // // 在缓存中检查该账号是否存在 + // var chatUnitManageComponent = scene.GetComponent(); + // await chatUnitManageComponent.Offline(scene, request.AccountId, request.GateRouteId); + // Log.Info("退出聊天服成功=="); + // } // private async FTask RunMap(Scene scene, G2Common_ExitRequest request, Common2G_ExitResponse response) // { diff --git a/Hotfix/Common/Helper/SceneConfigHelper.cs b/Hotfix/Common/Helper/SceneConfigHelper.cs index 4655d77..69e1346 100644 --- a/Hotfix/Common/Helper/SceneConfigHelper.cs +++ b/Hotfix/Common/Helper/SceneConfigHelper.cs @@ -13,10 +13,6 @@ public static class SceneConfigHelper { sceneType = SceneType.Game; } - else if (routeType == RouteType.SocialRoute) - { - sceneType = SceneType.Social; - } else if (routeType == RouteType.GateRoute) { sceneType = SceneType.Gate; diff --git a/Hotfix/Game/Map/Handler/C2Map_CreateRoomRequestHandler.cs b/Hotfix/Game/Map/Handler/C2Map_CreateRoomRequestHandler.cs index bc4c88a..d92ea17 100644 --- a/Hotfix/Game/Map/Handler/C2Map_CreateRoomRequestHandler.cs +++ b/Hotfix/Game/Map/Handler/C2Map_CreateRoomRequestHandler.cs @@ -6,10 +6,10 @@ using Fantasy.Network.Interface; namespace NB.Game; -public class C2Map_CreateRoomRequestHandler : AddressRPC +public class C2Map_CreateRoomRequestHandler : AddressRPC { - protected override async FTask Run(Player entity, C2Map_CreateRoomRequest request, - Map2C_CreateRoomResponse response, + protected override async FTask Run(Player entity, C2Game_CreateRoomRequest request, + Game2C_CreateRoomResponse response, Action reply) { var mapUnit = entity.GetComponent(); diff --git a/Hotfix/Game/Map/Handler/C2Map_LookHandler.cs b/Hotfix/Game/Map/Handler/C2Map_LookHandler.cs index 101a4ad..2d28c28 100644 --- a/Hotfix/Game/Map/Handler/C2Map_LookHandler.cs +++ b/Hotfix/Game/Map/Handler/C2Map_LookHandler.cs @@ -4,9 +4,9 @@ using Fantasy.Network.Interface; namespace NB.Game; -public class C2Map_LookHandler : Address +public class C2Map_LookHandler : Address { - protected override async FTask Run(Player entity, C2Map_Look message) + protected override async FTask Run(Player entity, C2Game_Look message) { var mapUnit = entity.GetComponent(); if (mapUnit == null) @@ -23,7 +23,7 @@ public class C2Map_LookHandler : Address return; } - var notifyMessage = new Map2C_LookeNotify() + var notifyMessage = new Game2C_LookeNotify() { Id = entity.Id, Rotation = message.Rotation, diff --git a/Hotfix/Game/Map/Handler/C2Map_MoveHandler.cs b/Hotfix/Game/Map/Handler/C2Map_MoveHandler.cs index 1b22e6f..6d4a170 100644 --- a/Hotfix/Game/Map/Handler/C2Map_MoveHandler.cs +++ b/Hotfix/Game/Map/Handler/C2Map_MoveHandler.cs @@ -5,9 +5,9 @@ using Fantasy.Network.Interface; namespace NB.Game; -public class C2Map_MoveHandler : Address +public class C2Map_MoveHandler : Address { - protected override async FTask Run(Player entity, C2Map_Move message) + protected override async FTask Run(Player entity, C2Game_Move message) { var mapUnit = entity.GetComponent(); if (mapUnit == null) @@ -24,7 +24,7 @@ public class C2Map_MoveHandler : Address return; } // var mapUnitManageComponent = entity.Scene.GetComponent(); - var notifyMessage = new Map2C_MoveNotify() + var notifyMessage = new Game2C_MoveNotify() { Id = entity.Id, Position = message.Position, diff --git a/Hotfix/Game/Map/Handler/C2Map_RolePropertyChangeHandler.cs b/Hotfix/Game/Map/Handler/C2Map_RolePropertyChangeHandler.cs index 9f2e797..21d0c2b 100644 --- a/Hotfix/Game/Map/Handler/C2Map_RolePropertyChangeHandler.cs +++ b/Hotfix/Game/Map/Handler/C2Map_RolePropertyChangeHandler.cs @@ -4,9 +4,9 @@ using Fantasy.Network.Interface; namespace NB.Game; -public class C2Map_RolePropertyChangeHandler : Address +public class C2Map_RolePropertyChangeHandler : Address { - protected override async FTask Run(Player entity, C2Map_RolePropertyChange message) + protected override async FTask Run(Player entity, C2Game_RolePropertyChange message) { var mapUnit = entity.GetComponent(); if (mapUnit == null) @@ -23,7 +23,7 @@ public class C2Map_RolePropertyChangeHandler : Address +public class C2Map_TakeItemRequestHandler : AddressRPC { - protected override async FTask Run(Player entity, C2Map_TakeItemRequest request, Map2C_TakeItemResponse response, + protected override async FTask Run(Player entity, C2Game_TakeItemRequest request, Game2C_TakeItemResponse response, Action reply) { var itemContainer = entity.GetComponent(); @@ -48,7 +48,7 @@ public class C2Map_TakeItemRequestHandler : AddressRPC +// { +// protected override async FTask Run(SocialUnit chatUnit, Other2Chat_ChatMessage message) +// { +// var result = ChatSceneHelper.Distribution(chatUnit, message.ChatInfoTree, false); +// +// if (result != 0) +// { +// Log.Warning($"Other2Chat_ChatMessageHandler: Distribution failed, result: {result}"); +// } +// +// await FTask.CompletedTask; +// } +// } \ No newline at end of file diff --git a/Hotfix/Social/Chat/Handler/Outer/C2Chat_SendMessageRequestHandler.cs b/Hotfix/Game/Social/Chat/Handler/Outer/C2Chat_SendMessageRequestHandler.cs similarity index 57% rename from Hotfix/Social/Chat/Handler/Outer/C2Chat_SendMessageRequestHandler.cs rename to Hotfix/Game/Social/Chat/Handler/Outer/C2Chat_SendMessageRequestHandler.cs index 4b97446..52d9b4e 100644 --- a/Hotfix/Social/Chat/Handler/Outer/C2Chat_SendMessageRequestHandler.cs +++ b/Hotfix/Game/Social/Chat/Handler/Outer/C2Chat_SendMessageRequestHandler.cs @@ -1,12 +1,13 @@ using Fantasy; using Fantasy.Async; using Fantasy.Network.Interface; +using NB.Game; namespace NB.Chat; -public sealed class C2Chat_SendMessageRequestHandler : AddressRPC +public sealed class C2Chat_SendMessageRequestHandler : AddressRPC { - protected override async FTask Run(SocialUnit chatUnit, C2Chat_SendMessageRequest request, Chat2C_SendMessageResponse response, Action reply) + protected override async FTask Run(Player chatUnit, C2Game_SendMessageRequest request, Game2C_SendMessageResponse response, Action reply) { response.ErrorCode = ChatSceneHelper.Distribution(chatUnit, request.ChatInfoTree); await FTask.CompletedTask; diff --git a/Hotfix/Social/Chat/Helper/ChatChannelCenterHelper.cs b/Hotfix/Game/Social/Chat/Helper/ChatChannelCenterHelper.cs similarity index 100% rename from Hotfix/Social/Chat/Helper/ChatChannelCenterHelper.cs rename to Hotfix/Game/Social/Chat/Helper/ChatChannelCenterHelper.cs diff --git a/Hotfix/Social/Chat/Helper/ChatHelper.cs b/Hotfix/Game/Social/Chat/Helper/ChatHelper.cs similarity index 80% rename from Hotfix/Social/Chat/Helper/ChatHelper.cs rename to Hotfix/Game/Social/Chat/Helper/ChatHelper.cs index c8fefa4..370e14e 100644 --- a/Hotfix/Social/Chat/Helper/ChatHelper.cs +++ b/Hotfix/Game/Social/Chat/Helper/ChatHelper.cs @@ -13,11 +13,11 @@ public static class ChatHelper /// public static void SendChatMessage(Scene scene, long chatUnitRouteId, ChatInfoTree tree) { - if (scene.SceneType == SceneType.Social) - { - Log.Warning("ChatHelper.SendChatMessage: scene is not a chat scene."); - return; - } + // if (scene.SceneType == SceneType.Social) + // { + // Log.Warning("ChatHelper.SendChatMessage: scene is not a chat scene."); + // return; + // } var other2ChatChatMessage = new Other2Chat_ChatMessage() { diff --git a/Hotfix/Social/Chat/Helper/ChatNodeFactory.cs b/Hotfix/Game/Social/Chat/Helper/ChatNodeFactory.cs similarity index 100% rename from Hotfix/Social/Chat/Helper/ChatNodeFactory.cs rename to Hotfix/Game/Social/Chat/Helper/ChatNodeFactory.cs diff --git a/Hotfix/Social/Chat/Helper/ChatSceneHelper.cs b/Hotfix/Game/Social/Chat/Helper/ChatSceneHelper.cs similarity index 91% rename from Hotfix/Social/Chat/Helper/ChatSceneHelper.cs rename to Hotfix/Game/Social/Chat/Helper/ChatSceneHelper.cs index 7f390df..b97d3db 100644 --- a/Hotfix/Social/Chat/Helper/ChatSceneHelper.cs +++ b/Hotfix/Game/Social/Chat/Helper/ChatSceneHelper.cs @@ -2,7 +2,7 @@ using System.Threading.Channels; using Fantasy; using Fantasy.Helper; using Fantasy.Platform.Net; -using NBF.Social; +using NB.Game; // ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract @@ -21,7 +21,7 @@ public static class ChatSceneHelper /// /// /// - public static uint Distribution(SocialUnit chatUnit, ChatInfoTree tree, bool isCheckSendTime = true) + public static uint Distribution(Player chatUnit, ChatInfoTree tree, bool isCheckSendTime = true) { var result = Condition(chatUnit, tree, isCheckSendTime); @@ -60,7 +60,7 @@ public static class ChatSceneHelper /// /// /// - private static uint Condition(SocialUnit chatUnit, ChatInfoTree tree, bool isCheckSendTime = true) + private static uint Condition(Player chatUnit, ChatInfoTree tree, bool isCheckSendTime = true) { // 每个频道可能聊天的间隔都不一样。 // 这里的条件判断,是根据频道的类型,来判断是否到达了聊天的间隔。 @@ -152,7 +152,7 @@ public static class ChatSceneHelper if (tree.Target.Count > 0) { - var chatUnitManageComponent = scene.GetComponent(); + var chatUnitManageComponent = scene.GetComponent(); // 给一部分人广播消息 foreach (var chatUnitId in tree.Target) { @@ -162,7 +162,7 @@ public static class ChatSceneHelper } // networkMessagingComponent.SendInnerRoute(chatUnit.GateRouteId, chatMessage); - networkMessagingComponent.Send(chatUnit.GateRouteId, chatMessage); + networkMessagingComponent.Send(chatUnit.SessionRunTimeId, chatMessage); } return; } @@ -182,7 +182,7 @@ public static class ChatSceneHelper /// /// /// - private static uint Channel(SocialUnit chatUnit, ChatInfoTree tree) + private static uint Channel(Player chatUnit, ChatInfoTree tree) { // 那组队,公会、地图、等这个的聊天,如何使用频道呢? // 这里的频道,是指一个频道,比如一个公会的频道,一个队伍的频道,一个地图的频道。 @@ -213,7 +213,7 @@ public static class ChatSceneHelper /// /// /// - private static uint Private(SocialUnit chatUnit, ChatInfoTree tree) + private static uint Private(Player chatUnit, ChatInfoTree tree) { // 私聊,就是两个玩家之间,直接聊天。 // 1、首先,客户端需要知道对方的ID,这个ID是通过什么方式获取的呢? @@ -230,14 +230,14 @@ public static class ChatSceneHelper var targetChatUnitId = tree.Target[0]; var scene = chatUnit.Scene; - if (!scene.GetComponent().TryGet(targetChatUnitId, out var targetChatUnit)) + if (!scene.GetComponent().TryGet(targetChatUnitId, out var targetChatUnit)) { // 这个2代表对方不在线。 return 2; } var networkMessagingComponent = scene.NetworkMessagingComponent; - var chatMessage = new Chat2C_Message() + var chatMessage = new Game2C_Message() { ChatInfoTree = tree }; @@ -248,9 +248,9 @@ public static class ChatSceneHelper // networkMessagingComponent.SendInnerRoute(targetChatUnit.GateRouteId, chatMessage); // 先给自己发送一个聊天消息。 - networkMessagingComponent.Send(chatUnit.GateRouteId, chatMessage); + networkMessagingComponent.Send(chatUnit.SessionRunTimeId, chatMessage); // 然后再给对方发送一个聊天消息。 - networkMessagingComponent.Send(targetChatUnit.GateRouteId, chatMessage); + networkMessagingComponent.Send(targetChatUnit.SessionRunTimeId, chatMessage); return 0; } diff --git a/Hotfix/Social/Chat/Helper/ChatTreeFactory.cs b/Hotfix/Game/Social/Chat/Helper/ChatTreeFactory.cs similarity index 100% rename from Hotfix/Social/Chat/Helper/ChatTreeFactory.cs rename to Hotfix/Game/Social/Chat/Helper/ChatTreeFactory.cs diff --git a/Hotfix/Social/Chat/System/ChatChannelCenterComponentSystem.cs b/Hotfix/Game/Social/Chat/System/ChatChannelCenterComponentSystem.cs similarity index 100% rename from Hotfix/Social/Chat/System/ChatChannelCenterComponentSystem.cs rename to Hotfix/Game/Social/Chat/System/ChatChannelCenterComponentSystem.cs diff --git a/Hotfix/Social/Chat/System/ChatChannelComponentSystem.cs b/Hotfix/Game/Social/Chat/System/ChatChannelComponentSystem.cs similarity index 78% rename from Hotfix/Social/Chat/System/ChatChannelComponentSystem.cs rename to Hotfix/Game/Social/Chat/System/ChatChannelComponentSystem.cs index d59755a..ca25ee4 100644 --- a/Hotfix/Social/Chat/System/ChatChannelComponentSystem.cs +++ b/Hotfix/Game/Social/Chat/System/ChatChannelComponentSystem.cs @@ -1,41 +1,39 @@ using Fantasy; using Fantasy.Entitas; -using NBF.Social; +using NB.Game; namespace NB.Chat; public class MemoryEntity : Entity { - } - public static class ChatChannelComponentSystem { public static void Send(this ChatChannelComponent self, ChatInfoTree tree) { - var chatUnitManageComponent = self.Scene.GetComponent(); + var chatUnitManageComponent = self.Scene.GetComponent(); var networkMessagingComponent = self.Scene.NetworkMessagingComponent; - var chatMessage = new Chat2C_Message() + var chatMessage = new Game2C_Message() { ChatInfoTree = tree }; - + foreach (var unitId in self.Units) { - if (!chatUnitManageComponent.Units.TryGetValue(unitId, out var chatUnit)) + if (!chatUnitManageComponent.TryGet(unitId, out var chatUnit)) { continue; } // networkMessagingComponent.SendInnerRoute(chatUnit.GateRouteId, chatMessage); - networkMessagingComponent.Send(chatUnit.GateRouteId, chatMessage); + networkMessagingComponent.Send(chatUnit.SessionRunTimeId, chatMessage); } } - + public static bool JoinChannel(this ChatChannelComponent self, long chatUnitId) { - var chatUnitManageComponent = self.Scene.GetComponent(); + var chatUnitManageComponent = self.Scene.GetComponent(); if (!chatUnitManageComponent.TryGet(chatUnitId, out var chatUnit)) { @@ -49,6 +47,7 @@ public static class ChatChannelComponentSystem { chatUnit.Channels.Add(self.Id, self); } + // 可以在这里给客户端发送一个加入频道成功的消息。 return true; } @@ -65,7 +64,7 @@ public static class ChatChannelComponentSystem return; } - var chatUnitManageComponent = self.Scene.GetComponent(); + var chatUnitManageComponent = self.Scene.GetComponent(); if (!chatUnitManageComponent.TryGet(chatUnitId, out var chatUnit)) { @@ -77,7 +76,7 @@ public static class ChatChannelComponentSystem // 给用户移除频道。 chatUnit.Channels.Remove(self.Id); } - + // 在当前频道中移除该用户。 self.Units.Remove(chatUnitId); // 如果当前频道中没有用户了,则销毁该频道。 diff --git a/Hotfix/Social/Chat/System/ChatUnitManageComponentSystem.cs b/Hotfix/Game/Social/Chat/System/ChatUnitManageComponentSystem.cs similarity index 100% rename from Hotfix/Social/Chat/System/ChatUnitManageComponentSystem.cs rename to Hotfix/Game/Social/Chat/System/ChatUnitManageComponentSystem.cs diff --git a/Hotfix/Social/Mail/Handler/C2S_DeleteMailRequestHandler.cs b/Hotfix/Game/Social/Mail/Handler/C2Game_DeleteMailRequestHandler.cs similarity index 79% rename from Hotfix/Social/Mail/Handler/C2S_DeleteMailRequestHandler.cs rename to Hotfix/Game/Social/Mail/Handler/C2Game_DeleteMailRequestHandler.cs index 329b5a6..55f6603 100644 --- a/Hotfix/Social/Mail/Handler/C2S_DeleteMailRequestHandler.cs +++ b/Hotfix/Game/Social/Mail/Handler/C2Game_DeleteMailRequestHandler.cs @@ -2,13 +2,14 @@ using Fantasy; using Fantasy.Async; using Fantasy.Network.Interface; +using NB.Game; namespace NB.Chat; -public class C2S_DeleteMailRequestHandler : AddressRPC +public class C2Game_DeleteMailRequestHandler : AddressRPC { - protected override async FTask Run(SocialUnit entity, C2S_DeleteMailRequest request, - S2C_DeleteMailResponse response, Action reply) + protected override async FTask Run(Player entity, C2Game_DeleteMailRequest request, + Game2C_DeleteMailResponse response, Action reply) { if (request.Id < 1) { diff --git a/Hotfix/Social/Mail/Handler/C2S_GetConversationsRequestHandler.cs b/Hotfix/Game/Social/Mail/Handler/C2Game_GetConversationsRequestHandler.cs similarity index 65% rename from Hotfix/Social/Mail/Handler/C2S_GetConversationsRequestHandler.cs rename to Hotfix/Game/Social/Mail/Handler/C2Game_GetConversationsRequestHandler.cs index 652b8a0..6f011a2 100644 --- a/Hotfix/Social/Mail/Handler/C2S_GetConversationsRequestHandler.cs +++ b/Hotfix/Game/Social/Mail/Handler/C2Game_GetConversationsRequestHandler.cs @@ -3,14 +3,15 @@ using System.Diagnostics; using Fantasy; using Fantasy.Async; using Fantasy.Network.Interface; +using NB.Game; namespace NB.Chat; public class - C2S_GetConversationsRequestHandler : AddressRPC + C2Game_GetConversationsRequestHandler : AddressRPC { - protected override async FTask Run(SocialUnit entity, C2S_GetConversationsRequest request, - S2C_GetConversationsResponse response, Action reply) + protected override async FTask Run(Player entity, C2Game_GetConversationsRequest request, + Game2C_GetConversationsResponse response, Action reply) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); diff --git a/Hotfix/Social/Mail/Handler/C2S_SendMailRequestHandler.cs b/Hotfix/Game/Social/Mail/Handler/C2Game_SendMailRequestHandler.cs similarity index 79% rename from Hotfix/Social/Mail/Handler/C2S_SendMailRequestHandler.cs rename to Hotfix/Game/Social/Mail/Handler/C2Game_SendMailRequestHandler.cs index 2156055..5280cbd 100644 --- a/Hotfix/Social/Mail/Handler/C2S_SendMailRequestHandler.cs +++ b/Hotfix/Game/Social/Mail/Handler/C2Game_SendMailRequestHandler.cs @@ -2,12 +2,13 @@ using Fantasy; using Fantasy.Async; using Fantasy.Network.Interface; +using NB.Game; namespace NB.Chat; -public class C2S_SendMailRequestHandler : AddressRPC +public class C2Game_SendMailRequestHandler : AddressRPC { - protected override async FTask Run(SocialUnit entity, C2S_SendMailRequest request, S2C_SendMailResponse response, + protected override async FTask Run(Player entity, C2Game_SendMailRequest request, Game2C_SendMailResponse response, Action reply) { if (request.Target < 1) @@ -24,7 +25,7 @@ public class C2S_SendMailRequestHandler : AddressRPC(); + var chatUnitManage = entity.Scene.GetComponent(); if (chatUnitManage == null) { Log.Error("组件不存在 SocialUnitManageComponent"); @@ -50,13 +51,13 @@ public class C2S_SendMailRequestHandler : AddressRPC +// { +// protected override void Destroy(SocialUnitManageComponent self) +// { +// foreach (var chatUnit in self.Units.Values.ToArray()) +// { +// chatUnit.Dispose(); +// } +// +// self.Units.Clear(); +// } +// } +// +// public static class SocialUnitManageComponentSystem +// { +// #region 消息缓存 +// +// /// +// /// 离线消息,进入待领取队列 +// /// +// /// +// /// +// /// +// public static void SaveOfflineMessage(this SocialUnitManageComponent self, long targetId, ChatMessageInfo message) +// { +// // self.NotSendMessage.Add(targetId, message); +// } +// +// #endregion +// +// #region 上线下线 +// +// /// +// /// 玩家上线 +// /// +// /// +// /// +// /// +// /// +// public static async FTask Online(this SocialUnitManageComponent self, Scene scene, +// long accountId, +// long gateRouteId) +// { +// // var accountId = roleSimpleInfo.RoleId; +// if (!self.TryGet(accountId, out var account)) +// { +// account = Entity.Create(scene, accountId, true, true); +// self.Add(account); +// } +// +// if (account != null) +// { +// await account.TryComponent(); +// account.GateRouteId = gateRouteId; +// // account.Role = roleSimpleInfo; +// } +// +// await FTask.CompletedTask; +// return account; +// } +// +// public static async FTask Offline(this SocialUnitManageComponent self, Scene scene, long accountId, +// long gateRouteId) +// { +// if (self.TryGet(accountId, out var unit) && unit != null) +// { +// if (unit.GateRouteId == gateRouteId) +// { +// Log.Info("退出当前聊天服=="); +// self.Remove(accountId); //如果当前网关和下线的网关一致 +// } +// } +// +// await FTask.CompletedTask; +// } +// +// #endregion +// +// #region 获取&移除 +// +// public static void Add(this SocialUnitManageComponent self, SocialUnit account) +// { +// self.Units.Add(account.Id, account); +// } +// +// public static SocialUnit? Get(this SocialUnitManageComponent self, long accountId) +// { +// return self.Units.GetValueOrDefault(accountId); +// } +// +// public static bool TryGet(this SocialUnitManageComponent self, long accountId, out SocialUnit? account) +// { +// return self.Units.TryGetValue(accountId, out account); +// } +// +// public static void Remove(this SocialUnitManageComponent self, long accountId, bool isDispose = true) +// { +// if (!self.Units.Remove(accountId, out var account)) +// { +// return; +// } +// +// if (!isDispose) +// { +// return; +// } +// +// account.Dispose(); +// } +// +// #endregion +// +// #region 组件 +// +// /// +// /// 尝试给增加相关组件 +// /// +// /// +// /// +// public static async FTask TryComponent(this SocialUnit socialUnit) where T : Entity, new() +// { +// if (socialUnit.GetComponent() == null) +// { +// var mailComponent = await socialUnit.Scene.World.Database.Query(socialUnit.Id, true); +// if (mailComponent == null) +// { +// //如果没有邮件组件 +// socialUnit.AddComponent(); +// } +// else +// { +// socialUnit.AddComponent(mailComponent); +// } +// } +// } +// +// #endregion +// } \ No newline at end of file diff --git a/Hotfix/Game/Social/SocialUnitSystem.cs b/Hotfix/Game/Social/SocialUnitSystem.cs new file mode 100644 index 0000000..9828fc0 --- /dev/null +++ b/Hotfix/Game/Social/SocialUnitSystem.cs @@ -0,0 +1,22 @@ +// using Fantasy.Entitas.Interface; +// #pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. +// +// namespace NB.Chat; +// +// public sealed class SocialUnitDestroySystem : DestroySystem +// { +// protected override void Destroy(SocialUnit self) +// { +// self.Role?.Return(); +// self.Role = null; +// self.GateRouteId = 0; +// // 退出当前ChatUnit拥有的所有频道 +// foreach (var (_,chatChannelComponent) in self.Channels) +// { +// chatChannelComponent.ExitChannel(self.Id, false); +// } +// // 理论情况下,这个self.Channels不会存在因为数据的,因为上面已经给清空掉了。 +// // 但是self.Channels.Clear();还是加上吧,防止以后忘记了。 +// self.Channels.Clear(); +// } +// } \ No newline at end of file diff --git a/Hotfix/Gate/Handler/Inner/S2G_ChatMessageHandler.cs b/Hotfix/Gate/Handler/Inner/S2G_ChatMessageHandler.cs index b0f6aaa..c85d9c4 100644 --- a/Hotfix/Gate/Handler/Inner/S2G_ChatMessageHandler.cs +++ b/Hotfix/Gate/Handler/Inner/S2G_ChatMessageHandler.cs @@ -11,7 +11,7 @@ public class S2G_ChatMessageHandler : Address { protected override async FTask Run(Scene scene, Chat2G_ChatMessage message) { - // var chatMessage = new S2C_Message() + // var chatMessage = new Game2C_Message() // { // Msg = message.Message, // }; @@ -42,7 +42,7 @@ public class S2G_ChatMessageHandler : Address // } // } // } - var chatMessage = new Chat2C_Message() + var chatMessage = new Game2C_Message() { ChatInfoTree = message.ChatInfoTree }; diff --git a/Hotfix/Gate/Helper/GateLoginHelper.cs b/Hotfix/Gate/Helper/GateLoginHelper.cs index 60096fe..6f22f9a 100644 --- a/Hotfix/Gate/Helper/GateLoginHelper.cs +++ b/Hotfix/Gate/Helper/GateLoginHelper.cs @@ -45,7 +45,7 @@ public static class GateLoginHelper gateUnitSessionComponent.AccountID = gateUnit.AccountID; gateUnitSessionComponent.SessionId = session.RuntimeId; - return await gateUnit.Online(RouteType.GameRoute, RouteType.SocialRoute); + return await gateUnit.Online(RouteType.GameRoute); } #endregion @@ -61,7 +61,7 @@ public static class GateLoginHelper { //通知服务器下线 Log.Info($"断线的session id={sessionId}"); - var ret = await gateUnit.Offline(sessionId, RouteType.GameRoute, RouteType.SocialRoute); + var ret = await gateUnit.Offline(sessionId, RouteType.GameRoute); return ret; } diff --git a/Hotfix/Hotfix.csproj b/Hotfix/Hotfix.csproj index 7725e43..e60aa11 100644 --- a/Hotfix/Hotfix.csproj +++ b/Hotfix/Hotfix.csproj @@ -12,8 +12,4 @@ - - - - \ No newline at end of file diff --git a/Hotfix/OnCreateSceneEvent.cs b/Hotfix/OnCreateSceneEvent.cs index c1f6599..6713703 100644 --- a/Hotfix/OnCreateSceneEvent.cs +++ b/Hotfix/OnCreateSceneEvent.cs @@ -44,15 +44,16 @@ public sealed class OnCreateSceneEvent : AsyncEventSystem // await InitializeMapScene(scene); // break; // } - case SceneType.Social: - { - // Gate 场景初始化 - await InitializeSocialScene(scene); - break; - } + // case SceneType.Social: + // { + // // Gate 场景初始化 + // await InitializeSocialScene(scene); + // break; + // } case SceneType.Game: { await InitializeGameScene(scene); + await InitializeSocialScene(scene); break; } } @@ -139,7 +140,6 @@ public sealed class OnCreateSceneEvent : AsyncEventSystem { Log.Info($"初始化 Social 场景: {scene.Id}"); //用于管理玩家的组件 - scene.AddComponent(); scene.AddComponent(); //聊天 // 聊天频道中控中心组件。 diff --git a/Hotfix/Social/Chat/Handler/Inner/Other2Chat_ChatMessageHandler.cs b/Hotfix/Social/Chat/Handler/Inner/Other2Chat_ChatMessageHandler.cs deleted file mode 100644 index c0ccc97..0000000 --- a/Hotfix/Social/Chat/Handler/Inner/Other2Chat_ChatMessageHandler.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Fantasy; -using Fantasy.Async; -using Fantasy.Network.Interface; - -namespace NB.Chat; - -public sealed class Other2Chat_ChatMessageHandler : Address -{ - protected override async FTask Run(SocialUnit chatUnit, Other2Chat_ChatMessage message) - { - var result = ChatSceneHelper.Distribution(chatUnit, message.ChatInfoTree, false); - - if (result != 0) - { - Log.Warning($"Other2Chat_ChatMessageHandler: Distribution failed, result: {result}"); - } - - await FTask.CompletedTask; - } -} \ No newline at end of file diff --git a/Hotfix/Social/SocialUnitManageComponentSystem.cs b/Hotfix/Social/SocialUnitManageComponentSystem.cs deleted file mode 100644 index b61788b..0000000 --- a/Hotfix/Social/SocialUnitManageComponentSystem.cs +++ /dev/null @@ -1,146 +0,0 @@ -using Fantasy; -using Fantasy.Async; -using Fantasy.Entitas; -using Fantasy.Entitas.Interface; -using NB.Chat; - -namespace NBF.Social; - -public sealed class ChatUnitManageComponentDestroySystem : DestroySystem -{ - protected override void Destroy(SocialUnitManageComponent self) - { - foreach (var chatUnit in self.Units.Values.ToArray()) - { - chatUnit.Dispose(); - } - - self.Units.Clear(); - } -} - -public static class SocialUnitManageComponentSystem -{ - #region 消息缓存 - - /// - /// 离线消息,进入待领取队列 - /// - /// - /// - /// - public static void SaveOfflineMessage(this SocialUnitManageComponent self, long targetId, ChatMessageInfo message) - { - // self.NotSendMessage.Add(targetId, message); - } - - #endregion - - #region 上线下线 - - /// - /// 玩家上线 - /// - /// - /// - /// - /// - public static async FTask Online(this SocialUnitManageComponent self, Scene scene, - long accountId, - long gateRouteId) - { - // var accountId = roleSimpleInfo.RoleId; - if (!self.TryGet(accountId, out var account)) - { - account = Entity.Create(scene, accountId, true, true); - self.Add(account); - } - - if (account != null) - { - await account.TryComponent(); - account.GateRouteId = gateRouteId; - // account.Role = roleSimpleInfo; - } - - await FTask.CompletedTask; - return account; - } - - public static async FTask Offline(this SocialUnitManageComponent self, Scene scene, long accountId, - long gateRouteId) - { - if (self.TryGet(accountId, out var unit) && unit != null) - { - if (unit.GateRouteId == gateRouteId) - { - Log.Info("退出当前聊天服=="); - self.Remove(accountId); //如果当前网关和下线的网关一致 - } - } - - await FTask.CompletedTask; - } - - #endregion - - #region 获取&移除 - - public static void Add(this SocialUnitManageComponent self, SocialUnit account) - { - self.Units.Add(account.Id, account); - } - - public static SocialUnit? Get(this SocialUnitManageComponent self, long accountId) - { - return self.Units.GetValueOrDefault(accountId); - } - - public static bool TryGet(this SocialUnitManageComponent self, long accountId, out SocialUnit? account) - { - return self.Units.TryGetValue(accountId, out account); - } - - public static void Remove(this SocialUnitManageComponent self, long accountId, bool isDispose = true) - { - if (!self.Units.Remove(accountId, out var account)) - { - return; - } - - if (!isDispose) - { - return; - } - - account.Dispose(); - } - - #endregion - - #region 组件 - - /// - /// 尝试给增加相关组件 - /// - /// - /// - public static async FTask TryComponent(this SocialUnit socialUnit) where T : Entity, new() - { - if (socialUnit.GetComponent() == null) - { - var mailComponent = await socialUnit.Scene.World.Database.Query(socialUnit.Id, true); - if (mailComponent == null) - { - //如果没有邮件组件 - socialUnit.AddComponent(); - } - else - { - socialUnit.AddComponent(mailComponent); - } - } - } - - #endregion -} \ No newline at end of file diff --git a/Hotfix/Social/SocialUnitSystem.cs b/Hotfix/Social/SocialUnitSystem.cs deleted file mode 100644 index dcec9e1..0000000 --- a/Hotfix/Social/SocialUnitSystem.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Fantasy.Entitas.Interface; -#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. - -namespace NB.Chat; - -public sealed class SocialUnitDestroySystem : DestroySystem -{ - protected override void Destroy(SocialUnit self) - { - self.Role?.Return(); - self.Role = null; - self.GateRouteId = 0; - // 退出当前ChatUnit拥有的所有频道 - foreach (var (_,chatChannelComponent) in self.Channels) - { - chatChannelComponent.ExitChannel(self.Id, false); - } - // 理论情况下,这个self.Channels不会存在因为数据的,因为上面已经给清空掉了。 - // 但是self.Channels.Clear();还是加上吧,防止以后忘记了。 - self.Channels.Clear(); - } -} \ No newline at end of file diff --git a/Server.sln.DotSettings.user b/Server.sln.DotSettings.user index 9fdeb46..b72c42f 100644 --- a/Server.sln.DotSettings.user +++ b/Server.sln.DotSettings.user @@ -10,6 +10,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded diff --git a/Tools/NetworkProtocol/Outer/MapMessage.proto b/Tools/NetworkProtocol/Outer/MapMessage.proto index 5ed1002..cef3ff5 100644 --- a/Tools/NetworkProtocol/Outer/MapMessage.proto +++ b/Tools/NetworkProtocol/Outer/MapMessage.proto @@ -2,13 +2,13 @@ syntax = "proto3"; package Fantasy.Network.Message; /// 请求创建房间 -message C2Map_CreateRoomRequest // ICustomRouteRequest,Map2C_CreateRoomResponse,GameRoute +message C2Game_CreateRoomRequest // ICustomRouteRequest,Game2C_CreateRoomResponse,GameRoute { int32 MapId = 1;//地图id } /// 请求创建房间成功 -message Map2C_CreateRoomResponse // ICustomRouteResponse +message Game2C_CreateRoomResponse // ICustomRouteResponse { string RoomCode = 1; //房间代码 repeated MapUnitInfo Units = 2; //房间玩家列表 @@ -47,7 +47,7 @@ message G2C_EnterMapResponse // IResponse /// 通知客户端切换地图 -message Map2C_ChangeMap // ICustomRouteMessage,GameRoute +message Game2C_ChangeMap // ICustomRouteMessage,GameRoute { int32 MapId = 1; //地图id int32 Node = 2; //站位节点 diff --git a/Tools/NetworkProtocol/Outer/RoomMessage.proto b/Tools/NetworkProtocol/Outer/RoomMessage.proto index 104793f..21b5fc1 100644 --- a/Tools/NetworkProtocol/Outer/RoomMessage.proto +++ b/Tools/NetworkProtocol/Outer/RoomMessage.proto @@ -4,13 +4,13 @@ package Fantasy.Network.Message; //************** 进入 离开 ********************** ///用户进入地图 -message Map2C_RoleEnterRoomNotify // ICustomRouteMessage,GameRoute +message Game2C_RoleEnterRoomNotify // ICustomRouteMessage,GameRoute { MapUnitInfo Info = 2; } ///用户离开地图 -message Map2C_RoleExitRoomNotify // ICustomRouteMessage,GameRoute +message Game2C_RoleExitRoomNotify // ICustomRouteMessage,GameRoute { int64 Id = 1;//离开人员 } @@ -18,14 +18,14 @@ message Map2C_RoleExitRoomNotify // ICustomRouteMessage,GameRoute //************** 物品变化 ********************** /// 请求拿起物品 -message C2Map_TakeItemRequest // ICustomRouteRequest,Map2C_TakeItemResponse,GameRoute +message C2Game_TakeItemRequest // ICustomRouteRequest,Game2C_TakeItemResponse,GameRoute { int32 Id = 1; //物品id bool Task = 2; //拿起 } /// 请求拿起物品响应 -message Map2C_TakeItemResponse // ICustomRouteResponse +message Game2C_TakeItemResponse // ICustomRouteResponse { int32 Id = 1; //物品id bool Task = 2; //拿起 @@ -33,27 +33,27 @@ message Map2C_TakeItemResponse // ICustomRouteResponse //************** 参数变化 ********************** -message C2Map_RolePropertyChange // ICustomRouteMessage,GameRoute +message C2Game_RolePropertyChange // ICustomRouteMessage,GameRoute { repeated KeyValueInt64 Propertys = 1; //变化的属性信息 } ///玩家状态变化同步 -message Map2C_RoleStateNotify // ICustomRouteMessage,GameRoute +message Game2C_RoleStateNotify // ICustomRouteMessage,GameRoute { int64 Id = 1; UnitStateInfo State = 2; } ///玩家钓组变化 -message Map2C_RoleGearChangeNotify // ICustomRouteMessage,GameRoute +message Game2C_RoleGearChangeNotify // ICustomRouteMessage,GameRoute { int64 Id = 1; repeated GearInfo Gears = 2; //钓组数据 } //玩家属性值变化 -message Map2C_RolePropertyChangeNotify // ICustomRouteMessage,GameRoute +message Game2C_RolePropertyChangeNotify // ICustomRouteMessage,GameRoute { int64 Id = 1; repeated KeyValueInt64 Propertys = 2; //变化的属性信息 @@ -64,7 +64,7 @@ message Map2C_RolePropertyChangeNotify // ICustomRouteMessage,GameRoute //************** 移动 旋转 ********************** // 角色移动 -message C2Map_Move // ICustomRouteMessage,GameRoute +message C2Game_Move // ICustomRouteMessage,GameRoute { Vector3Info Position = 1; //当前位置 Vector3Info Rotation = 2; //角色方向 @@ -75,14 +75,14 @@ message C2Map_Move // ICustomRouteMessage,GameRoute } // 角色朝向变化 -message C2Map_Look // ICustomRouteMessage,GameRoute +message C2Game_Look // ICustomRouteMessage,GameRoute { Vector3Info Rotation = 1; //角色方向 int64 Timestamp = 2; // 时间点 } ///玩家移动推送 -message Map2C_MoveNotify // ICustomRouteMessage,GameRoute +message Game2C_MoveNotify // ICustomRouteMessage,GameRoute { int64 Id = 1; // id Vector3Info Position = 2; //当前位置 @@ -94,7 +94,7 @@ message Map2C_MoveNotify // ICustomRouteMessage,GameRoute } ///玩家旋转推送 -message Map2C_LookeNotify // ICustomRouteMessage,GameRoute +message Game2C_LookeNotify // ICustomRouteMessage,GameRoute { int64 Id = 1; // id Vector3Info Rotation = 2; //角色方向 diff --git a/Tools/NetworkProtocol/Outer/SocialMessage.proto b/Tools/NetworkProtocol/Outer/SocialMessage.proto index eac8f52..d86d08d 100644 --- a/Tools/NetworkProtocol/Outer/SocialMessage.proto +++ b/Tools/NetworkProtocol/Outer/SocialMessage.proto @@ -23,19 +23,19 @@ message MailInfo ///请求会话列表 -message C2S_GetConversationsRequest // ICustomRouteRequest,S2C_GetConversationsResponse,SocialRoute +message C2Game_GetConversationsRequest // ICustomRouteRequest,Game2C_GetConversationsResponse,GameRoute { } ///请求会话列表响应 -message S2C_GetConversationsResponse // ICustomRouteResponse +message Game2C_GetConversationsResponse // ICustomRouteResponse { repeated ConversationInfo List = 1; } ///发送邮件消息 -message C2S_SendMailRequest // ICustomRouteRequest,S2C_SendMailResponse,SocialRoute +message C2Game_SendMailRequest // ICustomRouteRequest,Game2C_SendMailResponse,GameRoute { int64 Target = 1; //目标id string Content = 2; //内容 @@ -43,32 +43,32 @@ message C2S_SendMailRequest // ICustomRouteRequest,S2C_SendMailResponse,SocialRo } ///发送邮件消息响应 -message S2C_SendMailResponse // ICustomRouteResponse +message Game2C_SendMailResponse // ICustomRouteResponse { } ///发送删除会话消息 -message C2S_DeleteMailRequest // ICustomRouteRequest,S2C_DeleteMailResponse,SocialRoute +message C2Game_DeleteMailRequest // ICustomRouteRequest,Game2C_DeleteMailResponse,GameRoute { int64 Id = 1; //会话id } ///发送删除会话消息响应 -message S2C_DeleteMailResponse // ICustomRouteResponse +message Game2C_DeleteMailResponse // ICustomRouteResponse { int64 Id = 1; //会话id } ///新邮件推送 -message S2C_HaveMail // ICustomRouteMessage,SocialRoute +message Game2C_HaveMail // ICustomRouteMessage,GameRoute { MailInfo Mail = 1; string Key = 2; } -message S2C_MailState // ICustomRouteMessage,SocialRoute +message Game2C_MailState // ICustomRouteMessage,GameRoute { int32 MailState = 1; int64 MailId = 2; @@ -77,17 +77,17 @@ message S2C_MailState // ICustomRouteMessage,SocialRoute ////////////// ******** 频道聊天 *******///////////// /// 发送一个聊天消息给Chat服务器,中间是经过Gate中转的 -message C2Chat_SendMessageRequest // ICustomRouteRequest,Chat2C_SendMessageResponse,SocialRoute +message C2Game_SendMessageRequest // ICustomRouteRequest,Game2C_SendMessageResponse,GameRoute { ChatInfoTree ChatInfoTree = 1; } -message Chat2C_SendMessageResponse // ICustomRouteResponse +message Game2C_SendMessageResponse // ICustomRouteResponse { } // 该消息是Chat发送给Gate服务器,让Gate服务器自动转发到客户端 -message Chat2C_Message // ICustomRouteMessage,SocialRoute +message Game2C_Message // ICustomRouteMessage,GameRoute { ChatInfoTree ChatInfoTree = 1; } @@ -164,47 +164,47 @@ message ChatMessageInfo } ///创建频道 -message C2S_CreateChannelRequest // ICustomRouteRequest,S2C_CreateChannelResponse,SocialRoute +message C2Game_CreateChannelRequest // ICustomRouteRequest,Game2C_CreateChannelResponse,GameRoute { string Name = 1; //频道名称 } ///创建频道响应 -message S2C_CreateChannelResponse // ICustomRouteResponse +message Game2C_CreateChannelResponse // ICustomRouteResponse { int64 ChannelId = 1; //创建的频道id } ///请求进入频道 -message C2S_JoinChannelRequest // ICustomRouteRequest,S2C_JoinChannelResponse,SocialRoute +message C2Game_JoinChannelRequest // ICustomRouteRequest,Game2C_JoinChannelResponse,GameRoute { int64 Target = 1; // 频道id } ///进入频道响应 -message S2C_JoinChannelResponse // ICustomRouteResponse +message Game2C_JoinChannelResponse // ICustomRouteResponse { } -///发送消息 -message C2S_SendMessageRequest // ICustomRouteRequest,S2C_SendMessageResponse,SocialRoute -{ - string Message = 1; - int64 Target = 2; //目标id -} +// ///发送消息 +// message C2Game_SendMessageRequest // ICustomRouteRequest,Game2C_SendMessageResponse,GameRoute +// { +// string Message = 1; +// int64 Target = 2; //目标id +// } -///发送消息响应 -message S2C_SendMessageResponse // ICustomRouteResponse -{ +// ///发送消息响应 +// message Game2C_SendMessageResponse // ICustomRouteResponse +// { -} +// } -///推送消息 -message S2C_Message // ICustomRouteMessage,SocialRoute -{ - ChatMessageInfo Msg = 1; -} +// ///推送消息 +// message Game2C_Message // ICustomRouteMessage,GameRoute +// { +// ChatMessageInfo Msg = 1; +// } ////////////// ******** 工会 *******///////////// @@ -219,89 +219,89 @@ message ClubInfo } ///请求创建工会 -message C2S_CreateClubRequest // ICustomRouteRequest,S2C_CreateClubResponse,SocialRoute +message C2Game_CreateClubRequest // ICustomRouteRequest,Game2C_CreateClubResponse,GameRoute { string Name = 1; //工会名称 } ///创建工会响应 -message S2C_CreateClubResponse // ICustomRouteResponse +message Game2C_CreateClubResponse // ICustomRouteResponse { ClubInfo Club = 1; //创建的工会信息 } ///请求工会信息 -message C2S_GetClubInfoRequest // ICustomRouteRequest,S2C_GetClubInfoResponse,SocialRoute +message C2Game_GetClubInfoRequest // ICustomRouteRequest,Game2C_GetClubInfoResponse,GameRoute { int64 ClubId = 1; //工会ID } ///响应工会信息 -message S2C_GetClubInfoResponse // ICustomRouteResponse +message Game2C_GetClubInfoResponse // ICustomRouteResponse { string Name = 1; //工会名称 } /// 请求工会成员列表 -message C2S_GetMemberListRequest // ICustomRouteRequest,S2C_GetMemberListResponse,SocialRoute +message C2Game_GetMemberListRequest // ICustomRouteRequest,Game2C_GetMemberListResponse,GameRoute { int64 ClubId = 1; //工会ID } /// 响应工会成员列表 -message S2C_GetMemberListResponse // ICustomRouteResponse +message Game2C_GetMemberListResponse // ICustomRouteResponse { repeated RoleSimpleInfo Members = 1; //工会成员列表 } ///获取工会列表请求 -message C2S_GetClubListRequest // ICustomRouteRequest,S2C_GetClubListResponse,SocialRoute +message C2Game_GetClubListRequest // ICustomRouteRequest,Game2C_GetClubListResponse,GameRoute { } ///获取工会列表响应 -message S2C_GetClubListResponse // ICustomRouteResponse +message Game2C_GetClubListResponse // ICustomRouteResponse { repeated ClubInfo Clubs = 1; //工会列表 } /// 请求加入工会 -message C2S_JoinClubRequest // ICustomRouteRequest,S2C_JoinClubResponse,SocialRoute +message C2Game_JoinClubRequest // ICustomRouteRequest,Game2C_JoinClubResponse,GameRoute { int64 ClubId = 1; //工会ID } /// 响应加入工会 -message S2C_JoinClubResponse // ICustomRouteResponse +message Game2C_JoinClubResponse // ICustomRouteResponse { ClubInfo Club = 1; //加入的工会信息 } /// 请求退出工会 -message C2S_LeaveClubRequest // ICustomRouteRequest,S2C_LeaveClubResponse,SocialRoute +message C2Game_LeaveClubRequest // ICustomRouteRequest,Game2C_LeaveClubResponse,GameRoute { int64 ClubId = 1; //工会ID } /// 响应退出工会 -message S2C_LeaveClubResponse // ICustomRouteResponse +message Game2C_LeaveClubResponse // ICustomRouteResponse { int64 ClubId = 1; //退出的工会ID } /// 请求解散工会 -message C2S_DissolveClubRequest // ICustomRouteRequest,S2C_DissolveClubResponse,SocialRoute +message C2Game_DissolveClubRequest // ICustomRouteRequest,Game2C_DissolveClubResponse,GameRoute { int64 ClubId = 1; //工会ID } /// 响应解散工会 -message S2C_DissolveClubResponse // ICustomRouteResponse +message Game2C_DissolveClubResponse // ICustomRouteResponse { int64 ClubId = 1; //解散的工会ID } /// 请求操作申请 -message C2S_DisposeJoinRequest // ICustomRouteRequest,S2C_DisposeJoinResponse,SocialRoute +message C2Game_DisposeJoinRequest // ICustomRouteRequest,Game2C_DisposeJoinResponse,GameRoute { int64 ClubId = 1; //工会ID int64 ApplicantId = 2; //申请人ID @@ -309,7 +309,7 @@ message C2S_DisposeJoinRequest // ICustomRouteRequest,S2C_DisposeJoinResponse,So } /// 响应操作申请 -message S2C_DisposeJoinResponse // ICustomRouteResponse +message Game2C_DisposeJoinResponse // ICustomRouteResponse { int64 ClubId = 1; //工会ID int64 ApplicantId = 2; //申请人ID @@ -317,7 +317,7 @@ message S2C_DisposeJoinResponse // ICustomRouteResponse } ///推送消息 -message S2C_ClubChange // ICustomRouteMessage,SocialRoute +message Game2C_ClubChange // ICustomRouteMessage,GameRoute { ClubInfo Club = 1; int32 ChangeType = 2; //变更类型 0.创建 1.解散 2.加入 3.退出 4.申请处理 diff --git a/Tools/NetworkProtocol/RouteType.Config b/Tools/NetworkProtocol/RouteType.Config index 82e1593..2c25bd4 100644 --- a/Tools/NetworkProtocol/RouteType.Config +++ b/Tools/NetworkProtocol/RouteType.Config @@ -1,4 +1,3 @@ // Route协议定义(需要定义1000以上、因为1000以内的框架预留) GateRoute = 1001 // Gate -SocialRoute = 1002 // Social -GameRoute = 1003 // Game \ No newline at end of file +GameRoute = 1002 // Game \ No newline at end of file