mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
CMake: Use inherited dependencies in scripts
* Removes the circular dependency between game <-> scripts
This commit is contained in:
@@ -22,10 +22,10 @@
|
||||
#include "DBCStores.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "ScriptLoader.h"
|
||||
#include "ScriptSystem.h"
|
||||
#include "Transport.h"
|
||||
#include "Vehicle.h"
|
||||
#include "SmartAI.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellScript.h"
|
||||
#include "GossipDef.h"
|
||||
@@ -240,7 +240,8 @@ struct TSpellSummary
|
||||
uint8 Effects; // set of enum SelectEffect
|
||||
} *SpellSummary;
|
||||
|
||||
ScriptMgr::ScriptMgr() : _scriptCount(0), _scheduledScripts(0)
|
||||
ScriptMgr::ScriptMgr()
|
||||
: _scriptCount(0), _scheduledScripts(0), _script_loader_callback(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -261,7 +262,13 @@ void ScriptMgr::Initialize()
|
||||
TC_LOG_INFO("server.loading", "Loading C++ scripts");
|
||||
|
||||
FillSpellSummary();
|
||||
AddScripts();
|
||||
|
||||
AddSC_SmartScripts();
|
||||
|
||||
ASSERT(_script_loader_callback,
|
||||
"Script loader callback wasn't registered!");
|
||||
|
||||
_script_loader_callback();
|
||||
|
||||
#ifdef SCRIPTS
|
||||
for (std::string const& scriptName : UnusedScriptNames)
|
||||
|
||||
Reference in New Issue
Block a user