diff options
author | Kargatum <dowlandtop@yandex.com> | 2021-06-23 04:19:02 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 23:19:02 +0200 |
commit | 5991b2769acc2f7c1959f1850a36a22c968bb45c (patch) | |
tree | 86ffae3a32cf14f00784a8a0c458d1644b438e4b /src/server/scripts/ScriptLoader.cpp.in.cmake | |
parent | 20a67cbfcf78e830fce746ee1a7ea16db2f4ca80 (diff) |
feat(Core/Scripts): split the huge scriptloader into smaller pieces (#5346)
* feat(Core/Scripts): split the huge scriptloader into smaller pieces
* AddSC_swamp_of_sorrows del
* 1
* add mod info
* 1
* 039f0e0faa081352d19f34b6f0abaa4e74414988
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Diffstat (limited to 'src/server/scripts/ScriptLoader.cpp.in.cmake')
-rw-r--r-- | src/server/scripts/ScriptLoader.cpp.in.cmake | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/server/scripts/ScriptLoader.cpp.in.cmake b/src/server/scripts/ScriptLoader.cpp.in.cmake new file mode 100644 index 0000000000..8e1f182433 --- /dev/null +++ b/src/server/scripts/ScriptLoader.cpp.in.cmake @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 + * Copyright (C) 2021+ WarheadCore <https://github.com/WarheadCore> + */ + +// This file was created automatically from your script configuration! +// Use CMake to reconfigure this file, never change it on your own! + +#cmakedefine ACORE_IS_DYNAMIC_SCRIPTLOADER + +#include "Define.h" +#include <vector> +#include <string> + +// Add deprecated api loaders include +@AC_SCRIPTS_INCLUDES@ +// Add module scripts define +@AC_MODULE_LIST@ +// Add default scripts include +@ACORE_SCRIPTS_FORWARD_DECL@ +#ifdef ACORE_IS_DYNAMIC_SCRIPTLOADER +# include "revision.h" +# define AC_SCRIPT_API AC_API_EXPORT +extern "C" { + +/// Exposed in script modules to return the script module revision hash. +AC_SCRIPT_API char const* GetScriptModuleRevisionHash() +{ + return _HASH; +} + +/// Exposed in script module to return the name of the script module +/// contained in this shared library. +AC_SCRIPT_API char const* GetScriptModule() +{ + return "@ACORE_CURRENT_SCRIPT_PROJECT@"; +} + +#else +# include "ScriptLoader.h" +# define AC_SCRIPT_API +#endif + +/// Exposed in script modules to register all scripts to the ScriptMgr. +AC_SCRIPT_API void AddScripts() +{ + // Default scripts and modules +@ACORE_SCRIPTS_INVOKE@ + // Deprecated api modules +@AC_SCRIPTS_LIST@} + +/// Exposed in script modules to get the build directive of the module. +AC_SCRIPT_API char const* GetBuildDirective() +{ + return _BUILD_DIRECTIVE; +} + +#ifdef ACORE_IS_DYNAMIC_SCRIPTLOADER +} // extern "C" +#endif |