186 lines
5.3 KiB
C#
186 lines
5.3 KiB
C#
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
|
|
{
|
|
/// <summary>
|
|
/// 请求创建房间
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class C2Game_CreateRoomRequest : AMessage, ICustomRouteRequest, IProto
|
|
{
|
|
public static C2Game_CreateRoomRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Game_CreateRoomRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
MapId = default;
|
|
Password = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Game_CreateRoomRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2C_CreateRoomResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Game_CreateRoomRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.MapRoute;
|
|
[ProtoMember(1)]
|
|
public int MapId { get; set; }
|
|
[ProtoMember(2)]
|
|
public string Password { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 请求创建房间成功
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_CreateRoomResponse : AMessage, ICustomRouteResponse, IProto
|
|
{
|
|
public static Game2C_CreateRoomResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_CreateRoomResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
MapId = default;
|
|
RoomId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_CreateRoomResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_CreateRoomResponse; }
|
|
[ProtoMember(1)]
|
|
public int MapId { get; set; }
|
|
[ProtoMember(2)]
|
|
public long RoomId { get; set; }
|
|
[ProtoMember(3)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 请求进入地图
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class C2Game_EnterMapRequest : AMessage, ICustomRouteRequest, IProto
|
|
{
|
|
public static C2Game_EnterMapRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Game_EnterMapRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
MapId = default;
|
|
Type = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Game_EnterMapRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2C_EnterMapResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Game_EnterMapRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.MapRoute;
|
|
[ProtoMember(1)]
|
|
public int MapId { get; set; }
|
|
[ProtoMember(2)]
|
|
public int Type { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 请求进入地图响应
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_EnterMapResponse : AMessage, ICustomRouteResponse, IProto
|
|
{
|
|
public static Game2C_EnterMapResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_EnterMapResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
MapId = default;
|
|
Pos = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_EnterMapResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_EnterMapResponse; }
|
|
[ProtoMember(1)]
|
|
public int MapId { get; set; }
|
|
[ProtoMember(2)]
|
|
public int Pos { get; set; }
|
|
[ProtoMember(3)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 请求进入房间
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class C2Game_EnterRoomRequest : AMessage, ICustomRouteRequest, IProto
|
|
{
|
|
public static C2Game_EnterRoomRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Game_EnterRoomRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
MapId = default;
|
|
Password = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Game_EnterRoomRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2C_EnterRoomResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Game_EnterRoomRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.MapRoute;
|
|
[ProtoMember(1)]
|
|
public int MapId { get; set; }
|
|
[ProtoMember(2)]
|
|
public string Password { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 请求进入房间响应
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_EnterRoomResponse : AMessage, ICustomRouteResponse, IProto
|
|
{
|
|
public static Game2C_EnterRoomResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_EnterRoomResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
MapId = default;
|
|
RoomId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_EnterRoomResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_EnterRoomResponse; }
|
|
[ProtoMember(1)]
|
|
public int MapId { get; set; }
|
|
[ProtoMember(2)]
|
|
public long RoomId { get; set; }
|
|
[ProtoMember(3)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
}
|