Files
Fishing2/Assets/Scripts/Generate/NetworkProtocol/RoomMessage.cs
2025-09-24 20:52:00 +08:00

279 lines
7.7 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
{
/// <summary>
/// 用户进入地图
/// </summary>
[ProtoContract]
public partial class Map2C_RoleEnterRoomNotify : AMessage, ICustomRouteMessage, IProto
{
public static Map2C_RoleEnterRoomNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RoleEnterRoomNotify>();
}
public override void Dispose()
{
Info = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RoleEnterRoomNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_RoleEnterRoomNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public MapUnitInfo Info { get; set; }
}
/// <summary>
/// 用户离开地图
/// </summary>
[ProtoContract]
public partial class Map2C_RoleExitRoomNotify : AMessage, ICustomRouteMessage, IProto
{
public static Map2C_RoleExitRoomNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RoleExitRoomNotify>();
}
public override void Dispose()
{
Id = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RoleExitRoomNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_RoleExitRoomNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public long Id { get; set; }
}
[ProtoContract]
public partial class C2Map_RolePropertyChange : AMessage, ICustomRouteMessage, IProto
{
public static C2Map_RolePropertyChange Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Map_RolePropertyChange>();
}
public override void Dispose()
{
Propertys.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Map_RolePropertyChange>(this);
#endif
}
public uint OpCode() { return OuterOpcode.C2Map_RolePropertyChange; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
}
/// <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_RoleGearChangeNotify : AMessage, ICustomRouteMessage, IProto
{
public static Map2C_RoleGearChangeNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RoleGearChangeNotify>();
}
public override void Dispose()
{
Id = default;
Gears.Clear();
#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 List<GearInfo> Gears = new List<GearInfo>();
}
[ProtoContract]
public partial class Map2C_RolePropertyChangeNotify : AMessage, ICustomRouteMessage, IProto
{
public static Map2C_RolePropertyChangeNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_RolePropertyChangeNotify>();
}
public override void Dispose()
{
Id = default;
Propertys.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RolePropertyChangeNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_RolePropertyChangeNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
}
[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()
{
Position = default;
Rotation = default;
Direction = default;
IsStop = default;
IsRun = default;
Timestamp = 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 Vector3Info Position { get; set; }
[ProtoMember(2)]
public Vector3Info Rotation { get; set; }
[ProtoMember(3)]
public Vector3Info Direction { get; set; }
[ProtoMember(4)]
public bool IsStop { get; set; }
[ProtoMember(5)]
public bool IsRun { get; set; }
[ProtoMember(6)]
public long Timestamp { get; set; }
}
[ProtoContract]
public partial class C2Map_Look : AMessage, ICustomRouteMessage, IProto
{
public static C2Map_Look Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Map_Look>();
}
public override void Dispose()
{
Rotation = default;
Timestamp = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Map_Look>(this);
#endif
}
public uint OpCode() { return OuterOpcode.C2Map_Look; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public Vector3Info Rotation { get; set; }
[ProtoMember(2)]
public long Timestamp { get; set; }
}
/// <summary>
/// 玩家移动推送
/// </summary>
[ProtoContract]
public partial class Map2C_MoveNotify : AMessage, ICustomRouteMessage, IProto
{
public static Map2C_MoveNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_MoveNotify>();
}
public override void Dispose()
{
Id = default;
Position = default;
Rotation = default;
Direction = default;
IsStop = default;
Timestamp = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_MoveNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_MoveNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public Vector3Info Position { get; set; }
[ProtoMember(3)]
public Vector3Info Rotation { get; set; }
[ProtoMember(4)]
public Vector3Info Direction { get; set; }
[ProtoMember(5)]
public bool IsStop { get; set; }
[ProtoMember(6)]
public long Timestamp { get; set; }
}
/// <summary>
/// 玩家旋转推送
/// </summary>
[ProtoContract]
public partial class Map2C_LookeNotify : AMessage, ICustomRouteMessage, IProto
{
public static Map2C_LookeNotify Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2C_LookeNotify>();
}
public override void Dispose()
{
Id = default;
Rotation = default;
Timestamp = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_LookeNotify>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_LookeNotify; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public Vector3Info Rotation { get; set; }
[ProtoMember(3)]
public long Timestamp { get; set; }
}
}