提交进入地图和创建房间相关逻辑和协议
This commit is contained in:
@@ -119,6 +119,53 @@ namespace Fantasy
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求网关离开房间
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2G_ExitRoomRequest : AMessage, IRequest, IProto
|
||||
{
|
||||
public static C2G_ExitRoomRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2G_ExitRoomRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
RoomCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2G_ExitRoomRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public G2C_ExitRoomResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2G_ExitRoomRequest; }
|
||||
[ProtoMember(1)]
|
||||
public string RoomCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求网关进入离开响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class G2C_ExitRoomResponse : AMessage, IResponse, IProto
|
||||
{
|
||||
public static G2C_ExitRoomResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_ExitRoomResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
RoomCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_ExitRoomResponse>(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
|
||||
{
|
||||
@@ -154,15 +201,12 @@ namespace Fantasy
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
MapId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_EnterMapResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_EnterMapResponse; }
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user