Search in sources :

Example 1 with InventoryClothingComparator

use of com.lilithsthrone.utils.InventoryClothingComparator in project liliths-throne-public by Innoxia.

the class CharacterInventory method recalculateMapOfDuplicateClothing.

private void recalculateMapOfDuplicateClothing() {
    clothingDuplicates.clear();
    clothingInInventory.sort(new InventoryClothingComparator());
    for (AbstractClothing clothing : clothingInInventory) {
        if (!clothingDuplicates.containsKey(clothing))
            clothingDuplicates.put(clothing, 1);
        else
            clothingDuplicates.put(clothing, clothingDuplicates.get(clothing) + 1);
    }
}
Also used : AbstractClothing(com.lilithsthrone.game.inventory.clothing.AbstractClothing) InventoryClothingComparator(com.lilithsthrone.utils.InventoryClothingComparator)

Aggregations

AbstractClothing (com.lilithsthrone.game.inventory.clothing.AbstractClothing)1 InventoryClothingComparator (com.lilithsthrone.utils.InventoryClothingComparator)1