remove openable packs from shop list when sold so they don't reappear when the shop is reentered

This commit is contained in:
myk
2013-03-04 11:43:57 +00:00
parent c4e02b99f1
commit 338f8982a3

View File

@@ -270,6 +270,7 @@ public final class QuestUtilCards {
public void buyPack(final OpenablePack booster, final int value) { public void buyPack(final OpenablePack booster, final int value) {
if (this.qa.getCredits() >= value) { if (this.qa.getCredits() >= value) {
this.qa.setCredits(this.qa.getCredits() - value); this.qa.setCredits(this.qa.getCredits() - value);
this.qa.getShopList().remove(booster);
this.addAllCards(booster.getCards()); this.addAllCards(booster.getCards());
} }
} }
@@ -510,7 +511,6 @@ public final class QuestUtilCards {
* Generate cards in shop. * Generate cards in shop.
*/ */
public void generateCardsInShop() { public void generateCardsInShop() {
Iterable<CardPrinted> cardList = null; Iterable<CardPrinted> cardList = null;
if (qc.getFormat() == null) { if (qc.getFormat() == null) {
cardList = CardDb.instance().getAllCards(); } cardList = CardDb.instance().getAllCards(); }