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
@@ -1359,12 +1359,20 @@ enum SessionStatus
STATUS_UNHANDLED, // Opcode not handled yet
};
enum PacketProcessing
{
PROCESS_INPLACE = 0, //process packet whenever we receive it - mostly for non-handled or non-implemented packets
PROCESS_THREADUNSAFE, //packet is not thread-safe - process it in World::UpdateSessions()
PROCESS_THREADSAFE //packet is thread-safe - process it in Map::Update()
};
class WorldPacket;
struct OpcodeHandler
{
char const* name;
SessionStatus status;
PacketProcessing packetProcessing;
void (WorldSession::*handler)(WorldPacket& recvPacket);
};