mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/PacketIO: Removed PacketFilter::DropHighBytes
This commit is contained in:
@@ -56,8 +56,7 @@ std::string const DefaultPlayerName = "<none>";
|
||||
|
||||
bool MapSessionFilter::Process(WorldPacket* packet)
|
||||
{
|
||||
Opcodes opcode = DropHighBytes(packet->GetOpcode());
|
||||
OpcodeHandler const* opHandle = opcodeTable[opcode];
|
||||
OpcodeHandler const* opHandle = opcodeTable[packet->GetOpcode()];
|
||||
|
||||
//let's check if our opcode can be really processed in Map::Update()
|
||||
if (opHandle->ProcessingPlace == PROCESS_INPLACE)
|
||||
@@ -79,8 +78,7 @@ bool MapSessionFilter::Process(WorldPacket* packet)
|
||||
//OR packet handler is not thread-safe!
|
||||
bool WorldSessionFilter::Process(WorldPacket* packet)
|
||||
{
|
||||
Opcodes opcode = DropHighBytes(packet->GetOpcode());
|
||||
OpcodeHandler const* opHandle = opcodeTable[opcode];
|
||||
OpcodeHandler const* opHandle = opcodeTable[packet->GetOpcode()];
|
||||
//check if packet handler is supposed to be safe
|
||||
if (opHandle->ProcessingPlace == PROCESS_INPLACE)
|
||||
return true;
|
||||
|
||||
@@ -144,7 +144,6 @@ public:
|
||||
|
||||
virtual bool Process(WorldPacket* /*packet*/) { return true; }
|
||||
virtual bool ProcessLogout() const { return true; }
|
||||
static Opcodes DropHighBytes(Opcodes opcode) { return Opcodes(opcode & 0xFFFF); }
|
||||
|
||||
protected:
|
||||
WorldSession* const m_pSession;
|
||||
|
||||
@@ -162,7 +162,7 @@ bool WorldSocket::ReadDataHandler()
|
||||
{
|
||||
ClientPktHeader* header = reinterpret_cast<ClientPktHeader*>(_headerBuffer.GetReadPointer());
|
||||
|
||||
Opcodes opcode = PacketFilter::DropHighBytes(Opcodes(header->cmd));
|
||||
Opcodes opcode(header->cmd);
|
||||
|
||||
std::string opcodeName = GetOpcodeNameForLogging(opcode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user