20 lines
463 B
C#

using Fantasy;
using Fantasy.Async;
namespace Hotfix.Helper;
public static class GameAccountHelper
{
public static async FTask<GameAccount> LoadGameAccountFromDatabase(Scene scene,long accountId)
{
var gameCount = await scene.World.DataBase.First<GameAccount>(x=> x.Id == accountId);
if (gameCount == null) return null;
gameCount.Deserialize(scene);
return gameCount;
}
}