#include "Opcodes.h"
#include "Log.h"
#include "Packets/AllPackets.h"
#include "WorldSession.h"
#include <iomanip>
#include <sstream>
Go to the source code of this file.
◆ DEFINE_HANDLER
#define DEFINE_HANDLER |
( |
|
opcode, |
|
|
|
status, |
|
|
|
processing, |
|
|
|
handler |
|
) |
| ValidateAndSetClientOpcode<decltype(handler), handler>(opcode, #opcode, status, processing) |
◆ DEFINE_SERVER_OPCODE_HANDLER
#define DEFINE_SERVER_OPCODE_HANDLER |
( |
|
opcode, |
|
|
|
status |
|
) |
| |
Value:
ValidateAndSetServerOpcode(opcode, #opcode, status)
@ STATUS_NEVER
Definition: Opcodes.h:1360
@ STATUS_UNHANDLED
Definition: Opcodes.h:1361
◆ GetOpcodeNameForLoggingImpl()
template<typename T >
std::string GetOpcodeNameForLoggingImpl |
( |
T |
id | ) |
|
|
inline |
1449{
1451 std::ostringstream ss;
1452 ss << '[';
1453
1455 {
1457 ss << handler->Name;
1458 else
1459 ss << "UNKNOWN OPCODE";
1460 }
1461 else
1462 ss << "INVALID OPCODE";
1463
1464 ss << " 0x" << std::hex << std::setw(4) << std::setfill('0') << std::uppercase << opcode << std::nouppercase << std::dec << " (" << opcode << ")]";
1465 return ss.str();
1466}
std::uint16_t uint16
Definition: Define.h:108
OpcodeTable opcodeTable
Definition: Opcodes.cpp:51
@ NUM_OPCODE_HANDLERS
Definition: Opcodes.h:1346
Definition: Opcodes.h:1375
References NUM_OPCODE_HANDLERS, and opcodeTable.
Referenced by GetOpcodeNameForLogging().