Skip to content

Commit

Permalink
Fix debug dumping hotfix 2 savegames
Browse files Browse the repository at this point in the history
  • Loading branch information
Norbyte committed Aug 13, 2023
1 parent 7209755 commit 17fbc05
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ConverterApp/DebugDumper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,18 @@ private void RunTasks()
}

ReportProgress(70, "Loading story ...");
LSLib.LS.Node storyNode = SaveGlobals.Regions["Story"].Children["Story"][0];
var storyStream = new MemoryStream(storyNode.Attributes["Story"].Value as byte[]);
AbstractFileInfo storySave = SavePackage.Files.FirstOrDefault(p => p.Name == "StorySave.bin");
Stream storyStream;
if (storySave != null)
{
storyStream = storySave.MakeStream();
}
else
{
LSLib.LS.Node storyNode = SaveGlobals.Regions["Story"].Children["Story"][0];
storyStream = new MemoryStream(storyNode.Attributes["Story"].Value as byte[]);
}

var reader = new StoryReader();
SaveStory = reader.Read(storyStream);

Expand Down

0 comments on commit 17fbc05

Please sign in to comment.