├── .editorconfig ├── .git_commit_template.txt ├── .gitattributes ├── .github └── workflows │ ├── build-lua52.yml │ ├── build-luajit.yml │ └── core-build-base.yml ├── .gitignore ├── CMakeLists.txt ├── COMMUNITY_UPDATES.md ├── LICENSE ├── README.md ├── README_CN.md ├── README_ES.md ├── _config.yml ├── conf └── mod_eluna.conf.dist ├── icon.png ├── include.sh ├── sql ├── README.md ├── auth │ └── .gitkeep ├── characters │ └── .gitkeep └── world │ └── .gitkeep └── src ├── ElunaLuaEngine_SC.cpp ├── LuaEngine ├── .editorconfig ├── .github │ └── workflows │ │ ├── build.yml │ │ ├── create-pr.sh │ │ └── documentation.yml ├── BindingMap.h ├── CMakeLists.txt ├── ElunaCompat.cpp ├── ElunaCompat.h ├── ElunaCreatureAI.h ├── ElunaDBCRegistry.cpp ├── ElunaDBCRegistry.h ├── ElunaEventMgr.cpp ├── ElunaEventMgr.h ├── ElunaIncludes.h ├── ElunaInstanceAI.cpp ├── ElunaInstanceAI.h ├── ElunaTemplate.h ├── ElunaUtility.cpp ├── ElunaUtility.h ├── HookHelpers.h ├── Hooks.h ├── HttpManager.cpp ├── HttpManager.h ├── LuaEngine.cpp ├── LuaEngine.h ├── LuaFunctions.cpp ├── docs │ ├── .gitignore │ ├── CONTRIBUTING.md │ ├── DOC_GEN.md │ ├── Eluna.png │ ├── ElunaDoc │ │ ├── .gitignore │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── parser.py │ │ ├── static │ │ │ ├── FiraSans-Medium.woff │ │ │ ├── FiraSans-Regular.woff │ │ │ ├── Heuristica-Italic.woff │ │ │ ├── SourceCodePro-Regular.woff │ │ │ ├── SourceCodePro-Semibold.woff │ │ │ ├── SourceSerifPro-Bold.woff │ │ │ ├── SourceSerifPro-Regular.woff │ │ │ ├── dark.css │ │ │ ├── eluna-logo.png │ │ │ ├── favicon.ico │ │ │ ├── jquery.js │ │ │ ├── main.css │ │ │ ├── main.js │ │ │ └── normalize.css │ │ └── templates │ │ │ ├── _base.html │ │ │ ├── class.html │ │ │ ├── date.js │ │ │ ├── enum.html │ │ │ ├── index.html │ │ │ ├── method.html │ │ │ ├── search-index.js │ │ │ └── sidebar.js │ ├── IMPL_DETAILS.md │ ├── INSTALL.md │ ├── MERGING.md │ └── USAGE.md ├── extensions │ ├── ObjectVariables.ext │ ├── StackTracePlus │ │ ├── LICENSE │ │ ├── README.md │ │ └── StackTracePlus.ext │ └── _Misc.ext ├── hooks │ ├── BattleGroundHooks.cpp │ ├── CreatureHooks.cpp │ ├── GameObjectHooks.cpp │ ├── GossipHooks.cpp │ ├── GroupHooks.cpp │ ├── GuildHooks.cpp │ ├── InstanceHooks.cpp │ ├── ItemHooks.cpp │ ├── PacketHooks.cpp │ ├── PlayerHooks.cpp │ ├── ServerHooks.cpp │ ├── SpellHooks.cpp │ ├── TicketHooks.cpp │ └── VehicleHooks.cpp ├── libs │ ├── httplib.h │ └── rigtorp │ │ └── SPSCQueue.h ├── lmarshal.cpp ├── lmarshal.h └── methods │ ├── AchievementMethods.h │ ├── AuraMethods.h │ ├── BattleGroundMethods.h │ ├── ChatHandlerMethods.h │ ├── CorpseMethods.h │ ├── CreatureMethods.h │ ├── ElunaQueryMethods.h │ ├── GameObjectMethods.h │ ├── GemPropertiesEntryMethods.h │ ├── GlobalMethods.h │ ├── GroupMethods.h │ ├── GuildMethods.h │ ├── ItemMethods.h │ ├── ItemTemplateMethods.h │ ├── MapMethods.h │ ├── ObjectMethods.h │ ├── PlayerMethods.h │ ├── QuestMethods.h │ ├── RollMethods.h │ ├── SpellEntryMethods.h │ ├── SpellInfoMethods.h │ ├── SpellMethods.h │ ├── TicketMethods.h │ ├── UnitMethods.h │ ├── VehicleMethods.h │ ├── WorldObjectMethods.h │ └── WorldPacketMethods.h ├── eluna_loader.cpp └── lualib ├── lua ├── CMakeLists.txt └── lua.hpp └── luajit └── CMakeLists.txt /.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | indent_style = space 4 | indent_size = 4 5 | tab_width = 4 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | max_line_length = 80 9 | -------------------------------------------------------------------------------- /.git_commit_template.txt: -------------------------------------------------------------------------------- 1 | ### TITLE 2 | ## Type(Scope/Subscope): Commit ultra short explanation 3 | ## |---- Write below the examples with a maximum of 50 characters ----| 4 | ## Example 1: fix(DB/SAI): Missing spell to NPC Hogger 5 | ## Example 2: fix(CORE/Raid): Phase 2 of Ragnaros 6 | ## Example 3: feat(CORE/Commands): New GM command to do something 7 | 8 | 9 | ### DESCRIPTION 10 | ## Explain why this change is being made, what does it fix etc... 11 | ## |---- Write below the examples with a maximum of 72 characters per lines ----| 12 | ## Example: Hogger (id: 492) was not charging player when being engaged. 13 | 14 | 15 | ## Provide links to any issue, commit, pull request or other resource 16 | ## Example 1: Closes issue #23 17 | ## Example 2: Ported from other project's commit (link) 18 | ## Example 3: References taken from wowpedia / wowhead / wowwiki / https://wowgaming.altervista.org/aowow/ 19 | 20 | 21 | 22 | ## ======================================================= 23 | ## EXTRA INFOS 24 | ## ======================================================= 25 | ## "Type" can be: 26 | ## feat (new feature) 27 | ## fix (bug fix) 28 | ## refactor (refactoring production code) 29 | ## style (formatting, missing semi colons, etc; no code change) 30 | ## docs (changes to documentation) 31 | ## test (adding or refactoring tests; no production code change) 32 | ## chore (updating bash scripts, git files etc; no production code change) 33 | ## -------------------- 34 | ## Remember to 35 | ## Capitalize the subject line 36 | ## Use the imperative mood in the subject line 37 | ## Do not end the subject line with a period 38 | ## Separate subject from body with a blank line 39 | ## Use the body to explain what and why rather than how 40 | ## Can use multiple lines with "-" for bullet points in body 41 | ## -------------------- 42 | ## More info here https://www.conventionalcommits.org/en/v1.0.0-beta.2/ 43 | ## ======================================================= 44 | ## "Scope" can be: 45 | ## CORE (core related, c++) 46 | ## DB (database related, sql) 47 | ## ======================================================= 48 | ## "Subscope" is optional and depends on the nature of the commit. 49 | ## ======================================================= 50 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ## AUTO-DETECT 2 | ## Handle line endings automatically for files detected as 3 | ## text and leave all files detected as binary untouched. 4 | ## This will handle all files NOT defined below. 5 | * text=auto eol=lf 6 | 7 | # Text 8 | *.conf text 9 | *.conf.dist text 10 | *.cmake text 11 | 12 | ## Scripts 13 | *.sh text 14 | *.fish text 15 | *.lua text 16 | 17 | ## SQL 18 | *.sql text 19 | 20 | ## C++ 21 | *.c text 22 | *.cc text 23 | *.cxx text 24 | *.cpp text 25 | *.c++ text 26 | *.hpp text 27 | *.h text 28 | *.h++ text 29 | *.hh text 30 | 31 | 32 | ## For documentation 33 | 34 | # Documents 35 | *.doc diff=astextplain 36 | *.DOC diff=astextplain 37 | *.docx diff=astextplain 38 | *.DOCX diff=astextplain 39 | *.dot diff=astextplain 40 | *.DOT diff=astextplain 41 | *.pdf diff=astextplain 42 | *.PDF diff=astextplain 43 | *.rtf diff=astextplain 44 | *.RTF diff=astextplain 45 | 46 | ## DOCUMENTATION 47 | *.markdown text 48 | *.md text 49 | *.mdwn text 50 | *.mdown text 51 | *.mkd text 52 | *.mkdn text 53 | *.mdtxt text 54 | *.mdtext text 55 | *.txt text 56 | AUTHORS text 57 | CHANGELOG text 58 | CHANGES text 59 | CONTRIBUTING text 60 | COPYING text 61 | copyright text 62 | *COPYRIGHT* text 63 | INSTALL text 64 | license text 65 | LICENSE text 66 | NEWS text 67 | readme text 68 | *README* text 69 | TODO text 70 | 71 | ## GRAPHICS 72 | *.ai binary 73 | *.bmp binary 74 | *.eps binary 75 | *.gif binary 76 | *.ico binary 77 | *.jng binary 78 | *.jp2 binary 79 | *.jpg binary 80 | *.jpeg binary 81 | *.jpx binary 82 | *.jxr binary 83 | *.pdf binary 84 | *.png binary 85 | *.psb binary 86 | *.psd binary 87 | *.svg text 88 | *.svgz binary 89 | *.tif binary 90 | *.tiff binary 91 | *.wbmp binary 92 | *.webp binary 93 | 94 | 95 | ## ARCHIVES 96 | *.7z binary 97 | *.gz binary 98 | *.jar binary 99 | *.rar binary 100 | *.tar binary 101 | *.zip binary 102 | 103 | ## EXECUTABLES 104 | *.exe binary 105 | *.pyc binary 106 | -------------------------------------------------------------------------------- /.github/workflows/build-lua52.yml: -------------------------------------------------------------------------------- 1 | name: Build mod-eluna with Lua52 🌙 2 | 3 | on: 4 | push: 5 | branches: 6 | - 'master' 7 | - 'main' 8 | pull_request: 9 | 10 | jobs: 11 | build_lua52: 12 | uses: ./.github/workflows/core-build-base.yml 13 | with: 14 | lua_version: 'lua52' 15 | -------------------------------------------------------------------------------- /.github/workflows/build-luajit.yml: -------------------------------------------------------------------------------- 1 | name: Build mod-eluna with LuaJIT 🌙 2 | 3 | on: 4 | push: 5 | branches: 6 | - 'master' 7 | - 'main' 8 | pull_request: 9 | 10 | jobs: 11 | build_luajit: 12 | uses: ./.github/workflows/core-build-base.yml 13 | with: 14 | lua_version: 'luajit' 15 | -------------------------------------------------------------------------------- /.github/workflows/core-build-base.yml: -------------------------------------------------------------------------------- 1 | name: Build mod-eluna base 🛠️ 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | lua_version: 7 | required: true 8 | type: string 9 | 10 | jobs: 11 | install_and_build: 12 | runs-on: ubuntu-24.04 13 | steps: 14 | - name: Check out AzerothCore 🧑💻 15 | uses: actions/checkout@v4 16 | with: 17 | repository: 'azerothcore/azerothcore-wotlk' 18 | ref: 'master' 19 | submodules: 'recursive' 20 | fetch-depth: 0 21 | 22 | - name: Check out module repository 📂 23 | uses: actions/checkout@v4 24 | with: 25 | submodules: 'recursive' 26 | path: 'modules/${{ github.event.repository.name }}' 27 | fetch-depth: 0 28 | ref: ${{ github.event.pull_request.head.sha }} 29 | 30 | - name: Cache compilation artifacts 💾 31 | uses: actions/cache@v4 32 | with: 33 | path: var/ccache 34 | key: ccache:${{ matrix.compiler.CC }}:${{ github.ref }}:${{ github.sha }} 35 | restore-keys: | 36 | ccache:clang-18:${{ github.ref }} 37 | ccache:clang-18 38 | 39 | - name: Install build dependencies 🧰 40 | shell: bash 41 | run: | 42 | sudo apt update 43 | sudo apt-get -y install ccache clang cmake curl google-perftools \ 44 | libmysqlclient-dev make unzip build-essential cmake-data \ 45 | libboost-all-dev libbz2-dev libncurses5-dev libmysql++-dev \ 46 | libreadline6-dev libssl-dev libtool openssl zlib1g-dev 47 | 48 | - name: Build mod-eluna with ${{ inputs.lua_version }} 🏗️ 49 | run: | 50 | rm -rf build 51 | mkdir build && cd build 52 | cmake .. \ 53 | -DCMAKE_C_COMPILER=clang-18 \ 54 | -DCMAKE_CXX_COMPILER=clang++-18 \ 55 | -DSCRIPTS="static" \ 56 | -DMODULES="static" \ 57 | -DWITH_WARNINGS="ON" \ 58 | -DCMAKE_BUILD_TYPE="Release" \ 59 | -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ 60 | -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ 61 | -DCMAKE_C_FLAGS="-Werror" \ 62 | -DCMAKE_CXX_FLAGS="-Werror" \ 63 | -DLUA_VERSION=${{ inputs.lua_version }} 64 | make -j$(nproc) 65 | cd .. 66 | 67 | - name: Run Cppcheck for static code analysis 🔍 68 | run: | 69 | sudo apt update -y 70 | sudo apt install -y cppcheck 71 | cd modules/${{ github.event.repository.name }} 72 | cppcheck -j$(nproc) --force --inline-suppr \ 73 | -I src/LuaEngine/ \ 74 | -I src/ \ 75 | --suppress=*:src/lualib/* \ 76 | --suppress=*:src/LuaEngine/libs/* \ 77 | --output-file=report.txt \ 78 | . 79 | if [ -s report.txt ]; then 80 | echo "Cppcheck detected issues 🚨:" 81 | cat report.txt 82 | exit 1 83 | else 84 | echo "No issues detected by cppcheck ✅." 85 | fi 86 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore 2 | 3 | # 4 | #Generic 5 | # 6 | 7 | .directory 8 | .mailmap 9 | *.orig 10 | *.rej 11 | *.*~ 12 | .hg/ 13 | *.kdev* 14 | .DS_Store 15 | CMakeLists.txt.user 16 | *.bak 17 | *.patch 18 | *.diff 19 | *.REMOTE.* 20 | *.BACKUP.* 21 | *.BASE.* 22 | *.LOCAL.* 23 | 24 | # 25 | # IDE & other softwares 26 | # 27 | /.settings/ 28 | /.externalToolBuilders/* 29 | # exclude in all levels 30 | nbproject/ 31 | .sync.ffs_db 32 | *.kate-swp 33 | 34 | # 35 | # Eclipse 36 | # 37 | *.pydevproject 38 | .metadata 39 | .gradle 40 | tmp/ 41 | *.tmp 42 | *.swp 43 | *~.nib 44 | local.properties 45 | .settings/ 46 | .loadpath 47 | .project 48 | .cproject 49 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LUA_VERSION "lua52" CACHE STRING "Lua version to use") 2 | set_property(CACHE LUA_VERSION PROPERTY STRINGS luajit lua51 lua52 lua53 lua54) 3 | MESSAGE(STATUS "Lua version: ${LUA_VERSION}") 4 | 5 | # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24: 6 | if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") 7 | cmake_policy(SET CMP0135 NEW) 8 | endif() 9 | 10 | option(LUA_STATIC "link lua statically" ON) 11 | if (LUA_STATIC) 12 | MESSAGE(STATUS "Lua linking: static") 13 | else() 14 | MESSAGE(STATUS "Lua linking: dynamic") 15 | endif() 16 | 17 | if (LUA_VERSION MATCHES "luajit") 18 | add_subdirectory(src/lualib/luajit) 19 | set(LUAJIT_VERSION true) 20 | else() 21 | add_subdirectory(src/lualib/lua) 22 | set(LUAJIT_VERSION false) 23 | endif() 24 | 25 | set_target_properties(lualib PROPERTIES INTERFACE_COMPILE_DEFINITIONS LUAJIT_VERSION) 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |