AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
PacketHandler< PacketClass, HandlerFunction > Class Template Reference
Inheritance diagram for PacketHandler< PacketClass, HandlerFunction >:
ClientOpcodeHandler OpcodeHandler

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)
 
virtual void Call (WorldSession *session, WorldPacket &packet) const =0
 
- Public Member Functions inherited from OpcodeHandler
 OpcodeHandler (char const *name, SessionStatus status)
 
virtual ~OpcodeHandler ()=default
 

Additional Inherited Members

- Public Attributes inherited from ClientOpcodeHandler
PacketProcessing ProcessingPlace
 
- Public Attributes inherited from OpcodeHandler
char const * Name
 
SessionStatus Status
 

Detailed Description

template<class PacketClass, void(WorldSession::*)(PacketClass &) HandlerFunction>
class PacketHandler< PacketClass, HandlerFunction >

Constructor & Destructor Documentation

◆ PacketHandler()

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

Member Function Documentation

◆ Call()

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

Implements ClientOpcodeHandler.

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