提交进入地图和创建房间相关逻辑和协议
This commit is contained in:
@@ -253,4 +253,75 @@ namespace Fantasy
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求离开房间
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class G2Map_ExitRoomRequest : AMessage, IRouteRequest, IProto
|
||||
{
|
||||
public static G2Map_ExitRoomRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2Map_ExitRoomRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
RoomCode = default;
|
||||
AccountId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2Map_ExitRoomRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Map2G_ExiRoomResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return InnerOpcode.G2Map_ExitRoomRequest; }
|
||||
[ProtoMember(1)]
|
||||
public string RoomCode { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public long AccountId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求离开房间响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Map2G_ExiRoomResponse : AMessage, IRouteResponse, IProto
|
||||
{
|
||||
public static Map2G_ExiRoomResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Map2G_ExiRoomResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2G_ExiRoomResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.Map2G_ExiRoomResponse; }
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 通知网关切换地图
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Map2G_ChangeMapMessage : AMessage, IRouteMessage, IProto
|
||||
{
|
||||
public static Map2G_ChangeMapMessage Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Map2G_ChangeMapMessage>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
MapId = default;
|
||||
Node = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2G_ChangeMapMessage>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.Map2G_ChangeMapMessage; }
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int Node { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user