495 lines
13 KiB
C#
495 lines
13 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 UnitGearItemInfo : AMessage, IProto
|
|
{
|
|
public static UnitGearItemInfo Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<UnitGearItemInfo>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Id = default;
|
|
ConfigId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<UnitGearItemInfo>(this);
|
|
#endif
|
|
}
|
|
[ProtoMember(1)]
|
|
public long Id { get; set; }
|
|
[ProtoMember(2)]
|
|
public int ConfigId { get; set; }
|
|
}
|
|
[ProtoContract]
|
|
public partial class UnitGearInfo : AMessage, IProto
|
|
{
|
|
public static UnitGearInfo Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<UnitGearInfo>();
|
|
}
|
|
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<UnitGearInfo>(this);
|
|
#endif
|
|
}
|
|
[ProtoMember(1)]
|
|
public UnitGearItemInfo Rod { get; set; }
|
|
[ProtoMember(2)]
|
|
public UnitGearItemInfo Reel { get; set; }
|
|
[ProtoMember(3)]
|
|
public UnitGearItemInfo Bobber { get; set; }
|
|
[ProtoMember(4)]
|
|
public UnitGearItemInfo Hook { get; set; }
|
|
[ProtoMember(5)]
|
|
public UnitGearItemInfo Bait { get; set; }
|
|
[ProtoMember(6)]
|
|
public UnitGearItemInfo Lure { get; set; }
|
|
[ProtoMember(7)]
|
|
public UnitGearItemInfo Weight { get; set; }
|
|
[ProtoMember(8)]
|
|
public UnitGearItemInfo Line { get; set; }
|
|
[ProtoMember(9)]
|
|
public UnitGearItemInfo Leader { get; set; }
|
|
[ProtoMember(10)]
|
|
public UnitGearItemInfo Feeder { get; set; }
|
|
}
|
|
[ProtoContract]
|
|
public partial class Vector3Info : AMessage, IProto
|
|
{
|
|
public static Vector3Info Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Vector3Info>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
x = default;
|
|
y = default;
|
|
z = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Vector3Info>(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<QuaternionInfo>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
x = default;
|
|
y = default;
|
|
z = default;
|
|
w = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<QuaternionInfo>(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 UnitFishingInfo : AMessage, IProto
|
|
{
|
|
public static UnitFishingInfo Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<UnitFishingInfo>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
LineLength = default;
|
|
ReelSpeed = default;
|
|
OpenLight = default;
|
|
RodSetting = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<UnitFishingInfo>(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 UnitStateInfo : AMessage, IProto
|
|
{
|
|
public static UnitStateInfo Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<UnitStateInfo>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
State = default;
|
|
Args.Clear();
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<UnitStateInfo>(this);
|
|
#endif
|
|
}
|
|
[ProtoMember(1)]
|
|
public int State { get; set; }
|
|
[ProtoMember(2)]
|
|
public List<string> Args = new List<string>();
|
|
}
|
|
[ProtoContract]
|
|
public partial class MapUnitInfo : AMessage, IProto
|
|
{
|
|
public static MapUnitInfo Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<MapUnitInfo>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Id = default;
|
|
RoleInfo = default;
|
|
Location = default;
|
|
State = default;
|
|
Gears = default;
|
|
FishingInfo = default;
|
|
KV.Clear();
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<MapUnitInfo>(this);
|
|
#endif
|
|
}
|
|
[ProtoMember(1)]
|
|
public long Id { get; set; }
|
|
[ProtoMember(2)]
|
|
public RoleSimpleInfo RoleInfo { get; set; }
|
|
[ProtoMember(3)]
|
|
public MapUnitPositionInfo Location { get; set; }
|
|
[ProtoMember(4)]
|
|
public UnitStateInfo State { get; set; }
|
|
[ProtoMember(5)]
|
|
public UnitGearInfo Gears { get; set; }
|
|
[ProtoMember(6)]
|
|
public UnitFishingInfo FishingInfo { get; set; }
|
|
[ProtoMember(7)]
|
|
public List<KeyValueInt32> KV = new List<KeyValueInt32>();
|
|
}
|
|
[ProtoContract]
|
|
public partial class MapUnitPositionInfo : AMessage, IProto
|
|
{
|
|
public static MapUnitPositionInfo Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<MapUnitPositionInfo>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Position = default;
|
|
Rotation = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<MapUnitPositionInfo>(this);
|
|
#endif
|
|
}
|
|
[ProtoMember(1)]
|
|
public Vector3Info Position { get; set; }
|
|
[ProtoMember(2)]
|
|
public QuaternionInfo Rotation { get; set; }
|
|
}
|
|
[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_EnterMapRequest : AMessage, ICustomRouteRequest, IProto
|
|
{
|
|
public static C2Map_EnterMapRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Map_EnterMapRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
MapId = default;
|
|
RoomId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Map_EnterMapRequest>(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<Map2C_EnterMapResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
Roles.Clear();
|
|
MapId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Map2C_EnterMapResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Map2C_EnterMapResponse; }
|
|
[ProtoMember(1)]
|
|
public List<MapUnitInfo> Roles = new List<MapUnitInfo>();
|
|
[ProtoMember(2)]
|
|
public long MapId { 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 UnitGearInfo 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; }
|
|
}
|
|
}
|