feat: Adds configurable skill and stat gain (#1489)
### Summary - Adds the following configurations: ```json "stats.statMax": "125", "stats.gainChanceMultiplier": 1.0, "stats.primaryStatGainChance": 0.75, "stats.gainDelay": "00:10:00", "stats.petGainDelay": "00:05:00", "stats.usePub45StatGain": "False" ``` - Adds Pub 45 stat gain rate for UOML+. - Reduces the gain delay for legacy stat gain from 15 minutes to 10 minutes. - Legacy gain no longer requires a gain in skill to gain in a stat.
This commit is contained in:
parent
29c7d839a7
commit
f9517854d0
4 changed files with 311 additions and 118 deletions
|
|
@ -64,6 +64,12 @@ public static class ServerConfiguration
|
|||
return bool.TryParse(strValue, out var value) ? value : defaultValue;
|
||||
}
|
||||
|
||||
public static TimeSpan GetSetting(string key, TimeSpan defaultValue)
|
||||
{
|
||||
_settings.Settings.TryGetValue(key, out var strValue);
|
||||
return TimeSpan.TryParse(strValue, out var value) ? value : defaultValue;
|
||||
}
|
||||
|
||||
public static T GetSetting<T>(string key, T defaultValue) where T : struct, Enum
|
||||
{
|
||||
_settings.Settings.TryGetValue(key, out var strValue);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue