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 92bf5b1ba7)
This commit is contained in:
jackpoz
2019-03-17 21:34:13 +01:00
committed by funjoker
parent e428623f61
commit c62ebf6e36

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");