Skip to content

Commit

Permalink
Fix generating new profile every time account starts game
Browse files Browse the repository at this point in the history
  • Loading branch information
nexus4880 committed Sep 7, 2024
1 parent 12c67fe commit a61863d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Fuyu.Backend.Core/Services/AccountService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a61863d

Please sign in to comment.