Fix so planeswalk emblems are saved

This commit is contained in:
drdev
2016-03-15 00:50:07 +00:00
parent 06e71c504d
commit 76176b1344

View File

@@ -113,6 +113,28 @@ public final class ConquestData {
chaosBattleRecord = chaosBattleRecord0;
}
public void saveData() {
FileUtil.ensureDirectoryExists(directory);
try {
XmlWriter xml = new XmlWriter(xmlFilename, "data");
xml.write("planeswalker", planeswalker);
xml.write("aetherShards", aetherShards);
xml.write("planeswalkEmblems", planeswalkEmblems);
xml.write("currentLocation", currentLocation);
xml.write("selectedCommanderIndex", selectedCommanderIndex);
xml.write("chaosBattleRecord", chaosBattleRecord);
xml.write("unlockedCards", unlockedCards);
xml.write("newCards", newCards);
xml.write("commanders", commanders);
xml.write("planeDataMap", planeDataMap);
xml.close();
}
catch (Exception e) {
e.printStackTrace();
}
}
public String getName() {
return name;
}
@@ -284,27 +306,6 @@ public final class ConquestData {
return chaosBattleRecord;
}
public void saveData() {
FileUtil.ensureDirectoryExists(directory);
try {
XmlWriter xml = new XmlWriter(xmlFilename, "data");
xml.write("planeswalker", planeswalker);
xml.write("aetherShards", aetherShards);
xml.write("currentLocation", currentLocation);
xml.write("selectedCommanderIndex", selectedCommanderIndex);
xml.write("chaosBattleRecord", chaosBattleRecord);
xml.write("unlockedCards", unlockedCards);
xml.write("newCards", newCards);
xml.write("commanders", commanders);
xml.write("planeDataMap", planeDataMap);
xml.close();
}
catch (Exception e) {
e.printStackTrace();
}
}
public void rename(final String newName) {
name = newName;
directory.renameTo(new File(ForgeConstants.CONQUEST_SAVE_DIR, name));