增加相关协议
This commit is contained in:
@@ -192,4 +192,96 @@ namespace Fantasy
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求邮件列表
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Game_GetMailsRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Game_GetMailsRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Game_GetMailsRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Game_GetMailsRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Game2C_GetMailsResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Game_GetMailsRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取邮件列表响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_GetMailsResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Game2C_GetMailsResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_GetMailsResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Mail.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_GetMailsResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_GetMailsResponse; }
|
||||
[ProtoMember(1)]
|
||||
public List<MailInfo> Mail = new List<MailInfo>();
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 新邮件推送
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_HaveMail : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static Game2C_HaveMail Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_HaveMail>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Mail = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_HaveMail>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_HaveMail; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public MailInfo Mail { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class Game2C_MailState : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static Game2C_MailState Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_MailState>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
MailState = default;
|
||||
MailId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_MailState>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_MailState; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public int MailState { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public long MailId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user