diff options
author | Naios <naios-dev@live.de> | 2016-04-18 20:29:42 +0200 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2016-04-18 21:02:01 +0200 |
commit | 86b0fcf67aadc0d313253befb0590d00efd085bc (patch) | |
tree | 823ed6666acfff5599dfcca38f589dce275552f0 /src/common/Configuration/Config.h | |
parent | 081720b5dd5a80aa77181712d85d309d64d3ec03 (diff) |
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.
Diffstat (limited to 'src/common/Configuration/Config.h')
-rw-r--r-- | src/common/Configuration/Config.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/Configuration/Config.h b/src/common/Configuration/Config.h index 10113cd88d3..573bc7b4a15 100644 --- a/src/common/Configuration/Config.h +++ b/src/common/Configuration/Config.h @@ -23,6 +23,7 @@ #include <string> #include <list> +#include <vector> #include <mutex> #include <boost/property_tree/ptree.hpp> @@ -35,7 +36,8 @@ class TC_COMMON_API ConfigMgr public: /// Method used only for loading main configuration files (authserver.conf and worldserver.conf) - bool LoadInitial(std::string const& file, std::string& error); + bool LoadInitial(std::string const& file, std::vector<std::string> args, + std::string& error); static ConfigMgr* instance(); @@ -47,10 +49,12 @@ public: float GetFloatDefault(std::string const& name, float def) const; std::string const& GetFilename(); + std::vector<std::string> const& GetArguments() const { return _args; } std::list<std::string> GetKeysByString(std::string const& name); private: std::string _filename; + std::vector<std::string> _args; boost::property_tree::ptree _config; std::mutex _configLock; |