azerothcore / mod-eluna

Eluna Lua Engine © for WoW Emulators
https://elunaluaengine.github.io/
GNU General Public License v3.0
100 stars 130 forks source link

Feature: Added GetUnitFlags(), GetUnitFlagsTwo(), SetUnitFlags(flags), SetUnitFlagsTwo(flags), Added PlayerEvent OnApplyAura/OnRemoveAura #137

Closed New-HavenWotLK closed 1 year ago

New-HavenWotLK commented 1 year ago

Implemented the stated methods to the source... tested them... they worked fine! =D

138

New-HavenWotLK commented 1 year ago

@Helias if u got some time, could u check it out pls? =D

thx in advance! ^.^

New-HavenWotLK commented 1 year ago

added also now 2 new hooks which i have tested as well =)

they worked fine when checking the hooks via a print statement =D

Helias commented 1 year ago

thanks for your PR! If the pipeline will pass successfully I will merge this PR

Helias commented 1 year ago

error in the build

/home/runner/work/mod-eluna/mod-eluna/modules/mod-eluna/src/LuaEngine/PlayerHooks.cpp:694:13: fatal error: out-of-line definition of 'OnApplyAura' does not match any declaration in 'Eluna'
void Eluna::OnApplyAura(Player* player, Aura* aura, bool isNewAura)
            ^~~~~~~~~~~
1 error generated.
make[2]: *** [modules/CMakeFiles/modules.dir/build.make:328: modules/CMakeFiles/modules.dir/mod-eluna/src/LuaEngine/PlayerHooks.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1199: modules/CMakeFiles/modules.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
New-HavenWotLK commented 1 year ago

ah uups... XD seems i forgot to add some parts from my source on server to the forked repo ^^''

i will look to fix this when i am home =)

New-HavenWotLK commented 1 year ago

sooo i think now there should be all properly added

shouldn't add stuff by hand when i already am half asleep ^^'

Helias commented 1 year ago

@r-o-b-o-t-o what do you think?

r-o-b-o-t-o commented 1 year ago

Just noticed this now while looking into https://github.com/azerothcore/mod-eluna/issues/144, you're using hooks that don't exist for your aura events... I didn't notice the missing overrides in ElunaLuaEngine_SC.cpp when reviewing. Since the real aura hooks are in UnitScript and not PlayerScript I'm afraid I will have to revert this part of the PR, since we don't have Unit hooks.