Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RegisterSpellEvent #213

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

iThorgrim
Copy link

@iThorgrim iThorgrim commented Jan 12, 2025

This add new RegisterEvent for Spell (RegisterSpellEvent) with 3 hook (for the moment):

SPELL_EVENT_ON_PREPARE                          = 1, // (caster, spell, spellInfo)
SPELL_EVENT_ON_CAST                             = 2, // (caster, spell, spellInfo, skipCheck)
SPELL_EVENT_ON_CAST_CANCEL                      = 3, // (caster, spell, spellInfo, bySelf)

This required AC PR : azerothcore/azerothcore-wotlk#21149
This required Eluna PR : #211

iThorgrim and others added 5 commits January 9, 2025 17:05
### Eluna Module Updates: Lua Version and Static Linking Support

Recent updates to the **Eluna** module in **AzerothCore** introduce new configuration options to manage Lua versions and static linking:

- **`-DLUA_VERSION=luajit/lua52/lua53/lua54`**: Select the Lua version for the module, supporting LuaJIT, Lua 5.2, 5.3, or 5.4.
- **`-DLUA_STATIC=on/off`**: Configure whether Lua should be linked statically or dynamically.

These options allow flexible Lua integration, building on Eluna's existing capabilities to handle different Lua versions. The changes also improve compatibility and performance by enabling static linking where needed.

#### Integration with Eluna

This functionality extends Eluna's existing support for Lua compatibility, mainly in **ElunaCompat.cpp**, which handles Lua version-specific interactions. These updates enhance Eluna’s adaptability for various Lua configurations in **AzerothCore**.
@55Honey
Copy link
Member

55Honey commented Jan 12, 2025

Do me a favor and reference the original eluna commits again. Thanks!

src/LuaEngine/hooks/SpellHooks.cpp Outdated Show resolved Hide resolved
@iThorgrim
Copy link
Author

iThorgrim commented Jan 12, 2025

Do me a favor and reference the original eluna commits again. Thanks!

It's not based on Eluna's work, it's “just” a copy/paste of RegisterCreatureEvent, but if you want it's Eluna's git commit: ElunaLuaEngine@c952ad5

@iThorgrim iThorgrim requested a review from 55Honey January 12, 2025 15:15
Copy link
Member

@55Honey 55Honey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a test for a few kinds of different events at least. Then it is good to go IMO. Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants