Core/PacketIO: Removed PacketFilter::DropHighBytes

This commit is contained in:
Shauren
2014-10-11 23:40:51 +02:00
parent cbabfe9920
commit 665b1daab7
3 changed files with 3 additions and 6 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);