refactor cfg
parent
c249498304
commit
dd8c9481a5
|
@ -1,9 +1,11 @@
|
|||
NeedsSystem.Enable = 1
|
||||
NeedsSystem.MaxValue = 255
|
||||
NeedsSystem.LowValue = 16
|
||||
NeedsSystem.CriticalValue = 5
|
||||
NeedsSystem.DropRate = 60
|
||||
NeedsSystem.DropValueHunger = 1
|
||||
NeedsSystem.DropValueThirst = 1
|
||||
NeedsSystem.NewPlayerHunger = 64
|
||||
NeedsSystem.NewPlayerThirst = 64
|
||||
[worldserver]
|
||||
|
||||
Needs.Enable = 1
|
||||
Needs.MaxValue = 255
|
||||
Needs.LowValue = 16
|
||||
Needs.CriticalValue = 5
|
||||
Needs.DropRate = 60
|
||||
Needs.DropValueHunger = 1
|
||||
Needs.DropValueThirst = 1
|
||||
Needs.NewPlayerHunger = 64
|
||||
Needs.NewPlayerThirst = 64
|
||||
|
|
|
@ -49,15 +49,15 @@ public:
|
|||
|
||||
void OnBeforeConfigLoad(bool /* reload */) override
|
||||
{
|
||||
NeedsEnabled = sConfigMgr->GetOption<bool>("NeedsSystem.Enabled", true);
|
||||
NeedsMaxValue = sConfigMgr->GetOption<uint8>("NeedsSystem.MaxValue", 255);
|
||||
NeedsLowValue = sConfigMgr->GetOption<uint8>("NeedsSystem.LowValue", 16);
|
||||
NeedsCriticalValue = sConfigMgr->GetOption<uint8>("NeedsSystem.CriticalValue", 5);
|
||||
NeedsDropRate = sConfigMgr->GetOption<uint32>("NeedsSystem.DropRate", 60);
|
||||
NeedsDropValueHunger = sConfigMgr->GetOption<uint8>("NeedsSystem.DropValueHunger", 1);
|
||||
NeedsDropValueThirst = sConfigMgr->GetOption<uint8>("NeedsSystem.DropValueThirst", 1);
|
||||
NeedsNewPlayerHunger = sConfigMgr->GetOption<uint8>("NeedsSystem.NewPlayerHunger", 64);
|
||||
NeedsNewPlayerThirst = sConfigMgr->GetOption<uint8>("NeedsSystem.NewPlayerThirst", 64);
|
||||
NeedsEnabled = sConfigMgr->GetOption<bool>("Needs.Enabled", true);
|
||||
NeedsMaxValue = sConfigMgr->GetOption<uint8>("Needs.MaxValue", 255);
|
||||
NeedsLowValue = sConfigMgr->GetOption<uint8>("Needs.LowValue", 16);
|
||||
NeedsCriticalValue = sConfigMgr->GetOption<uint8>("Needs.CriticalValue", 5);
|
||||
NeedsDropRate = sConfigMgr->GetOption<uint32>("Needs.DropRate", 60);
|
||||
NeedsDropValueHunger = sConfigMgr->GetOption<uint8>("Needs.DropValueHunger", 1);
|
||||
NeedsDropValueThirst = sConfigMgr->GetOption<uint8>("Needs.DropValueThirst", 1);
|
||||
NeedsNewPlayerHunger = sConfigMgr->GetOption<uint8>("Needs.NewPlayerHunger", 64);
|
||||
NeedsNewPlayerThirst = sConfigMgr->GetOption<uint8>("Needs.NewPlayerThirst", 64);
|
||||
}
|
||||
|
||||
void OnStartup() override
|
||||
|
|
Loading…
Reference in New Issue