mirror of
https://github.com/alexkulya/pandaria_5.4.8.git
synced 2025-12-13 04:37:00 +00:00
17 lines
1.1 KiB
Text
17 lines
1.1 KiB
Text
** HOW TO SCRIPT IN C++ **
|
|
|
|
=========================================================
|
|
WARNING: THIS DOCUMENTATION IS NOT ALWAYS UP TO DATE.
|
|
FOR MORE UP-TO-DATE INFORMATION, CHECK THE TRINITY WIKI.
|
|
=========================================================
|
|
|
|
1 - create a file myscript.cpp in the scripts/custom folder.
|
|
2 - Find the appropriate examples script in the scripts/examples folder and copy its contents.
|
|
Don't forget to rename the classes as appropriate!
|
|
3 - Rename the AddSC functions as appropriate.
|
|
4 - Make sure to change the initializations in the AddSC function to the appropriate script names!
|
|
5 - Under ScriptLoader.cpp, add your AddSC function near the top and in AddCustomScripts(), call it.
|
|
6 - Add your myscript.cpp file to the scripts CMakeLists.txt: under: set(scripts_STAT_SRCS add: Custom/myscript.cpp
|
|
7 - Redefine the virtual functions you want to override in your script.
|
|
8 - If the script you are writing is database bound, add the scriptname to the appropriate location in the database.
|
|
9 - Recompile and restart the server, and your script should be up and running.
|