Search in sources :

Example 1 with EquipmentLocationComparator

use of delta.games.lotro.lore.items.comparators.EquipmentLocationComparator in project lotro-tools by dmorcellet.

the class ItemStatistics method showStatistics.

private void showStatistics() {
    // Items
    System.out.println("Items: " + _itemsCount);
    // - qualities
    System.out.println("- by quality:");
    List<ItemQuality> itemQualities = new ArrayList<ItemQuality>(_itemsByQuality.keySet());
    Collections.sort(itemQualities, new ItemQualityComparator());
    for (ItemQuality itemQuality : itemQualities) {
        IntegerHolder count = _itemsByQuality.get(itemQuality);
        System.out.println("\t" + itemQuality + ": " + count);
    }
    // - sub-categories
    System.out.println("- by sub-category:");
    List<String> itemSubCategories = new ArrayList<String>(_itemsBySubCategory.keySet());
    Collections.sort(itemSubCategories);
    for (String itemSubCategory : itemSubCategories) {
        IntegerHolder count = _itemsBySubCategory.get(itemSubCategory);
        System.out.println("\t" + itemSubCategory + ": " + count);
    }
    // - slot
    System.out.println("- by slot:");
    List<EquipmentLocation> locations = new ArrayList<EquipmentLocation>(_itemsBySlot.keySet());
    Collections.sort(locations, new EquipmentLocationComparator());
    for (EquipmentLocation location : locations) {
        IntegerHolder count = _itemsBySlot.get(location);
        System.out.println("\t" + location + ": " + count);
        List<String> names = _itemNamesBySlot.get(location);
        if (location != null) {
            Collections.sort(names);
            for (String name : names) {
                System.out.println("\t\t" + name);
            }
        }
    }
    // - scaling rules
    System.out.println("- by scaling rules:");
    List<String> scalingRules = new ArrayList<String>(_scalingRules.keySet());
    Collections.sort(scalingRules);
    for (String scalingRule : scalingRules) {
        List<String> names = _scalingRules.get(scalingRule);
        System.out.println("\t" + scalingRule + ": " + names.size());
        if (names.size() < 300) {
            Collections.sort(names);
            for (String name : names) {
                System.out.println("\t\t" + name);
            }
        }
    }
    // Armours
    System.out.println("Armours: " + _armoursCount);
    List<ArmourType> armourTypes = new ArrayList<ArmourType>(_armoursByType.keySet());
    Collections.sort(armourTypes, new ArmourTypeComparator());
    for (ArmourType armourType : armourTypes) {
        IntegerHolder count = _armoursByType.get(armourType);
        System.out.println("\t" + armourType + ": " + count);
    }
    // Weapons
    System.out.println("Weapons: " + _weaponsCount);
    List<WeaponType> weaponTypes = new ArrayList<WeaponType>(_weaponsByType.keySet());
    Collections.sort(weaponTypes, new WeaponTypeComparator());
    for (WeaponType weaponType : weaponTypes) {
        IntegerHolder count = _weaponsByType.get(weaponType);
        System.out.println("\t" + weaponType + ": " + count);
    }
}
Also used : ArmourType(delta.games.lotro.lore.items.ArmourType) EquipmentLocationComparator(delta.games.lotro.lore.items.comparators.EquipmentLocationComparator) ArrayList(java.util.ArrayList) ItemQuality(delta.games.lotro.lore.items.ItemQuality) IntegerHolder(delta.common.utils.misc.IntegerHolder) EquipmentLocation(delta.games.lotro.lore.items.EquipmentLocation) ItemQualityComparator(delta.games.lotro.lore.items.comparators.ItemQualityComparator) WeaponType(delta.games.lotro.lore.items.WeaponType) ArmourTypeComparator(delta.games.lotro.lore.items.comparators.ArmourTypeComparator) WeaponTypeComparator(delta.games.lotro.lore.items.comparators.WeaponTypeComparator)

Aggregations

IntegerHolder (delta.common.utils.misc.IntegerHolder)1 ArmourType (delta.games.lotro.lore.items.ArmourType)1 EquipmentLocation (delta.games.lotro.lore.items.EquipmentLocation)1 ItemQuality (delta.games.lotro.lore.items.ItemQuality)1 WeaponType (delta.games.lotro.lore.items.WeaponType)1 ArmourTypeComparator (delta.games.lotro.lore.items.comparators.ArmourTypeComparator)1 EquipmentLocationComparator (delta.games.lotro.lore.items.comparators.EquipmentLocationComparator)1 ItemQualityComparator (delta.games.lotro.lore.items.comparators.ItemQualityComparator)1 WeaponTypeComparator (delta.games.lotro.lore.items.comparators.WeaponTypeComparator)1 ArrayList (java.util.ArrayList)1