mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-28 04:42:10 +01:00
[7271] Implement mangosd stop and pause if it work as Windows service. Author: rilex
--HG-- branch : trunk
This commit is contained in:
@@ -39,6 +39,11 @@
|
||||
#define WORLD_SLEEP_CONST 100 //Is this still needed?? [On linux some time ago not working 50ms]
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#include "ServiceWin32.h"
|
||||
extern int m_ServiceStatus;
|
||||
#endif
|
||||
|
||||
/// Heartbeat for the World
|
||||
void WorldRunnable::run()
|
||||
{
|
||||
@@ -73,6 +78,11 @@ void WorldRunnable::run()
|
||||
}
|
||||
else
|
||||
prevSleepTime = 0;
|
||||
|
||||
#ifdef WIN32
|
||||
if (m_ServiceStatus == 0) World::StopNow(SHUTDOWN_EXIT_CODE);
|
||||
while (m_ServiceStatus == 2) Sleep(1000);
|
||||
#endif
|
||||
}
|
||||
|
||||
sWorld.KickAll(); // save and kick all players
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7270"
|
||||
#define REVISION_NR "7271"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
||||
Reference in New Issue
Block a user