Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

March release fixes #1

Merged
merged 4 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ public AdventureQuestController.QuestStatus handleEvent(AdventureQuestEvent even
} else {
status = ++progress4 >= count4 && count4 > 0 ? FAILED : status;
}
break;
case Arena:
status = event.type == AdventureQuestEventType.ARENACOMPLETE
&& event.winner //if event won & not conceded
Expand Down
41 changes: 18 additions & 23 deletions forge-gui-mobile/src/forge/adventure/player/AdventurePlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -453,29 +453,24 @@ public void load(SaveFileData data) {
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");
Expand Down
Loading