mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- CheckStyle.
This commit is contained in:
@@ -160,7 +160,7 @@ public class QuestDataIO {
|
||||
|
||||
final int saveVersion = newData.getVersionNumber();
|
||||
|
||||
if( saveVersion < 3 ) {
|
||||
if (saveVersion < 3) {
|
||||
// no difference here (used only to set initial lives)
|
||||
setFinalField(QuestData.class, "assets", newData, new QuestAssets(QuestMode.Classic));
|
||||
|
||||
@@ -210,9 +210,11 @@ public class QuestDataIO {
|
||||
ArrayList<Integer> completedChallenges = new ArrayList<Integer>();
|
||||
setFinalField(QuestAchievements.class, "completedChallenges", qA, completedChallenges);
|
||||
NodeList ccs = document.getElementsByTagName("completedChallenges").item(0).getChildNodes();
|
||||
for(int iN = 0; iN < ccs.getLength(); iN++) {
|
||||
for (int iN = 0; iN < ccs.getLength(); iN++) {
|
||||
Node n = ccs.item(iN);
|
||||
if ( n.getNodeType() != Node.ELEMENT_NODE ) continue;
|
||||
if (n.getNodeType() != Node.ELEMENT_NODE) {
|
||||
continue;
|
||||
}
|
||||
completedChallenges.add(Integer.parseInt(n.getTextContent()));
|
||||
}
|
||||
|
||||
@@ -253,7 +255,6 @@ public class QuestDataIO {
|
||||
return (T) xs.fromXML(xmlData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* saveData.
|
||||
@@ -266,7 +267,7 @@ public class QuestDataIO {
|
||||
try {
|
||||
final XStream xStream = getSerializer(false);
|
||||
|
||||
final File f = new File(ForgeProps.getFile(NewConstants.Quest.DATA_DIR), qd.getName() );
|
||||
final File f = new File(ForgeProps.getFile(NewConstants.Quest.DATA_DIR), qd.getName());
|
||||
savePacked(f + ".dat", xStream, qd);
|
||||
saveUnpacked(f + ".xml", xStream, qd);
|
||||
|
||||
@@ -284,7 +285,6 @@ public class QuestDataIO {
|
||||
zout.close();
|
||||
}
|
||||
|
||||
|
||||
private static void saveUnpacked(String f, XStream xStream, QuestData qd) throws IOException {
|
||||
BufferedOutputStream boutUnp = new BufferedOutputStream(new FileOutputStream(f));
|
||||
xStream.toXML(qd, boutUnp);
|
||||
|
||||
@@ -146,7 +146,7 @@ public class ViewStall extends JPanel {
|
||||
if (AllZone.getQuest().getAssets() == null) { return; }
|
||||
|
||||
QuestAssets qS = AllZone.getQuest().getAssets();
|
||||
this.lblStats.setText( "Credits: " + qS.getCredits() + " Life: " + qS.getLife());
|
||||
this.lblStats.setText("Credits: " + qS.getCredits() + " Life: " + qS.getLife());
|
||||
|
||||
final List<IQuestStallPurchasable> items =
|
||||
AllZone.getQuest().getBazaar().getItems(stall.getName());
|
||||
|
||||
Reference in New Issue
Block a user