Skip to content

Commit

Permalink
Fix dumping of character vars in v4 savegames
Browse files Browse the repository at this point in the history
  • Loading branch information
Norbyte committed Oct 10, 2020
1 parent fc1f146 commit 5d68a96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ConverterApp/VariableDumper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ private void DumpCharacter(Node characterNode)
{
var playerData = characterNode.Children["PlayerData"][0]
.Children["PlayerCustomData"][0];
key += " (Player " + (string)playerData.Attributes["Name"].Value + ")";
if (playerData.Attributes.TryGetValue("Name", out NodeAttribute name))
{
key += " (Player " + (string)name.Value + ")";
}
}

DumpVariables(key, characterVars);
Expand Down

0 comments on commit 5d68a96

Please sign in to comment.