TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PacketHandler< PacketClass, HandlerFunction > Class Template Reference

Public Member Functions

 PacketHandler (char const *name, SessionStatus status, PacketProcessing processing)
 
void Call (WorldSession *session, WorldPacket &packet) const override
 
- Public Member Functions inherited from ClientOpcodeHandler
 ClientOpcodeHandler (char const *name, SessionStatus status, PacketProcessing processing)
 
- Public Member Functions inherited from OpcodeHandler
 OpcodeHandler (char const *name, SessionStatus status)
 
virtual ~OpcodeHandler ()
 

Additional Inherited Members

- Public Attributes inherited from ClientOpcodeHandler
PacketProcessing ProcessingPlace
 
- Public Attributes inherited from OpcodeHandler
char constName
 
SessionStatus Status
 

Constructor & Destructor Documentation

template<class PacketClass, void(WorldSession::*)(PacketClass &) HandlerFunction>
PacketHandler< PacketClass, HandlerFunction >::PacketHandler ( char const name,
SessionStatus  status,
PacketProcessing  processing 
)
inline
27 : ClientOpcodeHandler(name, status, processing) { }
ClientOpcodeHandler(char const *name, SessionStatus status, PacketProcessing processing)
Definition: Opcodes.h:1711

Member Function Documentation

template<class PacketClass, void(WorldSession::*)(PacketClass &) HandlerFunction>
void PacketHandler< PacketClass, HandlerFunction >::Call ( WorldSession session,
WorldPacket packet 
) const
inlineoverridevirtual

Implements ClientOpcodeHandler.

30  {
31  PacketClass nicePacket(std::move(packet));
32  nicePacket.Read();
33  (session->*HandlerFunction)(nicePacket);
34  }

The documentation for this class was generated from the following file: