public void SetCharacterSettings(IPlayer player, int characterId) { //Character characterClient = JsonConvert.DeserializeObject<Character>((string)args[0]); Character characterDatabase = Singleton.GetDatabaseInstance().Characters .Include(l => l.CharacterLook) .Include(g => g.GroupWorkers) .Include(i => i.Items) .ThenInclude(s => s.SmartphoneContacts) .Include(i => i.Items) .ThenInclude(r => r.SmartphoneRecentCalls) .Include(i => i.Items) .ThenInclude(m => m.SmartphoneMessages) .ThenInclude(c => c.Cellphone) .Include(v => v.Vehicles) .Include(a => a.Account) .ThenInclude(p => p.AccountPremium) .FirstOrDefault(c => c.Id == characterId); if (EntityHelper.AccountLogged(characterDatabase.Account.Id)) { player.SendChatMessageError("Ktoś już jest zalogowany na tym koncie!"); return; } AccountEntity accountEntity = new AccountEntity(characterDatabase.Account, player); accountEntity.Login(characterDatabase); }