From 8c3be0a5bba082602aa2f1d6dda724e5a0237197 Mon Sep 17 00:00:00 2001 From: BobSong <605277374@qq.com> Date: Fri, 22 Aug 2025 00:08:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/NetworkProtocol/Outer/MapMessage.proto | 53 +- Entity/Generate/NetworkProtocol/Account.cs | 6 + Entity/Generate/NetworkProtocol/MapMessage.cs | 468 ++++++++++++++++++ .../Generate/NetworkProtocol/OuterMessage.cs | 34 +- .../Generate/NetworkProtocol/OuterOpcode.cs | 77 +-- Entity/Generate/NetworkProtocol/RouteType.cs | 1 + Entity/Map/MapUnit.cs | 10 + Hotfix/Game/Player/Helper/PlayerHelper.cs | 20 +- 8 files changed, 574 insertions(+), 95 deletions(-) create mode 100644 Entity/Generate/NetworkProtocol/MapMessage.cs diff --git a/Config/NetworkProtocol/Outer/MapMessage.proto b/Config/NetworkProtocol/Outer/MapMessage.proto index 705c021..5e3e5de 100644 --- a/Config/NetworkProtocol/Outer/MapMessage.proto +++ b/Config/NetworkProtocol/Outer/MapMessage.proto @@ -1,12 +1,26 @@ syntax = "proto3"; package Fantasy.Network.Message; -message GearItemInfo +message RoleGearItemInfo { int64 Id = 1; //唯一id int32 ConfigId = 2; //配置id } +message RoleGearInfo +{ + RoleGearItemInfo Rod = 1; + RoleGearItemInfo Reel = 2; + RoleGearItemInfo Bobber = 3; + RoleGearItemInfo Hook = 4; + RoleGearItemInfo Bait = 5; + RoleGearItemInfo Lure = 6; + RoleGearItemInfo Weight = 7; + RoleGearItemInfo Line = 8; + RoleGearItemInfo Leader = 9; + RoleGearItemInfo Feeder = 10; +} + message Vector3Info { float x = 1; @@ -21,9 +35,12 @@ message QuaternionInfo float w = 4; } -message GearStateInfo +message RoleFishingInfo { - + float LineLength = 1;//线长度 + float ReelSpeed = 2;//收线速度 + bool OpenLight = 3;//打开手电筒 + int RodSetting = 4; } message RoleStateInfo @@ -32,19 +49,14 @@ message RoleStateInfo repeated string Args = 2; //状态参数 } -message MapRoleInfo -{ - RoleSimpleInfo Info = 1; //基础信息 -} - message MapRoleInfo { int64 Id = 1; //用户id - MapRolePositionInfo Location = 2; //位置信息 - RoleStateInfo State = 3; //状态信息 - repeated GearItemInfo Gears = 4; //钓组数据 - MapRoleInfo Info = 5; //玩家信息 - GearStateInfo GearStateInfo = 6; //钓组状态信息 + RoleSimpleInfo RoleInfo = 2; //基础信息 + MapRolePositionInfo Location = 3; //位置信息 + RoleStateInfo State = 4; //状态信息 + RoleGearInfo Gears = 5; //钓组数据 + RoleFishingInfo FishingInfo = 6; //钓鱼状态信息 } message MapRolePositionInfo @@ -53,6 +65,17 @@ message MapRolePositionInfo QuaternionInfo Rotation = 2; } +C2Map_CreateMapRequest // ICustomRouteRequest,Map2C_CreateMapResponse,MapRoute +{ + int32 MapId = 1;//地图id + string Password = 2;//进入密码 +} + +message Map2C_CreateMapResponse // ICustomRouteResponse +{ + repeated MapRoleInfo Roles = 1;//地图玩家列表 +} + message C2Map_EnterMapRequest // ICustomRouteRequest,Map2C_EnterMapResponse,MapRoute { int32 MapId = 1;//地图id @@ -95,14 +118,14 @@ message Map2C_RoleStateNotify // ICustomRouteMessage,MapRoute message Map2C_RoleGearStateNotify // ICustomRouteMessage,MapRoute { int64 Id = 1; - GearStateInfo State = 2; + RoleFishingInfo State = 2; } ///玩家钓组变化 message Map2C_RoleGearChangeNotify // ICustomRouteMessage,MapRoute { int64 Id = 1; - repeated GearItemInfo Gears = 2; //钓组数据 + RoleGearInfo Gears = 2; //钓组数据 } ///玩家位置变化 diff --git a/Entity/Generate/NetworkProtocol/Account.cs b/Entity/Generate/NetworkProtocol/Account.cs index aeee4aa..984048e 100644 --- a/Entity/Generate/NetworkProtocol/Account.cs +++ b/Entity/Generate/NetworkProtocol/Account.cs @@ -135,6 +135,7 @@ namespace Fantasy Currency.Clear(); Slots.Clear(); Skills.Clear(); + MapId = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif @@ -155,6 +156,8 @@ namespace Fantasy public List Slots = new List(); [ProtoMember(8)] public List Skills = new List(); + [ProtoMember(9)] + public int MapId { get; set; } } /// /// 角色信息 @@ -174,6 +177,7 @@ namespace Fantasy Country = default; Level = default; Vip = default; + MapId = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif @@ -190,6 +194,8 @@ namespace Fantasy public int Level { get; set; } [ProtoMember(6)] public bool Vip { get; set; } + [ProtoMember(7)] + public int MapId { get; set; } } /// /// VIP信息 diff --git a/Entity/Generate/NetworkProtocol/MapMessage.cs b/Entity/Generate/NetworkProtocol/MapMessage.cs new file mode 100644 index 0000000..e744cb5 --- /dev/null +++ b/Entity/Generate/NetworkProtocol/MapMessage.cs @@ -0,0 +1,468 @@ +using ProtoBuf; + +using System.Collections.Generic; +using MongoDB.Bson.Serialization.Attributes; +using Fantasy; +using Fantasy.Network.Interface; +using Fantasy.Serialize; +// ReSharper disable InconsistentNaming +// ReSharper disable RedundantUsingDirective +// ReSharper disable RedundantOverriddenMember +// ReSharper disable PartialTypeWithSinglePart +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable CheckNamespace +#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. +#pragma warning disable CS8618 + +namespace Fantasy +{ + [ProtoContract] + public partial class RoleGearItemInfo : AMessage, IProto + { + public static RoleGearItemInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + Id = default; + ConfigId = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public long Id { get; set; } + [ProtoMember(2)] + public int ConfigId { get; set; } + } + [ProtoContract] + public partial class RoleGearInfo : AMessage, IProto + { + public static RoleGearInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + Rod = default; + Reel = default; + Bobber = default; + Hook = default; + Bait = default; + Lure = default; + Weight = default; + Line = default; + Leader = default; + Feeder = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public RoleGearItemInfo Rod { get; set; } + [ProtoMember(2)] + public RoleGearItemInfo Reel { get; set; } + [ProtoMember(3)] + public RoleGearItemInfo Bobber { get; set; } + [ProtoMember(4)] + public RoleGearItemInfo Hook { get; set; } + [ProtoMember(5)] + public RoleGearItemInfo Bait { get; set; } + [ProtoMember(6)] + public RoleGearItemInfo Lure { get; set; } + [ProtoMember(7)] + public RoleGearItemInfo Weight { get; set; } + [ProtoMember(8)] + public RoleGearItemInfo Line { get; set; } + [ProtoMember(9)] + public RoleGearItemInfo Leader { get; set; } + [ProtoMember(10)] + public RoleGearItemInfo Feeder { get; set; } + } + [ProtoContract] + public partial class Vector3Info : AMessage, IProto + { + public static Vector3Info Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + x = default; + y = default; + z = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public float x { get; set; } + [ProtoMember(2)] + public float y { get; set; } + [ProtoMember(3)] + public float z { get; set; } + } + [ProtoContract] + public partial class QuaternionInfo : AMessage, IProto + { + public static QuaternionInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + x = default; + y = default; + z = default; + w = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public float x { get; set; } + [ProtoMember(2)] + public float y { get; set; } + [ProtoMember(3)] + public float z { get; set; } + [ProtoMember(4)] + public float w { get; set; } + } + [ProtoContract] + public partial class RoleFishingInfo : AMessage, IProto + { + public static RoleFishingInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + LineLength = default; + ReelSpeed = default; + OpenLight = default; + RodSetting = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public float LineLength { get; set; } + [ProtoMember(2)] + public float ReelSpeed { get; set; } + [ProtoMember(3)] + public bool OpenLight { get; set; } + [ProtoMember(4)] + public int RodSetting { get; set; } + } + [ProtoContract] + public partial class RoleStateInfo : AMessage, IProto + { + public static RoleStateInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + State = default; + Args.Clear(); +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public int State { get; set; } + [ProtoMember(2)] + public List Args = new List(); + } + [ProtoContract] + public partial class MapRoleInfo : AMessage, IProto + { + public static MapRoleInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + Id = default; + RoleInfo = default; + Location = default; + State = default; + Gears = default; + FishingInfo = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public long Id { get; set; } + [ProtoMember(2)] + public RoleSimpleInfo RoleInfo { get; set; } + [ProtoMember(3)] + public MapRolePositionInfo Location { get; set; } + [ProtoMember(4)] + public RoleStateInfo State { get; set; } + [ProtoMember(5)] + public RoleGearInfo Gears { get; set; } + [ProtoMember(6)] + public RoleFishingInfo FishingInfo { get; set; } + } + [ProtoContract] + public partial class MapRolePositionInfo : AMessage, IProto + { + public static MapRolePositionInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + Position = default; + Rotation = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public Vector3Info Position { get; set; } + [ProtoMember(2)] + public QuaternionInfo Rotation { get; set; } + } + [ProtoContract] + public partial class Map2C_CreateMapResponse : AMessage, ICustomRouteResponse, IProto + { + public static Map2C_CreateMapResponse Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + ErrorCode = default; + Roles.Clear(); +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + public uint OpCode() { return OuterOpcode.Map2C_CreateMapResponse; } + [ProtoMember(1)] + public List Roles = new List(); + [ProtoMember(2)] + public uint ErrorCode { get; set; } + } + [ProtoContract] + public partial class C2Map_EnterMapRequest : AMessage, ICustomRouteRequest, IProto + { + public static C2Map_EnterMapRequest Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + MapId = default; + RoomId = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoIgnore] + public Map2C_EnterMapResponse ResponseType { get; set; } + public uint OpCode() { return OuterOpcode.C2Map_EnterMapRequest; } + [ProtoIgnore] + public int RouteType => Fantasy.RouteType.MapRoute; + [ProtoMember(1)] + public int MapId { get; set; } + [ProtoMember(2)] + public long RoomId { get; set; } + } + [ProtoContract] + public partial class Map2C_EnterMapResponse : AMessage, ICustomRouteResponse, IProto + { + public static Map2C_EnterMapResponse Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + ErrorCode = default; + Roles.Clear(); +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + public uint OpCode() { return OuterOpcode.Map2C_EnterMapResponse; } + [ProtoMember(1)] + public List Roles = new List(); + [ProtoMember(2)] + public uint ErrorCode { get; set; } + } + [ProtoContract] + public partial class C2Map_Move : AMessage, ICustomRouteMessage, IProto + { + public static C2Map_Move Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + Location = default; + IsStop = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + public uint OpCode() { return OuterOpcode.C2Map_Move; } + [ProtoIgnore] + public int RouteType => Fantasy.RouteType.MapRoute; + [ProtoMember(1)] + public MapRolePositionInfo Location { get; set; } + [ProtoMember(2)] + public bool IsStop { get; set; } + } + /// + /// 用户进入地图 + /// + [ProtoContract] + public partial class Map2C_RoleEnterMapNotify : AMessage, ICustomRouteMessage, IProto + { + public static Map2C_RoleEnterMapNotify Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + Info = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + public uint OpCode() { return OuterOpcode.Map2C_RoleEnterMapNotify; } + [ProtoIgnore] + public int RouteType => Fantasy.RouteType.MapRoute; + [ProtoMember(1)] + public MapRoleInfo Info { get; set; } + } + /// + /// 用户离开地图 + /// + [ProtoContract] + public partial class Map2C_RoleExitMapNotify : AMessage, ICustomRouteMessage, IProto + { + public static Map2C_RoleExitMapNotify Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + Id = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + public uint OpCode() { return OuterOpcode.Map2C_RoleExitMapNotify; } + [ProtoIgnore] + public int RouteType => Fantasy.RouteType.MapRoute; + [ProtoMember(1)] + public long Id { get; set; } + } + /// + /// 玩家状态变化同步 + /// + [ProtoContract] + public partial class Map2C_RoleStateNotify : AMessage, ICustomRouteMessage, IProto + { + public static Map2C_RoleStateNotify Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + Id = default; + State = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + public uint OpCode() { return OuterOpcode.Map2C_RoleStateNotify; } + [ProtoIgnore] + public int RouteType => Fantasy.RouteType.MapRoute; + [ProtoMember(1)] + public long Id { get; set; } + [ProtoMember(2)] + public RoleStateInfo State { get; set; } + } + /// + /// 玩家钓组状态变化 + /// + [ProtoContract] + public partial class Map2C_RoleGearStateNotify : AMessage, ICustomRouteMessage, IProto + { + public static Map2C_RoleGearStateNotify Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + Id = default; + State = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + public uint OpCode() { return OuterOpcode.Map2C_RoleGearStateNotify; } + [ProtoIgnore] + public int RouteType => Fantasy.RouteType.MapRoute; + [ProtoMember(1)] + public long Id { get; set; } + [ProtoMember(2)] + public RoleFishingInfo State { get; set; } + } + /// + /// 玩家钓组变化 + /// + [ProtoContract] + public partial class Map2C_RoleGearChangeNotify : AMessage, ICustomRouteMessage, IProto + { + public static Map2C_RoleGearChangeNotify Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + Id = default; + Gears = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + public uint OpCode() { return OuterOpcode.Map2C_RoleGearChangeNotify; } + [ProtoIgnore] + public int RouteType => Fantasy.RouteType.MapRoute; + [ProtoMember(1)] + public long Id { get; set; } + [ProtoMember(2)] + public RoleGearInfo Gears { get; set; } + } + /// + /// 玩家位置变化 + /// + [ProtoContract] + public partial class Map2C_MoveNotify : AMessage, IProto + { + public static Map2C_MoveNotify Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + Id = default; + Location = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public long Id { get; set; } + [ProtoMember(2)] + public MapRolePositionInfo Location { get; set; } + } +} diff --git a/Entity/Generate/NetworkProtocol/OuterMessage.cs b/Entity/Generate/NetworkProtocol/OuterMessage.cs index 92d82e4..cb9c2d8 100644 --- a/Entity/Generate/NetworkProtocol/OuterMessage.cs +++ b/Entity/Generate/NetworkProtocol/OuterMessage.cs @@ -100,14 +100,14 @@ namespace Fantasy public override void Dispose() { ErrorCode = default; - GameAccountInfo = default; + RoleId = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.G2C_LoginResponse; } [ProtoMember(1)] - public GameAccountInfo GameAccountInfo { get; set; } + public long RoleId { get; set; } [ProtoMember(2)] public uint ErrorCode { get; set; } } @@ -129,29 +129,6 @@ namespace Fantasy } public uint OpCode() { return OuterOpcode.G2C_RepeatLogin; } } - /// - /// GameAccount实体类 - /// - [ProtoContract] - public partial class GameAccountInfo : AMessage, IProto - { - public static GameAccountInfo Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - CreateTime = default; - LoginTime = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoMember(1)] - public long CreateTime { get; set; } - [ProtoMember(2)] - public long LoginTime { get; set; } - } [ProtoContract] public partial class C2Game_GetRoleInfoRequest : AMessage, ICustomRouteRequest, IProto { @@ -181,15 +158,18 @@ namespace Fantasy public override void Dispose() { ErrorCode = default; - Roles = default; + RoleInfo = default; + RoomId = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.Game2C_GetRoleInfoResponse; } [ProtoMember(1)] - public RoleSimpleInfo Roles { get; set; } + public RoleInfo RoleInfo { get; set; } [ProtoMember(2)] + public long RoomId { get; set; } + [ProtoMember(3)] public uint ErrorCode { get; set; } } } diff --git a/Entity/Generate/NetworkProtocol/OuterOpcode.cs b/Entity/Generate/NetworkProtocol/OuterOpcode.cs index b720b6c..ebf427e 100644 --- a/Entity/Generate/NetworkProtocol/OuterOpcode.cs +++ b/Entity/Generate/NetworkProtocol/OuterOpcode.cs @@ -2,44 +2,53 @@ namespace Fantasy { public static partial class OuterOpcode { + public const uint Map2C_CreateMapResponse = 2415929105; + public const uint C2Map_EnterMapRequest = 2281711377; + public const uint Map2C_EnterMapResponse = 2415929106; + public const uint C2Map_Move = 2147493649; + public const uint Map2C_RoleEnterMapNotify = 2147493650; + public const uint Map2C_RoleExitMapNotify = 2147493651; + public const uint Map2C_RoleStateNotify = 2147493652; + public const uint Map2C_RoleGearStateNotify = 2147493653; + public const uint Map2C_RoleGearChangeNotify = 2147493654; public const uint C2A_LoginRequest = 268445457; public const uint A2C_LoginResponse = 402663185; public const uint C2G_LoginRequest = 268445458; public const uint G2C_LoginResponse = 402663186; public const uint G2C_RepeatLogin = 134227729; - public const uint C2Game_GetRoleInfoRequest = 2281711377; - public const uint Game2C_GetRoleInfoResponse = 2415929105; - public const uint C2S_GetConversationsRequest = 2281711378; - public const uint S2C_GetConversationsResponse = 2415929106; - public const uint C2S_SendMailRequest = 2281711379; - public const uint S2C_SendMailResponse = 2415929107; - public const uint C2S_DeleteMailRequest = 2281711380; - public const uint S2C_DeleteMailResponse = 2415929108; - public const uint S2C_HaveMail = 2147493649; - public const uint S2C_MailState = 2147493650; - public const uint C2S_CreateChannelRequest = 2281711381; - public const uint S2C_CreateChannelResponse = 2415929109; - public const uint C2S_JoinChannelRequest = 2281711382; - public const uint S2C_JoinChannelResponse = 2415929110; - public const uint C2S_SendMessageRequest = 2281711383; - public const uint S2C_SendMessageResponse = 2415929111; - public const uint S2C_Message = 2147493651; - public const uint C2S_CreateClubRequest = 2281711384; - public const uint S2C_CreateClubResponse = 2415929112; - public const uint C2S_GetClubInfoRequest = 2281711385; - public const uint S2C_GetClubInfoResponse = 2415929113; - public const uint C2S_GetMemberListRequest = 2281711386; - public const uint S2C_GetMemberListResponse = 2415929114; - public const uint C2S_GetClubListRequest = 2281711387; - public const uint S2C_GetClubListResponse = 2415929115; - public const uint C2S_JoinClubRequest = 2281711388; - public const uint S2C_JoinClubResponse = 2415929116; - public const uint C2S_LeaveClubRequest = 2281711389; - public const uint S2C_LeaveClubResponse = 2415929117; - public const uint C2S_DissolveClubRequest = 2281711390; - public const uint S2C_DissolveClubResponse = 2415929118; - public const uint C2S_DisposeJoinRequest = 2281711391; - public const uint S2C_DisposeJoinResponse = 2415929119; - public const uint S2C_ClubChange = 2147493652; + public const uint C2Game_GetRoleInfoRequest = 2281711378; + public const uint Game2C_GetRoleInfoResponse = 2415929107; + public const uint C2S_GetConversationsRequest = 2281711379; + public const uint S2C_GetConversationsResponse = 2415929108; + public const uint C2S_SendMailRequest = 2281711380; + public const uint S2C_SendMailResponse = 2415929109; + public const uint C2S_DeleteMailRequest = 2281711381; + public const uint S2C_DeleteMailResponse = 2415929110; + public const uint S2C_HaveMail = 2147493655; + public const uint S2C_MailState = 2147493656; + public const uint C2S_CreateChannelRequest = 2281711382; + public const uint S2C_CreateChannelResponse = 2415929111; + public const uint C2S_JoinChannelRequest = 2281711383; + public const uint S2C_JoinChannelResponse = 2415929112; + public const uint C2S_SendMessageRequest = 2281711384; + public const uint S2C_SendMessageResponse = 2415929113; + public const uint S2C_Message = 2147493657; + public const uint C2S_CreateClubRequest = 2281711385; + public const uint S2C_CreateClubResponse = 2415929114; + public const uint C2S_GetClubInfoRequest = 2281711386; + public const uint S2C_GetClubInfoResponse = 2415929115; + public const uint C2S_GetMemberListRequest = 2281711387; + public const uint S2C_GetMemberListResponse = 2415929116; + public const uint C2S_GetClubListRequest = 2281711388; + public const uint S2C_GetClubListResponse = 2415929117; + public const uint C2S_JoinClubRequest = 2281711389; + public const uint S2C_JoinClubResponse = 2415929118; + public const uint C2S_LeaveClubRequest = 2281711390; + public const uint S2C_LeaveClubResponse = 2415929119; + public const uint C2S_DissolveClubRequest = 2281711391; + public const uint S2C_DissolveClubResponse = 2415929120; + public const uint C2S_DisposeJoinRequest = 2281711392; + public const uint S2C_DisposeJoinResponse = 2415929121; + public const uint S2C_ClubChange = 2147493658; } } diff --git a/Entity/Generate/NetworkProtocol/RouteType.cs b/Entity/Generate/NetworkProtocol/RouteType.cs index ec20017..0bdac16 100644 --- a/Entity/Generate/NetworkProtocol/RouteType.cs +++ b/Entity/Generate/NetworkProtocol/RouteType.cs @@ -6,5 +6,6 @@ namespace Fantasy public const int GateRoute = 1001; // Gate public const int SocialRoute = 1002; // Social public const int GameRoute = 1003; // Game + public const int MapRoute = 1004; // Map } } diff --git a/Entity/Map/MapUnit.cs b/Entity/Map/MapUnit.cs index 06ed88d..faa74a1 100644 --- a/Entity/Map/MapUnit.cs +++ b/Entity/Map/MapUnit.cs @@ -1,4 +1,5 @@ using Fantasy.Entitas; +using Unity.Mathematics; namespace NB.Map; @@ -7,4 +8,13 @@ namespace NB.Map; /// public class MapUnit : Entity { + /// + /// 位置 + /// + public float3 Position; + + /// + /// 旋转 + /// + public float4 Rotation; } \ No newline at end of file diff --git a/Hotfix/Game/Player/Helper/PlayerHelper.cs b/Hotfix/Game/Player/Helper/PlayerHelper.cs index 923fb5f..150248a 100644 --- a/Hotfix/Game/Player/Helper/PlayerHelper.cs +++ b/Hotfix/Game/Player/Helper/PlayerHelper.cs @@ -142,25 +142,7 @@ public static class PlayerHelper #region 结构转换 - - /// - /// 获得GameAccountInfo - /// - /// - /// - public static GameAccountInfo GetGameAccountInfo(this Player self) - { - // 其实可以不用每次都NEW一个新的GameAccountInfo - // 可以在当前账号下创建一个GameAccountInfo,每次变动会提前通知这个GameAccountInfo - // 又或者每次调用该方法的时候,把值重新赋值一下。 - - return new GameAccountInfo() - { - // CreateTime = self.Statistics.CreateTime, - // LoginTime = self.Statistics.LoginTime - }; - } - + public static RoleSimpleInfo GetRoleSimpleInfo(this Player self) { return new RoleSimpleInfo()