Feat(AllCreatureEvent): Add RegisterAllCreatureEvent and support for CreatureTemplate object. (#312)

This commit is contained in:
iThorgrim
2025-09-17 11:54:52 +02:00
committed by GitHub
parent 1153fcaef7
commit 313596f86e
7 changed files with 207 additions and 20 deletions

View File

@@ -70,6 +70,8 @@ luaL_Reg GlobalMethods[] =
{ "RegisterInstanceEvent", &LuaGlobalFunctions::RegisterInstanceEvent },
{ "RegisterTicketEvent", &LuaGlobalFunctions::RegisterTicketEvent },
{ "RegisterSpellEvent", &LuaGlobalFunctions::RegisterSpellEvent },
{ "RegisterAllCreatureEvent", &LuaGlobalFunctions::RegisterAllCreatureEvent },
{ "ClearBattleGroundEvents", &LuaGlobalFunctions::ClearBattleGroundEvents },
{ "ClearCreatureEvents", &LuaGlobalFunctions::ClearCreatureEvents },
@@ -89,6 +91,7 @@ luaL_Reg GlobalMethods[] =
{ "ClearInstanceEvents", &LuaGlobalFunctions::ClearInstanceEvents },
{ "ClearTicketEvents", &LuaGlobalFunctions::ClearTicketEvents },
{ "ClearSpellEvents", &LuaGlobalFunctions::ClearSpellEvents },
{ "ClearAllCreatureEvents", &LuaGlobalFunctions::ClearAllCreatureEvents },
// Getters
{ "GetLuaEngine", &LuaGlobalFunctions::GetLuaEngine },
@@ -1931,7 +1934,7 @@ void RegisterFunctions(Eluna* E)
ElunaTemplate<GmTicket>::Register(E, "Ticket");
ElunaTemplate<GmTicket>::SetMethods(E, TicketMethods);
ElunaTemplate<SpellInfo>::Register(E, "SpellInfo");
ElunaTemplate<SpellInfo>::SetMethods(E, SpellInfoMethods);
@@ -1941,6 +1944,8 @@ void RegisterFunctions(Eluna* E)
ElunaTemplate<SpellEntry>::Register(E, "SpellEntry");
ElunaTemplate<SpellEntry>::SetMethods(E, SpellEntryMethods);
ElunaTemplate<CreatureTemplate>::Register(E, "CreatureTemplate");
ElunaTemplate<long long>::Register(E, "long long", true);
ElunaTemplate<unsigned long long>::Register(E, "unsigned long long", true);