diff --git a/GameInfo.cs b/GameInfo.cs
index 39deb58..2fd3035 100644
--- a/GameInfo.cs
+++ b/GameInfo.cs
@@ -35,8 +35,9 @@ public class GameInfo : INotifyPropertyChanged
short _gameId = 0;
byte _behavior = 0;
byte _animal = 0;
- byte _linkedHeros = 0;
byte _agesSeasons = 0;
+ bool _isHeroQuest = false;
+ bool _isLinkedGame = false;
// JSON.Net has problems serializing the rings if it's an enum,
// so we have to put the attribute here instead
@@ -74,15 +75,26 @@ public Game Game
///
/// Gets or sets the Quest type used for this user data
///
- [JsonProperty("QuestType")]
- [JsonConverter(typeof(StringEnumConverter))]
- public Quest Quest
+ public bool IsHeroQuest
+ {
+ get { return _isHeroQuest; }
+ set
+ {
+ _isHeroQuest = value;
+ OnPropertyChanged("IsHeroQuest");
+ }
+ }
+
+ ///
+ /// Gets or sets the Quest type used for this user data
+ ///
+ public bool IsLinkedGame
{
- get { return (Quest)_linkedHeros; }
+ get { return _isLinkedGame; }
set
{
- _linkedHeros = (byte)value;
- OnPropertyChanged("Quest");
+ _isLinkedGame = value;
+ OnPropertyChanged("IsLinkedGame");
}
}
@@ -274,8 +286,9 @@ public void LoadGameData(byte[] secret)
//if(!isGameCode)
// throw new ArgumentException("The specified data is not a game code", "secret");
- _linkedHeros = (byte)(decodedSecret[20] == '1' ? 1 : 0);
+ _isHeroQuest = decodedSecret[20] == '1';
_agesSeasons = (byte)(decodedSecret[21] == '1' ? 1 : 0);
+ _isLinkedGame = decodedSecret[106] == '1';
_hero = System.Text.Encoding.ASCII.GetString(new byte[] {
@@ -313,7 +326,8 @@ public void LoadGameData(byte[] secret)
OnPropertyChanged("Animal");
OnPropertyChanged("Behavior");
OnPropertyChanged("Game");
- OnPropertyChanged("Quest");
+ OnPropertyChanged("IsLinkedGame");
+ OnPropertyChanged("IsHeroQuest");
}
///
@@ -426,7 +440,7 @@ public byte[] CreateGameSecret()
unencodedSecret += "00"; // game = 0
unencodedSecret += Convert.ToString(_gameId, 2).PadLeft(15, '0').Reverse();
- unencodedSecret += Quest == OracleHack.Quest.LinkedGame ? "0" : "1";
+ unencodedSecret += _isHeroQuest ? "1" : "0";
unencodedSecret += Game == OracleHack.Game.Ages ? "0" : "1";
unencodedSecret += Convert.ToString((byte)_hero[0], 2).PadLeft(8, '0').Reverse();
unencodedSecret += Convert.ToString((byte)_child[0], 2).PadLeft(8, '0').Reverse();
@@ -443,7 +457,7 @@ public byte[] CreateGameSecret()
unencodedSecret += "1"; // unknown 5
unencodedSecret += Convert.ToString((byte)_hero[4], 2).PadLeft(8, '0').Reverse();
unencodedSecret += Convert.ToString((byte)_child[3], 2).PadLeft(8, '0').Reverse();
- unencodedSecret += Quest == OracleHack.Quest.LinkedGame ? "1" : "0";
+ unencodedSecret += _isLinkedGame ? "1" : "0";
unencodedSecret += Convert.ToString((byte)_child[4], 2).PadLeft(8, '0').Reverse();
byte[] unencodedBytes = StringToBytes(unencodedSecret);
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
index af69091..24947e8 100644
--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OracleHack")]
-[assembly: AssemblyCopyright("Copyright © Andrew \"Kabili\" Nagle 2013 - 2014")]
+[assembly: AssemblyCopyright("Copyright © Andrew \"Kabili\" Nagle 2013 - 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -20,7 +20,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-[assembly: AssemblyVersion("2.0.0.*")]
+[assembly: AssemblyVersion("2.1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
@@ -28,5 +28,5 @@
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]
-[assembly: AssemblyInformationalVersion("2.0")]
+[assembly: AssemblyInformationalVersion("2.1")]