68 lines
1.4 KiB
C#
68 lines
1.4 KiB
C#
using ProtoBuf;
|
|
|
|
using System.Collections.Generic;
|
|
using Fantasy;
|
|
using NBC;
|
|
using NBC.Network.Interface;
|
|
using NBC.Serialize;
|
|
#pragma warning disable CS8618
|
|
|
|
namespace NBC
|
|
{
|
|
/// <summary>
|
|
/// GameAccount实体类
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class RoleBaseInfo : AMessage, IProto
|
|
{
|
|
public static RoleBaseInfo Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<RoleBaseInfo>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
NickName = default;
|
|
Head = default;
|
|
Country = default;
|
|
Level = default;
|
|
Exp = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<RoleBaseInfo>(this);
|
|
#endif
|
|
}
|
|
[ProtoMember(1)]
|
|
public string NickName { get; set; }
|
|
[ProtoMember(2)]
|
|
public string Head { get; set; }
|
|
[ProtoMember(3)]
|
|
public string Country { get; set; }
|
|
[ProtoMember(4)]
|
|
public int Level { get; set; }
|
|
[ProtoMember(5)]
|
|
public int Exp { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 角色信息
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class RoleInfo : AMessage, IProto
|
|
{
|
|
public static RoleInfo Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<RoleInfo>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
BaseInfo = default;
|
|
RoleId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<RoleInfo>(this);
|
|
#endif
|
|
}
|
|
[ProtoMember(1)]
|
|
public RoleBaseInfo BaseInfo { get; set; }
|
|
[ProtoMember(2)]
|
|
public long RoleId { get; set; }
|
|
}
|
|
}
|