diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-06-19 23:20:06 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-06-19 23:20:06 -0300 |
commit | 85a7d5ce9ac68b30da2277cc91d4b70358f1880d (patch) | |
tree | df3d2084ee2e35008903c03178039b9c986e2d08 /src/server/game/Warden/Warden.cpp | |
parent | 052fc24315ace866ea1cf610e85df119b68100c9 (diff) |
Core: ported headers cleanup from master branch
Diffstat (limited to 'src/server/game/Warden/Warden.cpp')
-rw-r--r-- | src/server/game/Warden/Warden.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp index fae8198e092..8107a73158f 100644 --- a/src/server/game/Warden/Warden.cpp +++ b/src/server/game/Warden/Warden.cpp @@ -23,14 +23,15 @@ #include "Opcodes.h" #include "ByteBuffer.h" #include "GameTime.h" +#include "World.h" #include "Util.h" #include "Warden.h" #include "AccountMgr.h" #include <openssl/sha.h> -Warden::Warden() : _session(NULL), _inputCrypto(16), _outputCrypto(16), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0), - _dataSent(false), _previousTimestamp(0), _module(NULL), _initialized(false) +Warden::Warden() : _session(nullptr), _inputCrypto(16), _outputCrypto(16), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0), + _dataSent(false), _previousTimestamp(0), _module(nullptr), _initialized(false) { memset(_inputKey, 0, sizeof(_inputKey)); memset(_outputKey, 0, sizeof(_outputKey)); @@ -41,7 +42,7 @@ Warden::~Warden() { delete[] _module->CompressedData; delete _module; - _module = NULL; + _module = nullptr; _initialized = false; } @@ -138,7 +139,7 @@ void Warden::EncryptData(uint8* buffer, uint32 length) _outputCrypto.UpdateData(length, buffer); } -bool Warden::IsValidCheckSum(uint32 checksum, const uint8* data, const uint16 length) +bool Warden::IsValidCheckSum(uint32 checksum, uint8 const* data, const uint16 length) { uint32 newChecksum = BuildChecksum(data, length); @@ -169,7 +170,7 @@ struct keyData { }; }; -uint32 Warden::BuildChecksum(const uint8* data, uint32 length) +uint32 Warden::BuildChecksum(uint8 const* data, uint32 length) { keyData hash; SHA1(data, length, hash.bytes.bytes); @@ -180,7 +181,7 @@ uint32 Warden::BuildChecksum(const uint8* data, uint32 length) return checkSum; } -std::string Warden::Penalty(WardenCheck* check /*= NULL*/) +std::string Warden::Penalty(WardenCheck* check /*= nullptr*/) { WardenActions action; |