mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Auth/Realmlist: Make use of RealmFlags and rename color to flag (core- and dbwise)
Also fix connecting with realmflag & 4
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include "Timer.h"
|
||||
#include "Util.h"
|
||||
#include "AuthSocket.h"
|
||||
#include "RealmList.h"
|
||||
|
||||
#include "BigNumber.h"
|
||||
|
||||
@@ -162,7 +163,7 @@ int Master::Run()
|
||||
return 1;
|
||||
|
||||
// set server offline (not connectable)
|
||||
LoginDatabase.DirectPExecute("UPDATE realmlist SET color = (color & ~%u) | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, REALM_FLAG_INVALID, realmID);
|
||||
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = (flag & ~%u) | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, REALM_FLAG_INVALID, realmID);
|
||||
|
||||
///- Initialize the World
|
||||
sWorld->SetInitialWorldSettings();
|
||||
@@ -273,7 +274,7 @@ int Master::Run()
|
||||
}
|
||||
|
||||
// set server online (allow connecting now)
|
||||
LoginDatabase.DirectPExecute("UPDATE realmlist SET color = color & ~%u, population = 0 WHERE id = '%u'", REALM_FLAG_INVALID, realmID);
|
||||
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag & ~%u, population = 0 WHERE id = '%u'", REALM_FLAG_INVALID, realmID);
|
||||
|
||||
sLog->outString("%s (worldserver-daemon) ready...", _FULLVERSION);
|
||||
sWorldSocketMgr->Wait();
|
||||
@@ -286,7 +287,7 @@ int Master::Run()
|
||||
}
|
||||
|
||||
// set server offline
|
||||
LoginDatabase.DirectPExecute("UPDATE realmlist SET color = color | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, realmID);
|
||||
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, realmID);
|
||||
|
||||
// when the main thread closes the singletons get unloaded
|
||||
// since worldrunnable uses them, it will crash if unloaded after master
|
||||
|
||||
Reference in New Issue
Block a user