refactor: ServerEvent - OnStartup, OnBeforeConfigLoad, OnConfigLoad (#311)

This commit is contained in:
iThorgrim
2025-09-16 21:57:52 +02:00
committed by GitHub
parent 576d18753c
commit 04ce900383
5 changed files with 33 additions and 13 deletions

View File

@@ -227,11 +227,10 @@ void Eluna::OnOpenStateChange(bool open)
CallAllFunctions(ServerEventBindings, key);
}
void Eluna::OnConfigLoad(bool reload, bool isBefore)
void Eluna::OnAfterConfigLoad(bool reload)
{
START_HOOK(WORLD_EVENT_ON_CONFIG_LOAD);
START_HOOK(WORLD_EVENT_ON_AFTER_CONFIG_LOAD);
Push(reload);
Push(isBefore);
CallAllFunctions(ServerEventBindings, key);
}
@@ -278,6 +277,19 @@ void Eluna::OnShutdown()
CallAllFunctions(ServerEventBindings, key);
}
void Eluna::OnBeforeWorldInitialized()
{
START_HOOK(WORLD_EVENT_ON_BEFORE_WORLD_INITIALIZED);
CallAllFunctions(ServerEventBindings, key);
}
void Eluna::OnBeforeConfigLoad(bool reload)
{
START_HOOK(WORLD_EVENT_ON_BEFORE_CONFIG_LOAD);
Push(reload);
CallAllFunctions(ServerEventBindings, key);
}
/* Map */
void Eluna::OnCreate(Map* map)
{