Skip to content

Commit e64e36c

Browse files
committed
- fixed a problem where changes in Talent are not updated when Apply button is clicked.
1 parent a977fd7 commit e64e36c

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

D-OS Save Editor/MainWindow.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ private void LoadSavegamesPath(string dir)
211211
/// Unpacks lsv files
212212
/// </summary>
213213
/// <param name="savegame">Savegame object</param>
214+
/// <param name="progress">Progress text to be updated in Progress Indicator UI</param>
214215
/// <returns>true for successful, otherwise fail</returns>
215216
private async Task<bool> UnpackSaveAsync(Savegame savegame, IProgress<string> progress)
216217
{

D-OS Save Editor/SE/SaveEditor.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ private void SavePlayer_OnClick(object sender, RoutedEventArgs e)
175175
StatsTab.SaveEdits();
176176
AbilitiesTab.SaveEdits();
177177
TraitsTab.SaveEdits();
178+
TalentTab.SaveEdits();
178179

179180
MessageBox.Show(this, "Changes have been applied to the selected character.", "Successful");
180181
}

D-OS Save Editor/SE/TalentTab.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ private uint CalculateTalentValue(Panel group)
4949

5050
public void UpdateForm()
5151
{
52-
UpdateTalents((uint)Player.Talents[0], TalentGroup0);
53-
UpdateTalents((uint)Player.Talents[1], TalentGroup1);
54-
UpdateTalents((uint)Player.Talents[2], TalentGroup2);
52+
UpdateTalents(Player.Talents[0], TalentGroup0);
53+
UpdateTalents(Player.Talents[1], TalentGroup1);
54+
UpdateTalents(Player.Talents[2], TalentGroup2);
5555
}
5656

5757
private void UpdateTalents(uint talentValue, Panel group)

D-OS Save Editor/savegame/LsxParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public static Player ParsePlayer(XmlNode node)
116116
nodes = node.SelectNodes("children//node [@id='Talents']");
117117
for (var j = 0; j < nodes?.Count; j++)
118118
{
119-
player.Talents.Add(j, long.Parse(nodes[j].FirstChild.Attributes[1].Value));
119+
player.Talents.Add(j, uint.Parse(nodes[j].FirstChild.Attributes[1].Value));
120120
}
121121

122122
nodes = node.SelectNodes("children//node [@id='Traits']");

D-OS Save Editor/savegame/Player.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public string TalentPoints
173173
/// <summary>
174174
/// Acquired talents of the player. Keys are talent ids which can be found in ConversionTable class, and Values are points that have been assigned to the corresponding talents, which should be either 1 (acquired) or 0 (not acquired) .
175175
/// </summary>
176-
public Dictionary<int, long> Talents { get; set; } = new Dictionary<int, long>();
176+
public Dictionary<int, uint> Talents { get; set; } = new Dictionary<int, uint>();
177177
//<node id = "Traits" >
178178
// < attribute id="Object" value="0" type="2" />
179179
//</node>

0 commit comments

Comments
 (0)