Refactored singletons to enable proper deconstruction during shutdown

This commit is contained in:
leak
2014-07-20 00:39:43 +02:00
parent d2c120f2c2
commit dce92611f3
39 changed files with 83 additions and 84 deletions

View File

@@ -797,13 +797,13 @@ bool AuthSession::_HandleRealmList()
uint32 id = fields[0].GetUInt32();
// Update realm list if need
sRealmList.UpdateIfNeed();
sRealmList->UpdateIfNeed();
// Circle through realms in the RealmList and construct the return packet (including # of user characters in each realm)
ByteBuffer pkt;
size_t RealmListSize = 0;
for (RealmList::RealmMap::const_iterator i = sRealmList.begin(); i != sRealmList.end(); ++i)
for (RealmList::RealmMap::const_iterator i = sRealmList->begin(); i != sRealmList->end(); ++i)
{
const Realm &realm = i->second;
// don't work with realms which not compatible with the client