using ProtoBuf; using System.Collections.Generic; using Fantasy; using NBC; using NBC.Network.Interface; using NBC.Serialize; #pragma warning disable CS8618 namespace NBC { [ProtoContract] public partial class C2Map_EnterRoomRequest : AMessage, ICustomRouteRequest, IProto { public static C2Map_EnterRoomRequest Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { MapId = default; Password = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } [ProtoIgnore] public Map2C_EnterRoomResponse ResponseType { get; set; } public uint OpCode() { return OuterOpcode.C2Map_EnterRoomRequest; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.MapRoute; [ProtoMember(1)] public int MapId { get; set; } [ProtoMember(2)] public string Password { get; set; } } [ProtoContract] public partial class Map2C_EnterRoomResponse : AMessage, ICustomRouteResponse, IProto { public static Map2C_EnterRoomResponse Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { ErrorCode = default; MapId = default; RoomId = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.Map2C_EnterRoomResponse; } [ProtoMember(1)] public int MapId { get; set; } [ProtoMember(2)] public long RoomId { get; set; } [ProtoMember(3)] 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 MapUnitPositionInfo 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 MapUnitInfo 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 UnitStateInfo 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 UnitFishingInfo 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 GearInfo 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 MapUnitPositionInfo Location { get; set; } } }