mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Player Level Changes
- added 10 extra player levels - changed level data type to LONG.
This commit is contained in:
parent
f33d463782
commit
847868f3a6
8 changed files with 153 additions and 39 deletions
|
|
@ -252,16 +252,16 @@ namespace ServerManagerTool.Utils
|
|||
public class PlayerLevelDataItem
|
||||
{
|
||||
[DataMember]
|
||||
public int XPRequired = 0;
|
||||
public long XPRequired = 0;
|
||||
[DataMember]
|
||||
public int EngramPoints = 0;
|
||||
public long EngramPoints = 0;
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
public class CreatureLevelDataItem
|
||||
{
|
||||
[DataMember]
|
||||
public int XPRequired = 0;
|
||||
public long XPRequired = 0;
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
|
|
|
|||
|
|
@ -13070,9 +13070,49 @@
|
|||
{
|
||||
"XPRequired": 1529545000,
|
||||
"EngramPoints": 0
|
||||
},
|
||||
{
|
||||
"XPRequired": 1614520000,
|
||||
"EngramPoints": 0
|
||||
},
|
||||
{
|
||||
"XPRequired": 1699494000,
|
||||
"EngramPoints": 0
|
||||
},
|
||||
{
|
||||
"XPRequired": 1784469000,
|
||||
"EngramPoints": 0
|
||||
},
|
||||
{
|
||||
"XPRequired": 1869444000,
|
||||
"EngramPoints": 0
|
||||
},
|
||||
{
|
||||
"XPRequired": 1954418000,
|
||||
"EngramPoints": 0
|
||||
},
|
||||
{
|
||||
"XPRequired": 2039393000,
|
||||
"EngramPoints": 0
|
||||
},
|
||||
{
|
||||
"XPRequired": 2124368000,
|
||||
"EngramPoints": 0
|
||||
},
|
||||
{
|
||||
"XPRequired": 2209343000,
|
||||
"EngramPoints": 0
|
||||
},
|
||||
{
|
||||
"XPRequired": 2294318000,
|
||||
"EngramPoints": 0
|
||||
},
|
||||
{
|
||||
"XPRequired": 2379292000,
|
||||
"EngramPoints": 0
|
||||
}
|
||||
],
|
||||
"PlayerAdditionalLevels": "75",
|
||||
"PlayerAdditionalLevels": "85",
|
||||
"CreatureLevels": [
|
||||
{
|
||||
"XPRequired": 10
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ namespace ServerManagerTool.Lib
|
|||
public static string MainDataFolder = Path.Combine(Environment.CurrentDirectory, Config.Default.GameDataDir);
|
||||
public static string UserDataFolder = Path.Combine(Config.Default.DataDir, Config.Default.GameDataDir);
|
||||
|
||||
public static int DefaultMaxExperiencePointsDino = 10;
|
||||
public static int DefaultMaxExperiencePointsPlayer = 5;
|
||||
public static long DefaultMaxExperiencePointsDino = 10;
|
||||
public static long DefaultMaxExperiencePointsPlayer = 5;
|
||||
|
||||
private static MainGameData gameData = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ namespace ServerManagerTool.Lib
|
|||
public void UpdateTotals()
|
||||
{
|
||||
int index = 0;
|
||||
int xpTotal = 0;
|
||||
int engramTotal = 0;
|
||||
long xpTotal = 0;
|
||||
long engramTotal = 0;
|
||||
foreach (var existingLevel in this.OrderBy(l => l.XPRequired))
|
||||
{
|
||||
xpTotal += existingLevel.XPRequired;
|
||||
|
|
@ -162,10 +162,10 @@ namespace ServerManagerTool.Lib
|
|||
public class Level : DependencyObject
|
||||
{
|
||||
public static readonly DependencyProperty LevelIndexProperty = DependencyProperty.Register(nameof(LevelIndex), typeof(int), typeof(Level), new PropertyMetadata(0));
|
||||
public static readonly DependencyProperty XPRequiredProperty = DependencyProperty.Register(nameof(XPRequired), typeof(int), typeof(Level), new PropertyMetadata(0));
|
||||
public static readonly DependencyProperty EngramPointsProperty = DependencyProperty.Register(nameof(EngramPoints), typeof(int), typeof(Level), new PropertyMetadata(0));
|
||||
public static readonly DependencyProperty XPTotalProperty = DependencyProperty.Register(nameof(XPTotal), typeof(int), typeof(Level), new PropertyMetadata(0));
|
||||
public static readonly DependencyProperty EngramTotalProperty = DependencyProperty.Register(nameof(EngramTotal), typeof(int), typeof(Level), new PropertyMetadata(0));
|
||||
public static readonly DependencyProperty XPRequiredProperty = DependencyProperty.Register(nameof(XPRequired), typeof(long), typeof(Level), new PropertyMetadata(0L));
|
||||
public static readonly DependencyProperty EngramPointsProperty = DependencyProperty.Register(nameof(EngramPoints), typeof(long), typeof(Level), new PropertyMetadata(0L));
|
||||
public static readonly DependencyProperty XPTotalProperty = DependencyProperty.Register(nameof(XPTotal), typeof(long), typeof(Level), new PropertyMetadata(0L));
|
||||
public static readonly DependencyProperty EngramTotalProperty = DependencyProperty.Register(nameof(EngramTotal), typeof(long), typeof(Level), new PropertyMetadata(0L));
|
||||
public static readonly DependencyProperty ShowColoredProperty = DependencyProperty.Register(nameof(ShowColored), typeof(bool), typeof(Level), new PropertyMetadata(false));
|
||||
|
||||
[DataMember]
|
||||
|
|
@ -176,30 +176,30 @@ namespace ServerManagerTool.Lib
|
|||
}
|
||||
|
||||
[DataMember]
|
||||
public int XPRequired
|
||||
public long XPRequired
|
||||
{
|
||||
get { return (int)GetValue(XPRequiredProperty); }
|
||||
get { return (long)GetValue(XPRequiredProperty); }
|
||||
set { SetValue(XPRequiredProperty, value); }
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public int EngramPoints
|
||||
public long EngramPoints
|
||||
{
|
||||
get { return (int)GetValue(EngramPointsProperty); }
|
||||
get { return (long)GetValue(EngramPointsProperty); }
|
||||
set { SetValue(EngramPointsProperty, value); }
|
||||
}
|
||||
|
||||
[XmlIgnore()]
|
||||
public int XPTotal
|
||||
public long XPTotal
|
||||
{
|
||||
get { return (int)GetValue(XPTotalProperty); }
|
||||
get { return (long)GetValue(XPTotalProperty); }
|
||||
set { SetValue(XPTotalProperty, value); }
|
||||
}
|
||||
|
||||
[XmlIgnore()]
|
||||
public int EngramTotal
|
||||
public long EngramTotal
|
||||
{
|
||||
get { return (int)GetValue(EngramTotalProperty); }
|
||||
get { return (long)GetValue(EngramTotalProperty); }
|
||||
set { SetValue(EngramTotalProperty, value); }
|
||||
}
|
||||
|
||||
|
|
@ -249,8 +249,8 @@ namespace ServerManagerTool.Lib
|
|||
public class ImportLevel
|
||||
{
|
||||
public int LevelIndex { get; set; }
|
||||
public int XPRequired { get; set; }
|
||||
public int EngramPoints { get; set; }
|
||||
public long XPRequired { get; set; }
|
||||
public long EngramPoints { get; set; }
|
||||
|
||||
public Level AsLevel()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3138,19 +3138,19 @@ namespace ServerManagerTool.Lib
|
|||
#endregion
|
||||
|
||||
#region Custom Levels
|
||||
public static readonly DependencyProperty OverrideMaxExperiencePointsPlayerProperty = DependencyProperty.Register(nameof(OverrideMaxExperiencePointsPlayer), typeof(NullableValue<int>), typeof(ServerProfile), new PropertyMetadata(new NullableValue<int>(false, GameData.DefaultMaxExperiencePointsPlayer)));
|
||||
public static readonly DependencyProperty OverrideMaxExperiencePointsPlayerProperty = DependencyProperty.Register(nameof(OverrideMaxExperiencePointsPlayer), typeof(NullableValue<long>), typeof(ServerProfile), new PropertyMetadata(new NullableValue<long>(false, GameData.DefaultMaxExperiencePointsPlayer)));
|
||||
[IniFileEntry(IniFiles.Game, IniSections.Game_ShooterGameMode, ServerProfileCategory.CustomLevels)]
|
||||
public NullableValue<int> OverrideMaxExperiencePointsPlayer
|
||||
public NullableValue<long> OverrideMaxExperiencePointsPlayer
|
||||
{
|
||||
get { return (NullableValue<int>)GetValue(OverrideMaxExperiencePointsPlayerProperty); }
|
||||
get { return (NullableValue<long>)GetValue(OverrideMaxExperiencePointsPlayerProperty); }
|
||||
set { SetValue(OverrideMaxExperiencePointsPlayerProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty OverrideMaxExperiencePointsDinoProperty = DependencyProperty.Register(nameof(OverrideMaxExperiencePointsDino), typeof(NullableValue<int>), typeof(ServerProfile), new PropertyMetadata(new NullableValue<int>(false, GameData.DefaultMaxExperiencePointsDino)));
|
||||
public static readonly DependencyProperty OverrideMaxExperiencePointsDinoProperty = DependencyProperty.Register(nameof(OverrideMaxExperiencePointsDino), typeof(NullableValue<long>), typeof(ServerProfile), new PropertyMetadata(new NullableValue<long>(false, GameData.DefaultMaxExperiencePointsDino)));
|
||||
[IniFileEntry(IniFiles.Game, IniSections.Game_ShooterGameMode, ServerProfileCategory.CustomLevels)]
|
||||
public NullableValue<int> OverrideMaxExperiencePointsDino
|
||||
public NullableValue<long> OverrideMaxExperiencePointsDino
|
||||
{
|
||||
get { return (NullableValue<int>)GetValue(OverrideMaxExperiencePointsDinoProperty); }
|
||||
get { return (NullableValue<long>)GetValue(OverrideMaxExperiencePointsDinoProperty); }
|
||||
set { SetValue(OverrideMaxExperiencePointsDinoProperty, value); }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,31 @@
|
|||
<title>Ark Server Manager Version Feed</title>
|
||||
<subtitle>This is the Ark Server Manager release version feed.</subtitle>
|
||||
<link href="http://arkservermanager.freeforums.net/" />
|
||||
<updated>2022-05-21T00:00:00Z</updated>
|
||||
<updated>2022-06-13T00:00:00Z</updated>
|
||||
|
||||
<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>
|
||||
<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;">CHANGE</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Updated player levels to include the 10 new levels. Also change the additional levels from 75 to 85.\nIf you have an issue with custom level, make sure you add the new 10 levels to the end.</li>
|
||||
<li>Updated to query master timeouts from 10 seconds to 30 seconds.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</content>
|
||||
<author>
|
||||
<name>bletch</name>
|
||||
<email>bletch1971@hotmail.com</email>
|
||||
</author>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:727E9DFF-08EA-4600-B75B-31DF15083056</id>
|
||||
|
|
|
|||
|
|
@ -5,26 +5,22 @@
|
|||
<title>Ark Server Manager Version Feed</title>
|
||||
<subtitle>This is the Ark Server Manager beta version feed.</subtitle>
|
||||
<link href="http://arkservermanager.freeforums.net/" />
|
||||
<updated>2022-05-21T00:00:00Z</updated>
|
||||
<updated>2022-06-13T00:00:00Z</updated>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:727E9DFF-08EA-4600-B75B-31DF15083056</id>
|
||||
<title>1.1.430 (1.1.430.1)</title>
|
||||
<summary>1.1.430.1</summary>
|
||||
<id>urn:uuid:2ADA47E8-6DD0-4231-BAB9-AE3CEE5FA72C</id>
|
||||
<title>1.1.431 (1.1.431.1)</title>
|
||||
<summary>1.1.431.1</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;">NEW</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Gamedata files - new file for Fjordur map.</li>
|
||||
</ul>
|
||||
<u style="font-size: .9em;">CHANGE</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Updated querymaster to use the defined timeouts.</li>
|
||||
<li>Updated player levels to include the 10 new levels. Also change the additional levels from 75 to 85.\nIf you have an issue with custom level, make sure you add the new 10 levels to the end.</li>
|
||||
<li>Updated to query master timeouts from 10 seconds to 30 seconds.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ namespace ServerManagerTool.Common.Utils
|
|||
|
||||
if (property.PropertyType == typeof(int) || property.PropertyType == typeof(NullableValue<int>))
|
||||
convertedVal = Convert.ToString(value, CultureInfo.GetCultureInfo(DEFAULT_CULTURE_CODE));
|
||||
else if (property.PropertyType == typeof(long) || property.PropertyType == typeof(NullableValue<long>))
|
||||
convertedVal = Convert.ToString(value, CultureInfo.GetCultureInfo(DEFAULT_CULTURE_CODE));
|
||||
else if (property.PropertyType == typeof(float) || property.PropertyType == typeof(NullableValue<float>))
|
||||
convertedVal = ((float)value).ToString("0.000000####", CultureInfo.GetCultureInfo(DEFAULT_CULTURE_CODE));
|
||||
else if (property.PropertyType == typeof(bool))
|
||||
|
|
@ -72,6 +74,18 @@ namespace ServerManagerTool.Common.Utils
|
|||
int.TryParse(tempValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.GetCultureInfo(DEFAULT_CULTURE_CODE), out int intValue);
|
||||
property.SetValue(obj, intValue);
|
||||
}
|
||||
else if (property.PropertyType == typeof(long) || property.PropertyType == typeof(long?))
|
||||
{
|
||||
string decimalSeparator = CultureInfo.GetCultureInfo(DEFAULT_CULTURE_CODE).NumberFormat.NumberDecimalSeparator;
|
||||
var tempValue = value;
|
||||
if (tempValue.Contains(decimalSeparator))
|
||||
{
|
||||
tempValue = tempValue.Substring(0, tempValue.IndexOf(decimalSeparator));
|
||||
}
|
||||
|
||||
long.TryParse(tempValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.GetCultureInfo(DEFAULT_CULTURE_CODE), out long longValue);
|
||||
property.SetValue(obj, longValue);
|
||||
}
|
||||
else if (property.PropertyType == typeof(float) || property.PropertyType == typeof(float?))
|
||||
{
|
||||
var tempValue = value.Replace("f", "");
|
||||
|
|
@ -92,6 +106,19 @@ namespace ServerManagerTool.Common.Utils
|
|||
var field = property.GetValue(obj) as NullableValue<int>;
|
||||
property.SetValue(obj, field.SetValue(true, intValue));
|
||||
}
|
||||
else if (property.PropertyType == typeof(NullableValue<long>))
|
||||
{
|
||||
string decimalSeparator = CultureInfo.GetCultureInfo(DEFAULT_CULTURE_CODE).NumberFormat.NumberDecimalSeparator;
|
||||
var tempValue = value;
|
||||
if (tempValue.Contains(decimalSeparator))
|
||||
{
|
||||
tempValue = tempValue.Substring(0, tempValue.IndexOf(decimalSeparator));
|
||||
}
|
||||
|
||||
long.TryParse(tempValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.GetCultureInfo(DEFAULT_CULTURE_CODE), out long longValue);
|
||||
var field = property.GetValue(obj) as NullableValue<long>;
|
||||
property.SetValue(obj, field.SetValue(true, longValue));
|
||||
}
|
||||
else if (property.PropertyType == typeof(NullableValue<float>))
|
||||
{
|
||||
var tempValue = value.Replace("f", "");
|
||||
|
|
@ -141,6 +168,19 @@ namespace ServerManagerTool.Common.Utils
|
|||
property.SetValue(obj, intValue);
|
||||
return true;
|
||||
}
|
||||
if (property.PropertyType == typeof(long) || property.PropertyType == typeof(long?))
|
||||
{
|
||||
string decimalSeparator = CultureInfo.GetCultureInfo(DEFAULT_CULTURE_CODE).NumberFormat.NumberDecimalSeparator;
|
||||
var tempValue = value;
|
||||
if (tempValue.Contains(decimalSeparator))
|
||||
{
|
||||
tempValue = tempValue.Substring(0, tempValue.IndexOf(decimalSeparator));
|
||||
}
|
||||
|
||||
long.TryParse(tempValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.GetCultureInfo(DEFAULT_CULTURE_CODE), out long longValue);
|
||||
property.SetValue(obj, longValue);
|
||||
return true;
|
||||
}
|
||||
if (property.PropertyType == typeof(float) || property.PropertyType == typeof(float?))
|
||||
{
|
||||
var tempValue = value.Replace("f", "");
|
||||
|
|
@ -163,6 +203,20 @@ namespace ServerManagerTool.Common.Utils
|
|||
property.SetValue(obj, field.SetValue(true, intValue));
|
||||
return true;
|
||||
}
|
||||
if (property.PropertyType == typeof(NullableValue<long>))
|
||||
{
|
||||
string decimalSeparator = CultureInfo.GetCultureInfo(DEFAULT_CULTURE_CODE).NumberFormat.NumberDecimalSeparator;
|
||||
var tempValue = value;
|
||||
if (tempValue.Contains(decimalSeparator))
|
||||
{
|
||||
tempValue = tempValue.Substring(0, tempValue.IndexOf(decimalSeparator));
|
||||
}
|
||||
|
||||
long.TryParse(tempValue, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign, CultureInfo.GetCultureInfo(DEFAULT_CULTURE_CODE), out long longValue);
|
||||
var field = property.GetValue(obj) as NullableValue<long>;
|
||||
property.SetValue(obj, field.SetValue(true, longValue));
|
||||
return true;
|
||||
}
|
||||
if (property.PropertyType == typeof(NullableValue<float>))
|
||||
{
|
||||
var tempValue = value.Replace("f", "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue