mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 16:10:49 +01:00
Core/Scripting: Use the path of the worldserver executable to search for the scripts dir
* Fixes issues when starting the worldserver not in the bin directory or the CMAKE_INSTALL_PREFIX directory using the -c option.
This commit is contained in:
@@ -25,11 +25,13 @@
|
||||
|
||||
using namespace boost::property_tree;
|
||||
|
||||
bool ConfigMgr::LoadInitial(std::string const& file, std::string& error)
|
||||
bool ConfigMgr::LoadInitial(std::string const& file, std::vector<std::string> args,
|
||||
std::string& error)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_configLock);
|
||||
|
||||
_filename = file;
|
||||
_args = args;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -65,7 +67,7 @@ ConfigMgr* ConfigMgr::instance()
|
||||
|
||||
bool ConfigMgr::Reload(std::string& error)
|
||||
{
|
||||
return LoadInitial(_filename, error);
|
||||
return LoadInitial(_filename, std::move(_args), error);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
||||
Reference in New Issue
Block a user