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
+1 -1
View File
@@ -1411,7 +1411,7 @@ void ConditionMgr::Clean()
m_ConditionMap.clear();
for (VehicleSpellConditionMap::iterator itr = m_VehicleSpellConditions.begin(); itr != m_VehicleSpellConditions.end(); ++itr)
{
for (ConditionTypeMap::iterator it = itr->second.begin(); it != itr->second.end(); ++it)
+4 -4
View File
@@ -93,7 +93,7 @@ void DisableMgr::LoadDisables()
sLog.outErrorDb("Disable flags for spell %u are invalid, skipped.", entry);
continue;
}
if (flags & SPELL_DISABLE_MAP)
{
Tokens tokens(params_0, ',');
@@ -239,18 +239,18 @@ bool DisableMgr::IsDisabledFor(DisableType type, uint32 entry, Unit const* pUnit
if ((flags & SPELL_DISABLE_PLAYER && pUnit->GetTypeId() == TYPEID_PLAYER) ||
(pUnit->GetTypeId() == TYPEID_UNIT && (pUnit->ToCreature()->isPet() && flags & SPELL_DISABLE_PET || flags & SPELL_DISABLE_CREATURE)))
{
if (flags & SPELL_DISABLE_MAP)
{
std::set<uint32> const& mapIds = itr->second.params[0];
if (mapIds.find(pUnit->GetMapId()) != mapIds.end())
return true; // Spell is disabled on current map
if (!(flags & SPELL_DISABLE_AREA))
return false; // Spell is disabled on another map, but not this one, return false
// Spell is disabled in an area, but not explicitly our current mapId. Continue processing.
// Spell is disabled in an area, but not explicitly our current mapId. Continue processing.
}
if (flags & SPELL_DISABLE_AREA)
+1 -1
View File
@@ -41,7 +41,7 @@ enum SpellDisableTypes
SPELL_DISABLE_DEPRECATED_SPELL = 0x8,
SPELL_DISABLE_MAP = 0x10,
SPELL_DISABLE_AREA = 0x20,
MAX_SPELL_DISABLE_TYPE = ( SPELL_DISABLE_PLAYER | SPELL_DISABLE_CREATURE | SPELL_DISABLE_PET |
MAX_SPELL_DISABLE_TYPE = ( SPELL_DISABLE_PLAYER | SPELL_DISABLE_CREATURE | SPELL_DISABLE_PET |
SPELL_DISABLE_DEPRECATED_SPELL | SPELL_DISABLE_MAP | SPELL_DISABLE_AREA),
};