- It's no longer possible to start a quest with a deck that needs more than 0 wins to unlock (i.e. Event Decks).

This commit is contained in:
Sloth
2012-03-30 16:39:05 +00:00
parent 9cea729c67
commit 4b3a5fa2a6
2 changed files with 16 additions and 6 deletions

View File

@@ -94,11 +94,15 @@ public enum VSubmenuQuestData implements IVSubmenu {
final Map<String, String> preconDescriptions = new HashMap<String, String>(); final Map<String, String> preconDescriptions = new HashMap<String, String>();
IStorageView<PreconDeck> preconDecks = QuestController.getPrecons(); IStorageView<PreconDeck> preconDecks = QuestController.getPrecons();
for (String preconDeck : preconDecks.getNames()) { for (PreconDeck preconDeck : preconDecks) {
cbxPrecon.addItem(preconDeck); if (preconDeck.getRecommendedDeals().getMinWins() > 0) {
String description = preconDecks.get(preconDeck).getDescription(); continue;
}
String name = preconDeck.getName();
cbxPrecon.addItem(name);
String description = preconDeck.getDescription();
description = "<html>" + WordUtils.wrap(description, 40, "<br>", false) + "</html>"; description = "<html>" + WordUtils.wrap(description, 40, "<br>", false) + "</html>";
preconDescriptions.put(preconDeck, description); preconDescriptions.put(name, description);
} }
cbxPrecon.setRenderer(new BasicComboBoxRenderer() { cbxPrecon.setRenderer(new BasicComboBoxRenderer() {

View File

@@ -76,7 +76,13 @@ public class SellRules {
return cost; return cost;
} }
/**
* Gets the minWins.
*
* @return the minWins
*/
public final int getMinWins() {
return minWins;
}
} }