v0.4.1: fixed some crashes relating to rankings

This commit is contained in:
Evan Debenham 2016-07-18 03:42:35 -04:00 committed by Evan Debenham
parent 86a21563b0
commit 75295b811f

View File

@ -330,12 +330,9 @@ public enum Rankings {
heroClass = HeroClass.restoreInBundle( bundle ); heroClass = HeroClass.restoreInBundle( bundle );
armorTier = bundle.getInt( TIER ); armorTier = bundle.getInt( TIER );
if (bundle.contains(FILE)) { if (bundle.contains(FILE)) gameFile = bundle.getString(FILE);
gameFile = bundle.getString(FILE); if (bundle.contains(DATA)) gameData = bundle.getBundle(DATA);
} else { if (bundle.contains(ID)) gameID = bundle.getString(ID);
gameData = bundle.getBundle(DATA);
gameID = bundle.getString(ID);
}
depth = bundle.getInt( DEPTH ); depth = bundle.getInt( DEPTH );
herolevel = bundle.getInt( LEVEL ); herolevel = bundle.getInt( LEVEL );
@ -356,8 +353,8 @@ public enum Rankings {
bundle.put( LEVEL, herolevel ); bundle.put( LEVEL, herolevel );
bundle.put( DEPTH, depth ); bundle.put( DEPTH, depth );
bundle.put( DATA, gameData ); if (gameData != null) bundle.put( DATA, gameData );
bundle.put( ID, gameID); bundle.put( ID, gameID );
} }
} }