新增角色相关信息

This commit is contained in:
2025-07-28 23:45:46 +08:00
parent be33e12b35
commit 09bbae66d2
68 changed files with 452 additions and 662 deletions

View File

@@ -1,13 +0,0 @@
using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes;
namespace NB.Gate;
public sealed class Player : Entity
{
public long CreateTime;
public long LoginTime;
[BsonIgnore]
public long SessionRunTimeId;
}

View File

@@ -1,15 +0,0 @@
using Fantasy.Entitas;
namespace NB.Gate;
public sealed class PlayerFlagComponent : Entity
{
public bool Kick { get; set; }
public long AccountID;
// 有一种可能当在Account在其他地方被销毁
// 这时候因为这个Account是会回收到池子中所以这个引用还是有效的
// 那这时候就会出现这个引用的Account可能是其他用户的了。
public EntityReference<Player> Player;
}

View File

@@ -1,8 +0,0 @@
using Fantasy.Entitas;
namespace NB.Gate;
public sealed class PlayerManageComponent : Entity
{
public readonly Dictionary<long, Player> Players = new();
}

View File

@@ -0,0 +1,10 @@
using Fantasy.Entitas;
namespace NB.Gate;
public sealed class SessionPlayerComponent : Entity
{
public bool Kick { get; set; }
public long AccountID;
}