mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 09:39:11 +00:00
feat(Core/Hooks): Add OnAfterDatabaseLoadCreatureTemplates hook (#17621)
* Add OnAfterDatabaseLoadCreatureTemplates hook - fix issue where the fast template cache was not updated correctly after a CS reload of a single creature template * Parameter naming tweak to reduce confusion. * Refactor to streamline fastcache creation, remove threading concerns * Remove unneeded resize when loading creature templates * Update fast cache resizing to highest-performing option
This commit is contained in:
@@ -25,3 +25,11 @@ void ScriptMgr::OnAfterDatabasesLoaded(uint32 updateFlags)
|
||||
script->OnAfterDatabasesLoaded(updateFlags);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnAfterDatabaseLoadCreatureTemplates(std::vector<CreatureTemplate*> creatureTemplates)
|
||||
{
|
||||
ExecuteScript<DatabaseScript>([&](DatabaseScript* script)
|
||||
{
|
||||
script->OnAfterDatabaseLoadCreatureTemplates(creatureTemplates);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user