[UCS] Consolidate configuration block (#3768)

* [UCS] Consolidate configuration block

* Update eqemu_config.cpp

* Single indent config

* reload config internally

* Make sure port is a string to be consistent with previous fields

* Move conversion logic to function CheckUcsConfigConversion
This commit is contained in:
Chris Miles
2024-01-06 21:55:51 -06:00
committed by GitHub
parent c4da9766a4
commit a3a707adae
7 changed files with 133 additions and 51 deletions
+7 -8
View File
@@ -62,14 +62,6 @@ class EQEmuConfig
std::string SharedKey;
bool DisableConfigChecks;
// From <chatserver/>
std::string ChatHost;
uint16 ChatPort;
// From <mailserver/>
std::string MailHost;
uint16 MailPort;
// From <database/>
std::string DatabaseHost;
std::string DatabaseUsername;
@@ -122,12 +114,18 @@ class EQEmuConfig
bool auto_database_updates;
const std::string &GetUCSHost() const;
uint16 GetUCSPort() const;
// uint16 DynamicCount;
// map<string,uint16> StaticZones;
protected:
std::string m_ucs_host;
uint16 m_ucs_port;
static EQEmuConfig *_config;
Json::Value _root;
static std::string ConfigFile;
@@ -186,6 +184,7 @@ class EQEmuConfig
}
void Dump() const;
void CheckUcsConfigConversion();
};
#endif