mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 19:13:49 +00:00
Added Hook
* This hook can be used to cache module database tables.
This commit is contained in:
@@ -482,6 +482,12 @@ void ScriptMgr::OnOpenStateChange(bool open)
|
|||||||
FOREACH_SCRIPT(WorldScript)->OnOpenStateChange(open);
|
FOREACH_SCRIPT(WorldScript)->OnOpenStateChange(open);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ScriptMgr::OnLoadCustomDatabeTable()
|
||||||
|
{
|
||||||
|
FOREACH_SCRIPT(WorldScript)->OnLoadCustomDatabeTable();
|
||||||
|
}
|
||||||
|
|
||||||
void ScriptMgr::OnBeforeConfigLoad(bool reload)
|
void ScriptMgr::OnBeforeConfigLoad(bool reload)
|
||||||
{
|
{
|
||||||
#ifdef ELUNA
|
#ifdef ELUNA
|
||||||
|
|||||||
@@ -245,6 +245,9 @@ class WorldScript : public ScriptObject
|
|||||||
// Called after the world configuration is (re)loaded.
|
// Called after the world configuration is (re)loaded.
|
||||||
virtual void OnAfterConfigLoad(bool /*reload*/) { }
|
virtual void OnAfterConfigLoad(bool /*reload*/) { }
|
||||||
|
|
||||||
|
// Called when loading custom database tables
|
||||||
|
virtual void OnLoadCustomDatabeTable() { }
|
||||||
|
|
||||||
// Called before the world configuration is (re)loaded.
|
// Called before the world configuration is (re)loaded.
|
||||||
virtual void OnBeforeConfigLoad(bool /*reload*/) { }
|
virtual void OnBeforeConfigLoad(bool /*reload*/) { }
|
||||||
|
|
||||||
@@ -1132,6 +1135,7 @@ class ScriptMgr
|
|||||||
|
|
||||||
public: /* WorldScript */
|
public: /* WorldScript */
|
||||||
|
|
||||||
|
void OnLoadCustomDatabeTable();
|
||||||
void OnOpenStateChange(bool open);
|
void OnOpenStateChange(bool open);
|
||||||
void OnBeforeConfigLoad(bool reload);
|
void OnBeforeConfigLoad(bool reload);
|
||||||
void OnAfterConfigLoad(bool reload);
|
void OnAfterConfigLoad(bool reload);
|
||||||
|
|||||||
@@ -1355,6 +1355,9 @@ void World::SetInitialWorldSettings()
|
|||||||
stmt->setUInt32(0, 3 * DAY);
|
stmt->setUInt32(0, 3 * DAY);
|
||||||
CharacterDatabase.Execute(stmt);
|
CharacterDatabase.Execute(stmt);
|
||||||
|
|
||||||
|
///- Custom Hook for loading DB items
|
||||||
|
sScriptMgr->OnLoadCustomDatabeTable();
|
||||||
|
|
||||||
///- Load the DBC files
|
///- Load the DBC files
|
||||||
sLog->outString("Initialize data stores...");
|
sLog->outString("Initialize data stores...");
|
||||||
LoadDBCStores(m_dataPath);
|
LoadDBCStores(m_dataPath);
|
||||||
|
|||||||
Reference in New Issue
Block a user