Files
Fishing2/Assets/Scripts/Generate/NetworkProtocol/RoomMessage.cs
2025-09-01 23:57:00 +08:00

232 lines
6.3 KiB
C#

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<C2Map_EnterRoomRequest>();
}
public override void Dispose()
{
MapId = default;
Password = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Map_EnterRoomRequest>(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<Map2C_EnterRoomResponse>();
}
public override void Dispose()
{
ErrorCode = default;
MapId = default;
RoomId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_EnterRoomResponse>(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<C2Map_Move>();
}
public override void Dispose()
{
Location = default;
IsStop = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Map_Move>(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; }
}
/// <summary>
/// 用户进入地图
/// </summary>
[ProtoContract]
public partial class Map2C_RoleEnterMapNotify : AMessage, ICustomRouteMessage, IProto
{
public static Map2C_RoleEnterMapNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RoleEnterMapNotify>();
}
public override void Dispose()
{
Info = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RoleEnterMapNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_RoleEnterMapNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public MapUnitInfo Info { get; set; }
}
/// <summary>
/// 用户离开地图
/// </summary>
[ProtoContract]
public partial class Map2C_RoleExitMapNotify : AMessage, ICustomRouteMessage, IProto
{
public static Map2C_RoleExitMapNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RoleExitMapNotify>();
}
public override void Dispose()
{
Id = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RoleExitMapNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_RoleExitMapNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public long Id { get; set; }
}
/// <summary>
/// 玩家状态变化同步
/// </summary>
[ProtoContract]
public partial class Map2C_RoleStateNotify : AMessage, ICustomRouteMessage, IProto
{
public static Map2C_RoleStateNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RoleStateNotify>();
}
public override void Dispose()
{
Id = default;
State = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RoleStateNotify>(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; }
}
/// <summary>
/// 玩家钓组状态变化
/// </summary>
[ProtoContract]
public partial class Map2C_RoleGearStateNotify : AMessage, ICustomRouteMessage, IProto
{
public static Map2C_RoleGearStateNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RoleGearStateNotify>();
}
public override void Dispose()
{
Id = default;
State = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RoleGearStateNotify>(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; }
}
/// <summary>
/// 玩家钓组变化
/// </summary>
[ProtoContract]
public partial class Map2C_RoleGearChangeNotify : AMessage, ICustomRouteMessage, IProto
{
public static Map2C_RoleGearChangeNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RoleGearChangeNotify>();
}
public override void Dispose()
{
Id = default;
Gears = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RoleGearChangeNotify>(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; }
}
/// <summary>
/// 玩家位置变化
/// </summary>
[ProtoContract]
public partial class Map2C_MoveNotify : AMessage, IProto
{
public static Map2C_MoveNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_MoveNotify>();
}
public override void Dispose()
{
Id = default;
Location = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_MoveNotify>(this);
#endif
}
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public MapUnitPositionInfo Location { get; set; }
}
}