- Merchant logic was switched to one based on stock. If it has no specific card, it won't be able to sell it, until it

acquires a copy from another player. Once stock reaches specified number, it will stop buying the card.
This commit is contained in:
marcins78@gmail.com
2012-12-19 20:14:38 +00:00
parent fb349a57e6
commit 1f925223cf
3 changed files with 9 additions and 6 deletions

View File

@@ -33,17 +33,16 @@ public class MerchantService {
public MerchantService(LotroCardBlueprintLibrary library, CollectionsManager collectionsManager, MerchantDAO merchantDAO) {
_collectionsManager = collectionsManager;
ParametrizedMerchant parametrizedMerchant = new ParametrizedMerchant(library);
Date setupDate;
try {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
format.setTimeZone(TimeZone.getTimeZone("GMT"));
Date setupDate = format.parse("2012-03-14 00:00:00");
parametrizedMerchant.setMerchantSetupDate(setupDate);
setupDate = format.parse("2012-03-14 00:00:00");
} catch (ParseException exp) {
throw new RuntimeException("Unable to parse merchant setup date");
}
parametrizedMerchant.setMerchantDao(merchantDAO);
_merchant = parametrizedMerchant;
_merchant = new StorageBasedMerchant(library, merchantDAO, setupDate);
RarityReader rarityReader = new RarityReader();
for (int i = 0; i <= 19; i++) {

View File

@@ -53,7 +53,7 @@ public class StorageBasedMerchant implements Merchant {
MerchantDAO.Transaction lastTransaction = _merchantDao.getLastTransaction(blueprintId);
if (lastTransaction == null || lastTransaction.getStock() < 0)
if (lastTransaction == null || lastTransaction.getStock() <= 0)
return null;
Double normalPrice = getNormalPrice(lastTransaction, blueprintId, currentTime);

View File

@@ -1,4 +1,8 @@
<pre style="font-size:80%">
<b>19 Dec. 2012</b>
- Merchant logic was switched to one based on stock. If it has no specific card, it won't be able to sell it, until it
acquires a copy from another player. Once stock reaches specified number, it will stop buying the card.
<b>16 Dec. 2012</b>
- "Plains of Rohan Camp" now allows to heal "up to" 3 wounds, not just 3 wounds.