mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +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:
@@ -561,6 +561,13 @@ public:
|
||||
*/
|
||||
virtual void OnCreatureRemoveWorld(Creature* /*creature*/) { }
|
||||
|
||||
/**
|
||||
* @brief This hook runs after creature has been saved to DB
|
||||
*
|
||||
* @param creature Contains information about the Creature
|
||||
*/
|
||||
virtual void OnCreatureSaveToDB(Creature* /*creature*/) { }
|
||||
|
||||
/**
|
||||
* @brief This hook called when a player opens a gossip dialog with the creature.
|
||||
*
|
||||
@@ -643,7 +650,12 @@ public:
|
||||
* @param go Contains information about the GameObject
|
||||
*/
|
||||
virtual void OnGameObjectAddWorld(GameObject* /*go*/) { }
|
||||
|
||||
/**
|
||||
* @brief This hook runs after the game object iis saved to the database
|
||||
*
|
||||
* @param go Contains information about the GameObject
|
||||
*/
|
||||
virtual void OnGameObjectSaveToDB(GameObject* /*go*/) { }
|
||||
/**
|
||||
* @brief This hook runs after remove game object in world
|
||||
*
|
||||
@@ -2392,6 +2404,10 @@ public: /* AllCreatureScript */
|
||||
//listener function (OnAllCreatureUpdate) is called by OnCreatureUpdate
|
||||
//void OnAllCreatureUpdate(Creature* creature, uint32 diff);
|
||||
void Creature_SelectLevel(const CreatureTemplate* cinfo, Creature* creature);
|
||||
void OnCreatureSaveToDB(Creature* creature);
|
||||
|
||||
public: /* AllGameobjectScript */
|
||||
void OnGameObjectSaveToDB(GameObject* go);
|
||||
|
||||
public: /* AllMapScript */
|
||||
void OnBeforeCreateInstanceScript(InstanceMap* instanceMap, InstanceScript* instanceData, bool load, std::string data, uint32 completedEncounterMask);
|
||||
|
||||
Reference in New Issue
Block a user