Skip to content

Commit

Permalink
Merge pull request #1 from jjayers99/MarchReleaseFixes
Browse files Browse the repository at this point in the history
March release fixes
  • Loading branch information
jjayers99 authored Mar 5, 2024
2 parents 54b7c80 + 5c4e91a commit 0ae6be5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 deletions.
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

0 comments on commit 0ae6be5

Please sign in to comment.