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:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user