TrinityCore
Warden Class Referenceabstract

#include <Warden.h>

+ Inheritance diagram for Warden:

Public Member Functions

 Warden ()
 
virtual ~Warden ()
 
virtual void Init (WorldSession *session, SessionKey const &K)=0
 
void Update (uint32 diff)
 
void HandleData (ByteBuffer &buff)
 
bool ProcessLuaCheckResponse (std::string const &msg)
 
virtual size_t DEBUG_ForceSpecificChecks (std::vector< uint16 > const &checks)=0
 

Protected Member Functions

void DecryptData (uint8 *buffer, uint32 length)
 
void EncryptData (uint8 *buffer, uint32 length)
 
virtual void InitializeModule ()=0
 
virtual void RequestHash ()=0
 
virtual void HandleHashResult (ByteBuffer &buff)=0
 
virtual void HandleCheckResult (ByteBuffer &buff)=0
 
virtual void InitializeModuleForClient (ClientWardenModule &module)=0
 
virtual void RequestChecks ()=0
 
void MakeModuleForClient ()
 
void SendModuleToClient ()
 
void RequestModule ()
 
char const * ApplyPenalty (WardenCheck const *check)
 

Static Protected Member Functions

static bool IsValidCheckSum (uint32 checksum, const uint8 *data, const uint16 length)
 
static uint32 BuildChecksum (const uint8 *data, uint32 length)
 

Protected Attributes

WorldSession_session
 
std::array< uint8, 16 > _inputKey = {}
 
std::array< uint8, 16 > _outputKey = {}
 
std::array< uint8, 16 > _seed = {}
 
Trinity::Crypto::ARC4 _inputCrypto
 
Trinity::Crypto::ARC4 _outputCrypto
 
uint32 _checkTimer
 
uint32 _clientResponseTimer
 
bool _dataSent
 
Optional< ClientWardenModule_module
 
bool _initialized
 

Detailed Description

Definition at line 84 of file Warden.h.

Constructor & Destructor Documentation

◆ Warden()

Warden::Warden ( )

Definition at line 33 of file Warden.cpp.

◆ ~Warden()

Warden::~Warden ( )
virtual

Definition at line 38 of file Warden.cpp.

Member Function Documentation

◆ ApplyPenalty()

char const * Warden::ApplyPenalty ( WardenCheck const *  check)
protected

Definition at line 175 of file Warden.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildChecksum()

uint32 Warden::BuildChecksum ( const uint8 data,
uint32  length 
)
staticprotected

Definition at line 164 of file Warden.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DEBUG_ForceSpecificChecks()

virtual size_t Warden::DEBUG_ForceSpecificChecks ( std::vector< uint16 > const &  checks)
pure virtual

Implemented in WardenMac, and WardenWin.

+ Here is the caller graph for this function:

◆ DecryptData()

void Warden::DecryptData ( uint8 buffer,
uint32  length 
)
protected

Definition at line 132 of file Warden.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EncryptData()

void Warden::EncryptData ( uint8 buffer,
uint32  length 
)
protected

Definition at line 137 of file Warden.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleCheckResult()

virtual void Warden::HandleCheckResult ( ByteBuffer buff)
protectedpure virtual

Implemented in WardenMac, and WardenWin.

+ Here is the caller graph for this function:

◆ HandleData()

void Warden::HandleData ( ByteBuffer buff)

Definition at line 209 of file Warden.cpp.

+ Here is the call graph for this function:

◆ HandleHashResult()

virtual void Warden::HandleHashResult ( ByteBuffer buff)
protectedpure virtual

Implemented in WardenMac, and WardenWin.

+ Here is the caller graph for this function:

◆ Init()

virtual void Warden::Init ( WorldSession session,
SessionKey const &  K 
)
pure virtual

Implemented in WardenMac, and WardenWin.

◆ InitializeModule()

virtual void Warden::InitializeModule ( )
protectedpure virtual

Implemented in WardenMac, and WardenWin.

+ Here is the caller graph for this function:

◆ InitializeModuleForClient()

virtual void Warden::InitializeModuleForClient ( ClientWardenModule module)
protectedpure virtual

Implemented in WardenMac, and WardenWin.

+ Here is the caller graph for this function:

◆ IsValidCheckSum()

bool Warden::IsValidCheckSum ( uint32  checksum,
const uint8 data,
const uint16  length 
)
staticprotected

Definition at line 142 of file Warden.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeModuleForClient()

void Warden::MakeModuleForClient ( )
protected

Definition at line 43 of file Warden.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessLuaCheckResponse()

bool Warden::ProcessLuaCheckResponse ( std::string const &  msg)

Definition at line 244 of file Warden.cpp.

+ Here is the call graph for this function:

◆ RequestChecks()

virtual void Warden::RequestChecks ( )
protectedpure virtual

Implemented in WardenMac, and WardenWin.

+ Here is the caller graph for this function:

◆ RequestHash()

virtual void Warden::RequestHash ( )
protectedpure virtual

Implemented in WardenMac, and WardenWin.

+ Here is the caller graph for this function:

◆ RequestModule()

void Warden::RequestModule ( )
protected

Definition at line 79 of file Warden.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendModuleToClient()

void Warden::SendModuleToClient ( )
protected

Definition at line 51 of file Warden.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Update()

void Warden::Update ( uint32  diff)

Definition at line 101 of file Warden.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ _checkTimer

uint32 Warden::_checkTimer
protected

Definition at line 124 of file Warden.h.

◆ _clientResponseTimer

uint32 Warden::_clientResponseTimer
protected

Definition at line 125 of file Warden.h.

◆ _dataSent

bool Warden::_dataSent
protected

Definition at line 126 of file Warden.h.

◆ _initialized

bool Warden::_initialized
protected

Definition at line 128 of file Warden.h.

◆ _inputCrypto

Trinity::Crypto::ARC4 Warden::_inputCrypto
protected

Definition at line 122 of file Warden.h.

◆ _inputKey

std::array<uint8, 16> Warden::_inputKey = {}
protected

Definition at line 119 of file Warden.h.

◆ _module

Optional<ClientWardenModule> Warden::_module
protected

Definition at line 127 of file Warden.h.

◆ _outputCrypto

Trinity::Crypto::ARC4 Warden::_outputCrypto
protected

Definition at line 123 of file Warden.h.

◆ _outputKey

std::array<uint8, 16> Warden::_outputKey = {}
protected

Definition at line 120 of file Warden.h.

◆ _seed

std::array<uint8, 16> Warden::_seed = {}
protected

Definition at line 121 of file Warden.h.

◆ _session

WorldSession* Warden::_session
protected

Definition at line 118 of file Warden.h.


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