新增结构体
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Fantasy.Entitas;
|
||||
using Fantasy.Helper;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Options;
|
||||
|
||||
@@ -33,11 +34,7 @@ public sealed class Player : Entity
|
||||
/// 当前经验
|
||||
/// </summary>
|
||||
[BsonElement("exp")] public int Exp;
|
||||
|
||||
/// <summary>
|
||||
/// 是否是vip
|
||||
/// </summary>
|
||||
[BsonElement("vip")] public bool IsVip;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 星数
|
||||
@@ -49,6 +46,41 @@ public sealed class Player : Entity
|
||||
/// </summary>
|
||||
[BsonElement("high")] public int Highlight;
|
||||
|
||||
/// <summary>
|
||||
/// 角色vip信息
|
||||
/// </summary>
|
||||
[BsonElement("vInfo")] public PlayerVip? Vip;
|
||||
|
||||
/// <summary>
|
||||
/// 钱包
|
||||
/// </summary>
|
||||
[BsonElement("wallet")] public PlayerWallet? Wallet;
|
||||
|
||||
/// <summary>
|
||||
/// 背包
|
||||
/// </summary>
|
||||
[BsonElement("bag")] public ItemContainer? ItemContainer;
|
||||
|
||||
/// <summary>
|
||||
/// 鱼护
|
||||
/// </summary>
|
||||
[BsonElement("fish")] public FishContainer? FishContainer;
|
||||
|
||||
/// <summary>
|
||||
/// 技能
|
||||
/// </summary>
|
||||
[BsonElement("skill")] public SkillContainer? SkillContainer;
|
||||
|
||||
/// <summary>
|
||||
/// 成就
|
||||
/// </summary>
|
||||
[BsonElement("achievement")] public AchievementContainer? AchievementContainer;
|
||||
|
||||
/// <summary>
|
||||
/// 是否是vip
|
||||
/// </summary>
|
||||
[BsonIgnore]
|
||||
public bool IsVip => Vip != null && Vip.ExpirationTime > TimeHelper.Now;
|
||||
|
||||
[BsonIgnore] public long SessionRunTimeId;
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
using Fantasy.Entitas;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace NB.Game;
|
||||
|
||||
/// <summary>
|
||||
/// 用户核心信息
|
||||
/// </summary>
|
||||
public class PlayerPrivate : Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 角色vip信息
|
||||
/// </summary>
|
||||
[BsonElement("vInfo")] public PlayerVip Vip;
|
||||
|
||||
/// <summary>
|
||||
/// 钱包
|
||||
/// </summary>
|
||||
[BsonElement("wallet")] public PlayerWallet Wallet;
|
||||
|
||||
/// <summary>
|
||||
/// 背包
|
||||
/// </summary>
|
||||
[BsonElement("bag")] public ItemContainer ItemContainer;
|
||||
|
||||
/// <summary>
|
||||
/// 鱼护
|
||||
/// </summary>
|
||||
[BsonElement("fish")] public FishContainer FishContainer;
|
||||
|
||||
/// <summary>
|
||||
/// 技能
|
||||
/// </summary>
|
||||
[BsonElement("skill")] public SkillContainer SkillContainer;
|
||||
|
||||
/// <summary>
|
||||
/// 成就
|
||||
/// </summary>
|
||||
[BsonElement("achievement")] public AchievementContainer AchievementContainer;
|
||||
}
|
||||
Reference in New Issue
Block a user