From b1c5c2aa71f080b8e9c8d6f3d12ab6b1ba2afa78 Mon Sep 17 00:00:00 2001 From: Yehonal Date: Sun, 19 Feb 2017 22:55:06 +0100 Subject: [PATCH] Moved onStartup hook under Master.cpp to avoid issues with freezing check --- src/worldserver/Master.cpp | 3 +++ src/worldserver/WorldThread/WorldRunnable.cpp | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/worldserver/Master.cpp b/src/worldserver/Master.cpp index 3eef8ee3e..340f3ca29 100644 --- a/src/worldserver/Master.cpp +++ b/src/worldserver/Master.cpp @@ -30,6 +30,7 @@ #include "Util.h" #include "AuthSocket.h" #include "RealmList.h" +#include "ScriptMgr.h" #include "BigNumber.h" #include "OpenSSLCrypto.h" @@ -155,6 +156,8 @@ int Master::Run() ///- Initialize the World sWorld->SetInitialWorldSettings(); + sScriptMgr->OnStartup(); + ///- Initialize the signal handlers WorldServerSignalHandler signalINT, signalTERM; //, signalSEGV #ifdef _WIN32 diff --git a/src/worldserver/WorldThread/WorldRunnable.cpp b/src/worldserver/WorldThread/WorldRunnable.cpp index 8270744f6..f02dafbab 100644 --- a/src/worldserver/WorldThread/WorldRunnable.cpp +++ b/src/worldserver/WorldThread/WorldRunnable.cpp @@ -33,8 +33,6 @@ void WorldRunnable::run() uint32 realCurrTime = 0; uint32 realPrevTime = getMSTime(); - sScriptMgr->OnStartup(); - ///- While we have not World::m_stopEvent, update the world while (!World::IsStopped()) {