use of pcgen.facade.core.EquipmentFacade in project pcgen by PCGen.
the class UnequippedList method quantityChanged.
@Override
public void quantityChanged(EquipmentListEvent e) {
EquipmentFacade equipment = e.getEquipment();
int quantity = purchasedList.getQuantity(equipment) - equippedList.getQuantity(equipment);
if (quantity > 0) {
if (quantityMap.containsKey(equipment)) {
setQuantity(equipment, quantity);
} else {
addEquipment(equipment, quantity);
}
} else {
removeEquipment(equipment);
}
}
Aggregations