public bool ProcessItemRecovery(string query, string identifier) { try { var items = itemResolver.ResolvePlayerAndItems(query, identifier); foreach (var charItems in items.GroupBy(x => x.Character.Id)) { var inventory = inventoryProvider.Get(charItems.Key); var invItems = inventory.GetUnequippedItems(); foreach (var item in charItems) { inventory.AddItem(item.Item.Id, (long)item.Amount); } } return(true); } catch (Exception exc) { logger.LogError("Failed to recover items: " + exc); return(false); } }