public static IEnumerable <EliteAPI.InventoryItem> GetContainer(this EliteAPI.InventoryTools tools, int containerId) { var itemIndex = 0; while (itemIndex < 80) { var item = tools.GetContainerItem(containerId, itemIndex++); if (item is null) { yield break; } yield return(item); } }
public static IEnumerable <EliteAPI.InventoryItem> GetContainer(this EliteAPI.InventoryTools tools, Bags bag) => tools.GetContainer((int)bag);