diff --git a/Entity/Game/Player/Child/PlayerInfo.cs b/Entity/Game/Player/Child/PlayerInfo.cs new file mode 100644 index 0000000..11ccf92 --- /dev/null +++ b/Entity/Game/Player/Child/PlayerInfo.cs @@ -0,0 +1,16 @@ +using Fantasy.Entitas; + +namespace NB; + +public class PlayerInfo : Entity +{ + /// + /// 昵称 + /// + public string NickName; + + /// + /// 头像 + /// + public string Head; +} \ No newline at end of file diff --git a/Entity/Game/Player/Player.cs b/Entity/Game/Player/Player.cs index 5892717..529681c 100644 --- a/Entity/Game/Player/Player.cs +++ b/Entity/Game/Player/Player.cs @@ -15,6 +15,8 @@ public sealed class Player : Entity [BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)] public Dictionary Currency = new(); + + [BsonIgnore] public long SessionRunTimeId; diff --git a/Hotfix/Game/Handler/G2Game_EnterRequestHandler.cs b/Hotfix/Game/Handler/G2Game_EnterRequestHandler.cs index 5643ea3..e4d4032 100644 --- a/Hotfix/Game/Handler/G2Game_EnterRequestHandler.cs +++ b/Hotfix/Game/Handler/G2Game_EnterRequestHandler.cs @@ -32,6 +32,9 @@ public class G2Game_EnterRequestHandler : RouteRPC(scene, aId, false, false); gameAccount.LoginTime = gameAccount.CreateTime = TimeHelper.Now; + var info = gameAccount.AddComponent(); + if (isSaveDataBase) { await gameAccount.SaveDataBase();