Player Level Bugfixes

- changed INT to LONG when parsing the the INI file values.
- created new slider for LONG types.
This commit is contained in:
Brett Hewitson 2022-06-13 18:43:10 +10:00
parent c223abf541
commit f3ff807cd0
7 changed files with 487 additions and 8 deletions

View file

@ -128,17 +128,17 @@ namespace ServerManagerTool.Lib
break;
}
int xpRequired;
if (!int.TryParse(xpResult.Groups["xp"].Value, out xpRequired))
long xpRequired;
if (!long.TryParse(xpResult.Groups["xp"].Value, out xpRequired))
{
Debug.WriteLine(String.Format("Invalid xm required value: '{0}'", xpResult.Groups["xp"].Value));
break;
}
int engramPoints = 0;
long engramPoints = 0;
if (engramResult != null)
{
if (!int.TryParse(engramResult.Groups["points"].Value, out engramPoints))
if (!long.TryParse(engramResult.Groups["points"].Value, out engramPoints))
{
Debug.WriteLine(String.Format("Invalid engram points value: '{0}'", engramResult.Groups["points"].Value));
break;

View file

@ -4558,14 +4558,14 @@
<Button DockPanel.Dock="Right" ToolTip="{DynamicResource ServerSettings_ResetMaxXPTooltip}" Click="MaxXPPlayer_Reset" Style="{StaticResource ButtonStyle1}">
<Image Source="{com:Icon Path=/Ark Server Manager;component/Art/Refresh.ico,Size=32}"/>
</Button>
<cctl:AnnotatedCheckBoxAndIntegerSlider DockPanel.Dock="Right" Margin="0,1,0,1" Label="{DynamicResource ServerSettings_MaxXPPlayerLabel}" Value="{Binding OverrideMaxExperiencePointsPlayer}" Suffix="{DynamicResource SliderUnits_XP}" Minimum="0" Maximum="1000000000" SmallChange="5000" LargeChange="100000" TickFrequency="50000" ToolTip="{DynamicResource ServerSettings_MaxXPPlayerTooltip}"/>
<cctl:AnnotatedCheckBoxAndLongSlider DockPanel.Dock="Right" Margin="0,1,0,1" Label="{DynamicResource ServerSettings_MaxXPPlayerLabel}" Value="{Binding OverrideMaxExperiencePointsPlayer}" Suffix="{DynamicResource SliderUnits_XP}" Minimum="0" Maximum="10000000000" SmallChange="5000" LargeChange="100000" TickFrequency="50000" ToolTip="{DynamicResource ServerSettings_MaxXPPlayerTooltip}"/>
</DockPanel>
<DockPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3">
<Button DockPanel.Dock="Right" Click="MaxXPDino_Reset" ToolTip="{DynamicResource ServerSettings_ResetMaxXPTooltip}" Style="{StaticResource ButtonStyle1}">
<Image Source="{com:Icon Path=/Ark Server Manager;component/Art/Refresh.ico,Size=32}"/>
</Button>
<cctl:AnnotatedCheckBoxAndIntegerSlider DockPanel.Dock="Right" Margin="0,1,0,1" Label="{DynamicResource ServerSettings_MaxXPDinoLabel}" Value="{Binding OverrideMaxExperiencePointsDino}" Suffix="{DynamicResource SliderUnits_XP}" Minimum="0" Maximum="1000000000" SmallChange="5000" LargeChange="100000" TickFrequency="50000" ToolTip="{DynamicResource ServerSettings_MaxXPDinoTooltip}"/>
<cctl:AnnotatedCheckBoxAndLongSlider DockPanel.Dock="Right" Margin="0,1,0,1" Label="{DynamicResource ServerSettings_MaxXPDinoLabel}" Value="{Binding OverrideMaxExperiencePointsDino}" Suffix="{DynamicResource SliderUnits_XP}" Minimum="0" Maximum="10000000000" SmallChange="5000" LargeChange="100000" TickFrequency="50000" ToolTip="{DynamicResource ServerSettings_MaxXPDinoTooltip}"/>
</DockPanel>
<TextBlock Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" Margin="5" Text="{Binding CustomLevelProgressionsInformation, ElementName=SettingsControl, FallbackValue=NOTE: Custom Player and Dino levels..}" TextWrapping="Wrap" VerticalAlignment="Center" FontWeight="Bold"/>

View file

@ -9,8 +9,8 @@
<entry>
<id>urn:uuid:2ADA47E8-6DD0-4231-BAB9-AE3CEE5FA72C</id>
<title>1.1.431 (1.1.431.1)</title>
<summary>1.1.431.1</summary>
<title>1.1.431 (1.1.431.2)</title>
<summary>1.1.431.2</summary>
<link href="" />
<updated>2022-06-13T00:00:00Z</updated>
<content type="xhtml">

View file

@ -7,6 +7,29 @@
<link href="http://arkservermanager.freeforums.net/" />
<updated>2022-06-13T00:00:00Z</updated>
<entry>
<id>urn:uuid:2ADA47E8-6DD0-4231-BAB9-AE3CEE5FA72C</id>
<title>1.1.431 (1.1.431.2)</title>
<summary>1.1.431.2</summary>
<link href="" />
<updated>2022-06-13T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">BUGFIX</u>
<br/>
<ul>
<li>Player Levels - fix the conversion bug that would prevent all player levels being read from the INI file. Only values > 2147483647 were affected.</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:2ADA47E8-6DD0-4231-BAB9-AE3CEE5FA72C</id>
<title>1.1.431 (1.1.431.1)</title>