public async Task <bool> TryMigrateFrom(Character character, ServerServiceInfo current) { var accountID = character.Data.Account.ID.ToString(); var characterID = character.ID.ToString(); if (!await MigrationCache.ExistsAsync(characterID)) { return(false); } var migration = (await MigrationCache.GetAsync <MigrationInfo>(characterID)).Value; if (migration.ToService != current.Name) { return(false); } character.Data.Account.LatestConnectedService = migration.ToService; character.Data.Account.PreviousConnectedService = migration.FromService; await AccountStatusCache.SetAsync(accountID, AccountState.LoggedIn); await MigrationCache.RemoveAsync(characterID); return(true); }