Skip to content

Commit

Permalink
SporeServer: correct SporeModel xml parsing more
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Nov 8, 2024
1 parent 04e9590 commit c774d60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions SporeServer/Models/Xml/SporeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ public static SporeModel SerializeFromXml(Stream stream)
{
AvatarLocked = XmlHelper.ParseInt32_Null(scenarioResourceNode.SelectSingleNode("bAvatarLocked")),
AllowedPosseMembers = XmlHelper.ParseInt32_Null(scenarioResourceNode.SelectSingleNode("numAllowedPosseMembers")),
WinText = scenarioResourceNode.SelectSingleNode("winText").InnerText,
LoseText = scenarioResourceNode.SelectSingleNode("loseText").InnerText,
IntroText = scenarioResourceNode.SelectSingleNode("introText").InnerText,
WinText = XmlHelper.ParseString_Null(scenarioResourceNode.SelectSingleNode("winText")),
LoseText = XmlHelper.ParseString_Null(scenarioResourceNode.SelectSingleNode("loseText")),
IntroText = XmlHelper.ParseString_Null(scenarioResourceNode.SelectSingleNode("introText")),
Type = XmlHelper.ParseInt64_Null(scenarioResourceNode.SelectSingleNode("type")),
AvatarAsset = XmlHelper.ParseInt64List(scenarioResourceNode.SelectSingleNode("mAvatarAsset").SelectSingleNode("ID"))
};
Expand Down
6 changes: 3 additions & 3 deletions SporeServer/Models/Xml/SporeModelScenarioResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public class SporeModelScenarioResource
{
public Int32? AvatarLocked { get; set; }
public Int32? AllowedPosseMembers { get; set; }
public string WinText { get; set; }
public string LoseText { get; set; }
public string IntroText { get; set; }
public string? WinText { get; set; }
public string? LoseText { get; set; }
public string? IntroText { get; set; }
public Int64? Type { get; set; }
public Int64[]? AvatarAsset { get; set; }
public SporeModelScenarioResourceAct[] Acts { get; set; }
Expand Down

0 comments on commit c774d60

Please sign in to comment.