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
@@ -473,7 +473,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
void WorldSession::HandleEmoteOpcode(WorldPacket & recv_data)
{
if (!GetPlayer()->isAlive() || GetPlayer()->hasUnitState(UNIT_STAT_DIED))
if (!GetPlayer()->isAlive() || GetPlayer()->hasUnitState(UNIT_STAT_DIED))
return;
uint32 emote;
@@ -358,7 +358,7 @@ void WorldSession::HandleGuildBankerActivate(WorldPacket & recv_data)
{
if (Guild* pGuild = _GetPlayerGuild(this))
pGuild->SendBankTabsInfo(this);
else
else
Guild::SendCommandResult(this, GUILD_UNK1, ERR_GUILD_PLAYER_NOT_IN_GUILD);
}
}
@@ -144,7 +144,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
_player->OnGossipSelect(unit, gossipListId, menuId);
}
else
{
{
go->AI()->GossipSelectCode(_player, menuId, gossipListId, code.c_str());
sScriptMgr.OnGossipSelectCode(_player, go, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str());
}
@@ -225,7 +225,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
if(!(proto->Flags & ITEM_PROTO_FLAG_OPENABLE) && !pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))
{
pUser->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
sLog.outError("Possible hacking attempt: Player %s [guid: %u] tried to open item [guid: %u, entry: %u] which is not openable!",
sLog.outError("Possible hacking attempt: Player %s [guid: %u] tried to open item [guid: %u, entry: %u] which is not openable!",
pUser->GetName(), pUser->GetGUIDLow(), pItem->GetGUIDLow(), proto->ItemId);
return;
}