mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
feat(Core/DB): Add Hooks On creature/game object save to db (#11246)
* implement OnCreatureSaveToDB and OnGameObjectSaveToDB Hooks * fix Whitespaces in ScriptMgr.h Co-authored-by: Timothée Moos <t1997.m@gmx.net>
This commit is contained in:
@@ -38,6 +38,16 @@ void ScriptMgr::OnCreatureRemoveWorld(Creature* creature)
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnCreatureSaveToDB(Creature* creature)
|
||||
{
|
||||
ASSERT(creature);
|
||||
|
||||
ExecuteScript<AllCreatureScript>([&](AllCreatureScript* script)
|
||||
{
|
||||
script->OnCreatureSaveToDB(creature);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::Creature_SelectLevel(const CreatureTemplate* cinfo, Creature* creature)
|
||||
{
|
||||
ExecuteScript<AllCreatureScript>([&](AllCreatureScript* script)
|
||||
|
||||
@@ -37,3 +37,13 @@ void ScriptMgr::OnGameObjectRemoveWorld(GameObject* go)
|
||||
script->OnGameObjectRemoveWorld(go);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnGameObjectSaveToDB(GameObject* go)
|
||||
{
|
||||
ASSERT(go);
|
||||
|
||||
ExecuteScript<AllGameObjectScript>([&](AllGameObjectScript* script)
|
||||
{
|
||||
script->OnGameObjectSaveToDB(go);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user