From aba24628ba8050ac3ee667ecae6c4f9a075ad54d Mon Sep 17 00:00:00 2001 From: Chaz Brown Date: Sat, 25 Apr 2009 13:35:46 -0400 Subject: Fix TrinityScripts to use the correct config file when -c config_name.conf is used on the trinitycore commandline, thanks to gixxer_j for getting me to finally fix it, and for testing the patch. Be sure to do a full recompile, or you may get errors, this may even require a fresh pull from the repo for some. --HG-- branch : trunk --- src/bindings/scripts/ScriptMgr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/bindings/scripts/ScriptMgr.cpp') diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 8049612f7fa..d2a2c07706c 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -933,7 +933,7 @@ void ScriptsFree() } TRINITY_DLL_EXPORT -void ScriptsInit() +void ScriptsInit(char const* cfg_file = "trinitycore.conf") { bool CanLoadDB = true; @@ -948,12 +948,12 @@ void ScriptsInit() outstring_log(""); //Get configuration file - if (!TScriptConfig.SetSource(_TRINITY_SCRIPT_CONFIG)) + if (!TScriptConfig.SetSource(cfg_file)) { CanLoadDB = false; error_log("TSCR: Unable to open configuration file. Database will be unaccessible. Configuration values will use default."); } - else outstring_log("TSCR: Using configuration file %s",_TRINITY_SCRIPT_CONFIG); + else outstring_log("TSCR: Using configuration file %s",cfg_file); outstring_log(""); -- cgit v1.2.3