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_CreateRoomRequest : AMessage, ICustomRouteRequest, IProto
{
public static C2Map_CreateRoomRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent();
}
public override void Dispose()
{
MapId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return(this);
#endif
}
[ProtoIgnore]
public Map2C_CreateRoomResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Map_CreateRoomRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public int MapId { get; set; }
}
///
/// 请求创建房间成功
///
[ProtoContract]
public partial class Map2C_CreateRoomResponse : AMessage, ICustomRouteResponse, IProto
{
public static Map2C_CreateRoomResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent();
}
public override void Dispose()
{
ErrorCode = default;
RoomCode = default;
Units.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_CreateRoomResponse; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
public List Units = new List();
[ProtoMember(3)]
public uint ErrorCode { get; set; }
}
///
/// 请求网关进入房间
///
[ProtoContract]
public partial class C2G_EnterRoomRequest : AMessage, IRequest, IProto
{
public static C2G_EnterRoomRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent();
}
public override void Dispose()
{
RoomCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return(this);
#endif
}
[ProtoIgnore]
public G2C_EnterRoomResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2G_EnterRoomRequest; }
[ProtoMember(1)]
public string RoomCode { get; set; }
}
///
/// 请求网关进入房间响应
///
[ProtoContract]
public partial class G2C_EnterRoomResponse : AMessage, IResponse, IProto
{
public static G2C_EnterRoomResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent();
}
public override void Dispose()
{
ErrorCode = default;
RoomCode = default;
Units.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return(this);
#endif
}
public uint OpCode() { return OuterOpcode.G2C_EnterRoomResponse; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
public List Units = new List();
[ProtoMember(3)]
public uint ErrorCode { get; set; }
}
///
/// 请求网关离开房间
///
[ProtoContract]
public partial class C2G_ExitRoomRequest : AMessage, IRequest, IProto
{
public static C2G_ExitRoomRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent();
}
public override void Dispose()
{
RoomCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return(this);
#endif
}
[ProtoIgnore]
public G2C_ExitRoomResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2G_ExitRoomRequest; }
[ProtoMember(1)]
public string RoomCode { get; set; }
}
///
/// 请求网关进入离开响应
///
[ProtoContract]
public partial class G2C_ExitRoomResponse : AMessage, IResponse, IProto
{
public static G2C_ExitRoomResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent();
}
public override void Dispose()
{
ErrorCode = default;
RoomCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return(this);
#endif
}
public uint OpCode() { return OuterOpcode.G2C_ExitRoomResponse; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
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();
}
public override void Dispose()
{
MapId = default;
RoomId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return(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();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_EnterMapResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
///
/// 通知客户端切换地图
///
[ProtoContract]
public partial class Map2C_ChangeMap : AMessage, ICustomRouteMessage, IProto
{
public static Map2C_ChangeMap Create(Scene scene)
{
return scene.MessagePoolComponent.Rent();
}
public override void Dispose()
{
MapId = default;
Node = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return(this);
#endif
}
public uint OpCode() { return OuterOpcode.Map2C_ChangeMap; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public int MapId { get; set; }
[ProtoMember(2)]
public int Node { get; set; }
}
}