diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/merchant/ParametrizedMerchantTest.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/merchant/ParametrizedMerchantTest.java index 8e7a4b570..abae8d3ce 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/merchant/ParametrizedMerchantTest.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/merchant/ParametrizedMerchantTest.java @@ -55,6 +55,23 @@ public class ParametrizedMerchantTest { } } + + // @Test + public void plotPriceEasingFromSetup() { + Date setupDate = new Date(0); + + MerchantDAO merchantDao = new MockMerchantDAO(); + + ParametrizedMerchant merchant = new ParametrizedMerchant(new LotroCardBlueprintLibrary()); + merchant.setMerchantDao(merchantDao); + merchant.setMerchantSetupDate(setupDate); + + long hour = 1000 * 60 * 60; + + for (long time = 0; time < hour * 24 * 35L; time += hour * 2) + System.out.println(time / hour + "," + ((int) merchant.getCardSellPrice("1_1", new Date(time))) + "," + ((int) merchant.getCardBuyPrice("1_1", new Date(time)))); + } + private void assertEqualsMoreOrLess(int expected, int given) { assertTrue("Expected " + expected + " more or less, but received " + given, given <= expected + 1 && given >= expected - 1); } diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/merchantUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/merchantUi.js index 2dffc128a..1e8b5a082 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/merchantUi.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/merchantUi.js @@ -46,20 +46,20 @@ var GempLotrMerchantUI = Class.extend({ this.infoDialog = $("
") .dialog({ - autoOpen: false, - closeOnEscape: true, - resizable: false, - title: "Card information" - }); + autoOpen: false, + closeOnEscape: true, + resizable: false, + title: "Card information" + }); this.questionDialog = $("") .dialog({ - autoOpen: false, - closeOnEscape: true, - resizable: false, - modal: true, - title: "Merchant operation" - }); + autoOpen: false, + closeOnEscape: true, + resizable: false, + modal: true, + title: "Merchant operation" + }); var swipeOptions = { threshold: 20, @@ -230,7 +230,7 @@ var GempLotrMerchantUI = Class.extend({ }); cardDiv.append(buyBut); } - if (sellPrice != null && sellPrice <= this.currencyCount) { + if (sellPrice != null) { var formattedSellPrice = this.formatPrice(sellPrice); var sellBut = $("