Adventure fixes: "No Sell Cards", quest tracking

This commit is contained in:
jjayers99
2024-03-04 20:57:57 -05:00
committed by Chris H
parent 8231fd704c
commit f6719d6f06
2 changed files with 19 additions and 23 deletions

View File

@@ -295,6 +295,7 @@ public class AdventureQuestStage implements Serializable {
} else {
status = ++progress4 >= count4 && count4 > 0 ? FAILED : status;
}
break;
case Arena:
status = event.type == AdventureQuestEventType.ARENACOMPLETE
&& event.winner //if event won & not conceded

View File

@@ -453,29 +453,24 @@ public class AdventurePlayer implements Serializable, SaveFileContent {
setSelectedDeckSlot(data.readInt("selectedDeckIndex"));
cards.addAll(CardPool.fromCardList(Lists.newArrayList((String[]) data.readObject("cards"))));
//newCards.addAll(InventoryItem data.readObject("cards"))));
data.storeObject("newCards", newCards.toFlatList().toArray(new InventoryItem[0]));
data.storeObject("autoSellCards", autoSellCards.toFlatList().toArray(new InventoryItem[0]));
data.storeObject("noSellCards", noSellCards.toFlatList().toArray(new InventoryItem[0]));
// if (data.containsKey("newCards")) {
// InventoryItem[] items = (InventoryItem[]) data.readObject("newCards");
// for (InventoryItem item : items){
// newCards.add((PaperCard)item);
// }
// }
// if (data.containsKey("noSellCards")) {
// PaperCard[] items = (PaperCard[]) data.readObject("noSellCards");
// for (PaperCard item : items){
// noSellCards.add(item);
// }
// }
// if (data.containsKey("autoSellCards")) {
// PaperCard[] items = (PaperCard[]) data.readObject("autoSellCards");
// for (PaperCard item : items){
// autoSellCards.add(item);
// }
// }
if (data.containsKey("newCards")) {
InventoryItem[] items = (InventoryItem[]) data.readObject("newCards");
for (InventoryItem item : items){
newCards.add((PaperCard)item);
}
}
if (data.containsKey("noSellCards")) {
PaperCard[] items = (PaperCard[]) data.readObject("noSellCards");
for (PaperCard item : items){
noSellCards.add(item);
}
}
if (data.containsKey("autoSellCards")) {
PaperCard[] items = (PaperCard[]) data.readObject("autoSellCards");
for (PaperCard item : items){
autoSellCards.add(item);
}
}
fantasyMode = data.containsKey("fantasyMode") && data.readBool("fantasyMode");
announceFantasy = data.containsKey("announceFantasy") && data.readBool("announceFantasy");