新增角色相关信息
This commit is contained in:
75
Entity/Generate/NetworkProtocol/OuterCommon.cs
Normal file
75
Entity/Generate/NetworkProtocol/OuterCommon.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
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>
|
||||
/// 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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user