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