feat(Cmake): add support new script loader api (#49)

This commit is contained in:
Kargatum
2021-07-26 02:12:15 +07:00
committed by GitHub
parent 9ff36b8318
commit eb62c1e0f2
4 changed files with 14 additions and 23 deletions

View File

@@ -1,10 +0,0 @@
# Add cpp files
AC_ADD_SCRIPT("${CMAKE_CURRENT_LIST_DIR}/src/transmog_scripts.cpp")
AC_ADD_SCRIPT("${CMAKE_CURRENT_LIST_DIR}/src/Transmogrification.cpp")
# Add scripts to script loader
AC_ADD_SCRIPT_LOADER("Transmog" "${CMAKE_CURRENT_LIST_DIR}/src/transmog_scripts_loader.h" "SC_Npc_VisualWeapon")
# Add config file
AC_ADD_CONFIG_FILE("${CMAKE_CURRENT_LIST_DIR}/conf/transmog.conf.dist")

13
src/transmog_loader.cpp Normal file
View File

@@ -0,0 +1,13 @@
/*
* 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>
*/
// From SC
void AddSC_Transmog();
// Add all
void Addmod_transmogScripts()
{
AddSC_Transmog();
}

View File

@@ -472,7 +472,7 @@ public:
}
};
void AddSC_transmog()
void AddSC_Transmog()
{
new global_transmog_script();
new npc_transmogrifier();

View File

@@ -1,12 +0,0 @@
#ifndef TRANSMOGR_SCRIPTS_LOADER_H
#define TRANSMOGR_SCRIPTS_LOADER_H
void AddSC_transmog();
void AddTransmogScripts()
{
AddSC_transmog();
}
#endif /* TRANSMOG_SCRIPTS_LOADER_H */