feat(Core/Scripts): new OnBeforeFinalizePlayerWorldSession() hook (#7136)

Co-authored-by: Yehonal <yehonal.azeroth@gmail.com>
This commit is contained in:
Kaytotes
2021-08-22 12:41:19 +01:00
committed by GitHub
parent 75e55e21df
commit d18545263f
5 changed files with 37 additions and 7 deletions

View File

@@ -194,6 +194,13 @@ public:
// Called when the world is actually shut down.
virtual void OnShutdown() { }
/**
* @brief This hook runs before finalizing the player world session. Can be also used to mutate the cache version of the Client.
*
* @param version The cache version that we will be sending to the Client.
*/
virtual void OnBeforeFinalizePlayerWorldSession(uint32& /*cacheVersion*/) {}
};
class FormulaScript : public ScriptObject
@@ -1466,6 +1473,7 @@ public: /* WorldScript */
void OnOpenStateChange(bool open);
void OnBeforeConfigLoad(bool reload);
void OnAfterConfigLoad(bool reload);
void OnBeforeFinalizePlayerWorldSession(uint32& cacheVersion);
void OnMotdChange(std::string& newMotd);
void OnShutdownInitiate(ShutdownExitCode code, ShutdownMask mask);
void OnShutdownCancel();