Search in sources :

Example 1 with Chest

use of delta.games.lotro.character.storage.Chest in project lotro-companion by dmorcellet.

the class MainTestShowCharacterStorage method getAllItems.

private List<StoredItem> getAllItems(Vault container) {
    List<StoredItem> items = new ArrayList<StoredItem>();
    int chests = container.getChestCount();
    // int itemsCount=0;
    for (int i = 0; i < chests; i++) {
        Chest chest = container.getChest(i);
        if (chest != null) {
            List<StoredItem> chestItems = chest.getAllItemsByName();
            // itemsCount+=chestItems.size();
            items.addAll(chestItems);
        }
    }
    // System.out.println(itemsCount);
    return items;
}
Also used : Chest(delta.games.lotro.character.storage.Chest) ArrayList(java.util.ArrayList) StoredItem(delta.games.lotro.character.storage.StoredItem)

Aggregations

Chest (delta.games.lotro.character.storage.Chest)1 StoredItem (delta.games.lotro.character.storage.StoredItem)1 ArrayList (java.util.ArrayList)1