TrinityCore
Loading...
Searching...
No Matches
Opcodes.cpp File Reference
#include "Opcodes.h"
#include "Log.h"
#include "Util.h"
#include "WorldSession.h"
#include "Packets/AllPackets.h"
#include <charconv>
+ Include dependency graph for Opcodes.cpp:

Go to the source code of this file.

Classes

struct  get_packet_class< T >
 
struct  get_packet_class< void(WorldSession::*)(PacketClass &)>
 

Macros

#define DEFINE_HANDLER(opcode, status, processing, handler)    ValidateAndSetClientOpcode(opcode, #opcode, status, &CallHandlerWrapper<typename get_packet_class<decltype(handler)>::type, handler>, processing)
 
#define DEFINE_SERVER_OPCODE_HANDLER(opcode, status, con)
 

Functions

template<typename OpcodeDefinition , std::size_t N, typename T , typename FormatContext >
static FormatContext::iterator GetOpcodeNameForLoggingImpl (std::array< OpcodeDefinition, N > const &definitions, T id, FormatContext &ctx)
 

Variables

OpcodeTable opcodeTable
 

Macro Definition Documentation

◆ DEFINE_HANDLER

#define DEFINE_HANDLER (   opcode,
  status,
  processing,
  handler 
)     ValidateAndSetClientOpcode(opcode, #opcode, status, &CallHandlerWrapper<typename get_packet_class<decltype(handler)>::type, handler>, processing)

◆ DEFINE_SERVER_OPCODE_HANDLER

#define DEFINE_SERVER_OPCODE_HANDLER (   opcode,
  status,
  con 
)
Value:
static_assert((status) == STATUS_NEVER || (status) == STATUS_UNHANDLED, "Invalid status for server opcode"); \
ValidateAndSetServerOpcode(opcode, #opcode, status, con)
@ STATUS_NEVER
Definition Opcodes.h:2550
@ STATUS_UNHANDLED
Definition Opcodes.h:2551

Function Documentation

◆ GetOpcodeNameForLoggingImpl()

template<typename OpcodeDefinition , std::size_t N, typename T , typename FormatContext >
static FormatContext::iterator GetOpcodeNameForLoggingImpl ( std::array< OpcodeDefinition, N > const &  definitions,
id,
FormatContext &  ctx 
)
inlinestatic

Definition at line 2565 of file Opcodes.cpp.

+ Here is the call graph for this function:

Variable Documentation

◆ opcodeTable

OpcodeTable opcodeTable

Definition at line 37 of file Opcodes.cpp.