新增角色相关信息
This commit is contained in:
@@ -15,7 +15,7 @@ using Fantasy.Serialize;
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace NBC
|
||||
namespace Fantasy
|
||||
{
|
||||
[ProtoContract]
|
||||
public partial class C2A_LoginRequest : AMessage, IRequest, IProto
|
||||
@@ -149,45 +149,47 @@ namespace NBC
|
||||
[ProtoMember(2)]
|
||||
public long LoginTime { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 拿到当前账号的信息
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2G_GetAccountInfoRequest : AMessage, IRequest, IProto
|
||||
public partial class C2Game_GetRoleInfoRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2G_GetAccountInfoRequest Create(Scene scene)
|
||||
public static C2Game_GetRoleInfoRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2G_GetAccountInfoRequest>();
|
||||
return scene.MessagePoolComponent.Rent<C2Game_GetRoleInfoRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2G_GetAccountInfoRequest>(this);
|
||||
GetScene().MessagePoolComponent.Return<C2Game_GetRoleInfoRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public G2C_GetAccountInfoResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2G_GetAccountInfoRequest; }
|
||||
public Game2C_GetRoleInfoResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Game_GetRoleInfoRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2C_GetAccountInfoResponse : AMessage, IResponse, IProto
|
||||
public partial class Game2C_GetRoleInfoResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static G2C_GetAccountInfoResponse Create(Scene scene)
|
||||
public static Game2C_GetRoleInfoResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_GetAccountInfoResponse>();
|
||||
return scene.MessagePoolComponent.Rent<Game2C_GetRoleInfoResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
GameAccountInfo = default;
|
||||
Name = default;
|
||||
RoleId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_GetAccountInfoResponse>(this);
|
||||
GetScene().MessagePoolComponent.Return<Game2C_GetRoleInfoResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_GetAccountInfoResponse; }
|
||||
public uint OpCode() { return OuterOpcode.Game2C_GetRoleInfoResponse; }
|
||||
[ProtoMember(1)]
|
||||
public GameAccountInfo GameAccountInfo { get; set; }
|
||||
public string Name { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public string RoleId { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user