-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathImmersiveConfig.cpp
46 lines (39 loc) · 2.31 KB
/
ImmersiveConfig.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "immersivepch.h"
#include "SystemConfig.h"
#include "ImmersiveConfig.h"
using namespace std;
INSTANTIATE_SINGLETON_1(ImmersiveConfig);
ImmersiveConfig::ImmersiveConfig()
{
}
bool ImmersiveConfig::Initialize()
{
sLog.outString("Initializing Immersive by ike3");
if (!config.SetSource(SYSCONFDIR"immersive.conf"))
{
sLog.outString("Immersive is Disabled. Unable to open configuration file immersive.conf");
return false;
}
serverPort = config.GetIntDefault("Immersive.ServerPort", 0);
manualAttributes = config.GetBoolDefault("Immersive.ManualAttributes", true);
manualAttributesPercent = config.GetFloatDefault("Immersive.ManualAttributesPercent", 80.0f);
manualAttributesIncrease = config.GetFloatDefault("Immersive.ManualAttributesIncrease", 5);
sharedXpPercent = config.GetFloatDefault("Immersive.SharedXpPercent", 90.0f);
sharedMoneyPercent = config.GetFloatDefault("Immersive.SharedMoneyPercent", 90.0f);
sharedRepPercent = config.GetFloatDefault("Immersive.SharedRepPercent", 90.0f);
sharedQuests = config.GetBoolDefault("Immersive.SharedQuests", true);
fishingBaubles = config.GetBoolDefault("Immersive.FishingBaubles", true);
sharedPercentRaceRestiction = config.GetIntDefault("Immersive.SharedPercentRaceRestriction", 0);
sharedPercentClassRestiction = config.GetIntDefault("Immersive.SharedPercentClassRestriction", 0);
sharedPercentGuildRestiction = config.GetIntDefault("Immersive.SharedPercentGuildRestriction", 0);
sharedPercentFactionRestiction = config.GetIntDefault("Immersive.SharedPercentFactionRestriction", 0);
sharedPercentMinLevel = config.GetFloatDefault("Immersive.SharedPercentMinLevel", 0);
attributeLossPerDeath = config.GetIntDefault("Immersive.AttributeLossPerDeath", 1);
fallDamageMultiplier = config.GetFloatDefault("Immersive.FallDamageMultiplier", 1);
sharedXpPercentLevelDiff = config.GetIntDefault("Immersive.SharedXpPercentLevelDiff", 0);
scaleModifierWorkaround = config.GetBoolDefault("Immersive.ScaleModifierWorkaround", false);
sharedRandomPercent = config.GetIntDefault("Immersive.SharedRandomPercent", 20);
pauseRange = config.GetFloatDefault("Immersive.PauseRange", 0.0f);
sLog.outString("Immersive configuration loaded");
return true;
}