Skip to content

Commit

Permalink
КАП
Browse files Browse the repository at this point in the history
  • Loading branch information
iEvangel committed Jan 21, 2023
1 parent d176f69 commit 30fa90b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/DiIiS-NA/BGS-Server/AccountsSystem/AccountManager.cs
Expand Up @@ -177,8 +177,13 @@ public static Account GetAccountByPersistentID(ulong persistentId)

public static Account GetAccountByDBAccount(DBAccount dbAccount)
{
if (dbAccount == null)
return null;
if (LoadedAccounts.ContainsKey(dbAccount.Id))
{
LoadedAccounts[dbAccount.Id].DBAccount = dbAccount;
return LoadedAccounts[dbAccount.Id];
}
else
{
var account = new Account(dbAccount);
Expand Down
5 changes: 5 additions & 0 deletions src/DiIiS-NA/BGS-Server/AccountsSystem/GameAccountManager.cs
Expand Up @@ -40,8 +40,13 @@ public static void PreLoadGameAccounts()

public static GameAccount GetGameAccountByDBGameAccount(DBGameAccount dbGameAccount)
{
if (dbGameAccount == null)
return null;
if (LoadedGameAccounts.ContainsKey(dbGameAccount.Id))
{
LoadedGameAccounts[dbGameAccount.Id].DBGameAccount = dbGameAccount;
return LoadedGameAccounts[dbGameAccount.Id];
}
else
{
var account = new GameAccount(dbGameAccount);
Expand Down

0 comments on commit 30fa90b

Please sign in to comment.