- 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:
@@ -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++) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user