mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Added base BG methods and hooks
This has only been tested on Mangos Zero and will definitely need tweaking on Trinity More methods will be added SHORTLY
This commit is contained in:
@@ -601,6 +601,17 @@ namespace LuaGlobalFunctions
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RegisterBGEvent(lua_State* L)
|
||||
{
|
||||
uint32 ev = Eluna::CHECKVAL<uint32>(L, 1);
|
||||
luaL_checktype(L, 2, LUA_TFUNCTION);
|
||||
lua_pushvalue(L, 2);
|
||||
int functionRef = luaL_ref(L, LUA_REGISTRYINDEX);
|
||||
if (functionRef > 0)
|
||||
sEluna->Register(HookMgr::REGTYPE_BG, 0, ev, functionRef);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ReloadEluna(lua_State* /*L*/)
|
||||
{
|
||||
Eluna::reload = true;
|
||||
|
||||
Reference in New Issue
Block a user