242 lines
6.9 KiB
C#
242 lines
6.9 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 G2Game_EnterRequest : AMessage, IRouteRequest, IProto
|
|
{
|
|
public static G2Game_EnterRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<G2Game_EnterRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
AccountId = default;
|
|
GateRouteId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<G2Game_EnterRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2G_EnterResponse ResponseType { get; set; }
|
|
public uint OpCode() { return InnerOpcode.G2Game_EnterRequest; }
|
|
[ProtoMember(1)]
|
|
public long AccountId { get; set; }
|
|
[ProtoMember(2)]
|
|
public long GateRouteId { get; set; }
|
|
}
|
|
[ProtoContract]
|
|
public partial class Game2G_EnterResponse : AMessage, IRouteResponse, IProto
|
|
{
|
|
public static Game2G_EnterResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2G_EnterResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
RoleRouteId = default;
|
|
RoleInfo = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2G_EnterResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return InnerOpcode.Game2G_EnterResponse; }
|
|
[ProtoMember(1)]
|
|
public long RoleRouteId { get; set; }
|
|
[ProtoMember(2)]
|
|
public RoleSimpleInfo RoleInfo { get; set; }
|
|
[ProtoMember(3)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
[ProtoContract]
|
|
public partial class G2Game_ExitRequest : AMessage, IRouteRequest, IProto
|
|
{
|
|
public static G2Game_ExitRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<G2Game_ExitRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
AccountId = default;
|
|
GateRouteId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<G2Game_ExitRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2G_ExitResponse ResponseType { get; set; }
|
|
public uint OpCode() { return InnerOpcode.G2Game_ExitRequest; }
|
|
[ProtoMember(1)]
|
|
public long AccountId { get; set; }
|
|
[ProtoMember(2)]
|
|
public long GateRouteId { get; set; }
|
|
}
|
|
[ProtoContract]
|
|
public partial class Game2G_ExitResponse : AMessage, IRouteResponse, IProto
|
|
{
|
|
public static Game2G_ExitResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2G_ExitResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2G_ExitResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return InnerOpcode.Game2G_ExitResponse; }
|
|
[ProtoMember(1)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 通知游戏服角色进入该聊天服
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class G2S_EnterRequest : AMessage, IRouteRequest, IProto
|
|
{
|
|
public static G2S_EnterRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<G2S_EnterRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Role = default;
|
|
GateRouteId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<G2S_EnterRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public S2G_EnterResponse ResponseType { get; set; }
|
|
public uint OpCode() { return InnerOpcode.G2S_EnterRequest; }
|
|
[ProtoMember(1)]
|
|
public RoleSimpleInfo Role { get; set; }
|
|
[ProtoMember(2)]
|
|
public long GateRouteId { get; set; }
|
|
}
|
|
[ProtoContract]
|
|
public partial class S2G_EnterResponse : AMessage, IRouteResponse, IProto
|
|
{
|
|
public static S2G_EnterResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<S2G_EnterResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
RoleRouteId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<S2G_EnterResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return InnerOpcode.S2G_EnterResponse; }
|
|
[ProtoMember(1)]
|
|
public long RoleRouteId { get; set; }
|
|
[ProtoMember(2)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
[ProtoContract]
|
|
public partial class G2S_ExitRequest : AMessage, IRouteRequest, IProto
|
|
{
|
|
public static G2S_ExitRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<G2S_ExitRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
AccountId = default;
|
|
GateRouteId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<G2S_ExitRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public S2G_ExitResponse ResponseType { get; set; }
|
|
public uint OpCode() { return InnerOpcode.G2S_ExitRequest; }
|
|
[ProtoMember(1)]
|
|
public long AccountId { get; set; }
|
|
[ProtoMember(2)]
|
|
public long GateRouteId { get; set; }
|
|
}
|
|
[ProtoContract]
|
|
public partial class S2G_ExitResponse : AMessage, IRouteResponse, IProto
|
|
{
|
|
public static S2G_ExitResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<S2G_ExitResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<S2G_ExitResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return InnerOpcode.S2G_ExitResponse; }
|
|
[ProtoMember(1)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
[ProtoContract]
|
|
public partial class S2G_ChatMessage : AMessage, IRouteMessage, IProto
|
|
{
|
|
public static S2G_ChatMessage Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<S2G_ChatMessage>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Message = default;
|
|
IdList.Clear();
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<S2G_ChatMessage>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return InnerOpcode.S2G_ChatMessage; }
|
|
[ProtoMember(1)]
|
|
public ChatMessageInfo Message { get; set; }
|
|
[ProtoMember(2)]
|
|
public List<long> IdList = new List<long>();
|
|
}
|
|
/// <summary>
|
|
/// 创建聊天频道
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Club2Chat_CreateChannel : AMessage, IRouteMessage, IProto
|
|
{
|
|
public static Club2Chat_CreateChannel Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Club2Chat_CreateChannel>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ChannelId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Club2Chat_CreateChannel>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return InnerOpcode.Club2Chat_CreateChannel; }
|
|
[ProtoMember(1)]
|
|
public long ChannelId { get; set; }
|
|
}
|
|
}
|