Archived
0

- set unlimited if count n/a

- add debug info
This commit is contained in:
iMoHax
2015-02-28 19:25:43 +03:00
parent fc573c0184
commit 45b78b8c1c

View File

@@ -50,7 +50,7 @@ public class OffersHandler implements ParseHandler {
} }
private void updateStation() { private void updateStation() {
LOG.trace("Update offers of station {}", station); LOG.debug("Update offers of station {}", station);
station.getAllBuyOffers().forEach(this::updateOffer); station.getAllBuyOffers().forEach(this::updateOffer);
station.getAllSellOffers().forEach(this::updateOffer); station.getAllSellOffers().forEach(this::updateOffer);
buyUpdates.entrySet().forEach( entry -> addOffer(entry, OFFER_TYPE.BUY)); buyUpdates.entrySet().forEach( entry -> addOffer(entry, OFFER_TYPE.BUY));
@@ -77,7 +77,7 @@ public class OffersHandler implements ParseHandler {
private void addOffer(Map.Entry<Item,OfferData> entry, OFFER_TYPE type){ private void addOffer(Map.Entry<Item,OfferData> entry, OFFER_TYPE type){
OfferData offer = entry.getValue(); OfferData offer = entry.getValue();
if (offer.isnew){ if (offer.isnew){
station.addOffer(type, entry.getKey(), offer.price, offer.count != null ? offer.count : 0); station.addOffer(type, entry.getKey(), offer.price, offer.count != null ? offer.count : -1);
} }
} }
@@ -142,7 +142,7 @@ public class OffersHandler implements ParseHandler {
sellUpdates.put(item, new OfferData(sell, supply)); sellUpdates.put(item, new OfferData(sell, supply));
} }
} else { } else {
LOG.warn("Item {} not found", name); LOG.warn("Item {} not found, line: {}", name, str);
} }
} else { } else {