From a61863d6ad632ace64f2ae25a2ba4457cfcbbfe2 Mon Sep 17 00:00:00 2001 From: nexus4880 <38168516+nexus4880@users.noreply.github.com> Date: Sat, 7 Sep 2024 09:42:33 -0700 Subject: [PATCH] Fix generating new profile every time account starts game --- Fuyu.Backend.Core/Services/AccountService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Fuyu.Backend.Core/Services/AccountService.cs b/Fuyu.Backend.Core/Services/AccountService.cs index b22efd7..a8e3d30 100644 --- a/Fuyu.Backend.Core/Services/AccountService.cs +++ b/Fuyu.Backend.Core/Services/AccountService.cs @@ -138,6 +138,12 @@ public static ERegisterStatus RegisterGame(string sessionId, string game, string { var account = CoreOrm.GetAccount(sessionId); + // TODO: refactor the account to only have one aid per game + if (account.Games.TryGetValue(game, out var aids) && aids.Count > 0) + { + return ERegisterStatus.AlreadyExists; + } + string address; switch (game)