协议定义

This commit is contained in:
2025-08-22 00:08:41 +08:00
parent ac6c79fc17
commit 8c3be0a5bb
8 changed files with 574 additions and 95 deletions

View File

@@ -100,14 +100,14 @@ namespace Fantasy
public override void Dispose()
{
ErrorCode = default;
GameAccountInfo = default;
RoleId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2C_LoginResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.G2C_LoginResponse; }
[ProtoMember(1)]
public GameAccountInfo GameAccountInfo { get; set; }
public long RoleId { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
@@ -129,29 +129,6 @@ namespace Fantasy
}
public uint OpCode() { return OuterOpcode.G2C_RepeatLogin; }
}
/// <summary>
/// GameAccount实体类
/// </summary>
[ProtoContract]
public partial class GameAccountInfo : AMessage, IProto
{
public static GameAccountInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<GameAccountInfo>();
}
public override void Dispose()
{
CreateTime = default;
LoginTime = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<GameAccountInfo>(this);
#endif
}
[ProtoMember(1)]
public long CreateTime { get; set; }
[ProtoMember(2)]
public long LoginTime { get; set; }
}
[ProtoContract]
public partial class C2Game_GetRoleInfoRequest : AMessage, ICustomRouteRequest, IProto
{
@@ -181,15 +158,18 @@ namespace Fantasy
public override void Dispose()
{
ErrorCode = default;
Roles = default;
RoleInfo = default;
RoomId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_GetRoleInfoResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_GetRoleInfoResponse; }
[ProtoMember(1)]
public RoleSimpleInfo Roles { get; set; }
public RoleInfo RoleInfo { get; set; }
[ProtoMember(2)]
public long RoomId { get; set; }
[ProtoMember(3)]
public uint ErrorCode { get; set; }
}
}