Core: Add new system for parallelizing client packet processing. Handle WorldSession updates in Map::Update() where we are safe to proceed. Patch by Ambal.

(And clean up tabs and whitespace while rummaging around in there)
Closes issue 5084.

--HG--
branch : trunk
This commit is contained in:
click
2010-12-13 22:37:56 +01:00
parent 89a33bbf61
commit 2642894342
58 changed files with 1625 additions and 1502 deletions
+8 -3
View File
@@ -1175,7 +1175,7 @@ void World::LoadConfigSettings(bool reload)
// Dungeon finder
m_bool_configs[CONFIG_DUNGEON_FINDER_ENABLE] = sConfig.GetBoolDefault("DungeonFinder.Enable", false);
// DBC_ItemAttributes
m_bool_configs[CONFIG_DBC_ENFORCE_ITEM_ATTRIBUTES] = sConfig.GetBoolDefault("DBC.EnforceItemAttributes", true);
@@ -2510,12 +2510,17 @@ void World::UpdateSessions(uint32 diff)
++next;
///- and remove not active sessions from the list
if (!itr->second->Update(diff)) // As interval = 0
WorldSession * pSession = itr->second;
WorldSessionFilter updater(pSession);
if(!pSession->Update(diff, updater)) // As interval = 0
{
if (!RemoveQueuedPlayer(itr->second) && itr->second && getIntConfig(CONFIG_INTERVAL_DISCONNECT_TOLERANCE))
m_disconnects[itr->second->GetAccountId()] = time(NULL);
delete itr->second;
RemoveQueuedPlayer(pSession);
m_sessions.erase(itr);
delete pSession;
}
}
}