Core/Misc: Add console option to update databases only

Add "--update-databases-only" console argument to stop worldserver execution after having updated all databases (if specified in config file)

(cherry picked from commit 92bf5b1ba795303808c5f1b3bf82dd0204133ed8)
This commit is contained in:
jackpoz authored and funjoker committed 2020-05-19 00:49:24 +02:00
1 parent e428623f61
commit c62ebf6e36
1 file changed
+4
+4
View File
@@ -221,6 +221,9 @@ extern int main(int argc, char** argv)
if (!StartDB())
return 1;
if (vm.count("update-databases-only"))
return 0;
std::shared_ptr<void> dbHandle(nullptr, [](void*) { StopDB(); });
// Set server offline (not connectable)
@@ -641,6 +644,7 @@ variables_map GetConsoleArguments(int argc, char** argv, fs::path& configFile, s
("version,v", "print version build info")
("config,c", value<fs::path>(&configFile)->default_value(fs::absolute(_TRINITY_CORE_CONFIG)),
"use <arg> as configuration file")
("update-databases-only,u", "updates databases only")
;
#ifdef _WIN32
options_description win("Windows platform specific options");