TrinityCore
Loading...
Searching...
No Matches
WardenWin.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef _WARDEN_WIN_H
19#define _WARDEN_WIN_H
20
21#include "Cryptography/ARC4.h"
23#include "ByteBuffer.h"
24#include "Warden.h"
25#include <array>
26#include <list>
27#include <utility>
28
29#pragma pack(push, 1)
30
60static_assert(sizeof(WardenInitModuleRequest) == (1 + 2 + 4 + 1 + 1 + 1 + 1 + (4 * 4) + 1 + 2 + 4 + 1 + 1 + 1 + 4 + 1 + 1 + 2 + 4 + 1 + 1 + 1 + 4 + 1));
61
62#pragma pack(pop)
63
64class WorldSession;
65class Warden;
66
68{
69 public:
70 WardenWin();
71
72 void Init(WorldSession* session, SessionKey const& K) override;
73 void InitializeModuleForClient(ClientWardenModule& module) override;
74 void InitializeModule() override;
75 void RequestHash() override;
76 void HandleHashResult(ByteBuffer &buff) override;
77 void RequestChecks() override;
78 void HandleCheckResult(ByteBuffer &buff) override;
79
80 size_t DEBUG_ForceSpecificChecks(std::vector<uint16> const& checks) override;
81
82 private:
84 std::array<std::pair<std::vector<uint16>, std::vector<uint16>::const_iterator>, NUM_CHECK_CATEGORIES> _checks;
85 std::vector<uint16> _currentChecks;
86};
87
88#endif
std::array< uint8, SESSION_KEY_LENGTH > SessionKey
Definition AuthDefines.h:25
#define TC_GAME_API
Definition Define.h:114
uint8_t uint8
Definition Define.h:135
uint16_t uint16
Definition Define.h:134
uint32_t uint32
Definition Define.h:133
@ NUM_CHECK_CATEGORIES
std::vector< uint16 > _currentChecks
Definition WardenWin.h:85
uint32 _serverTicks
Definition WardenWin.h:83
std::array< std::pair< std::vector< uint16 >, std::vector< uint16 >::const_iterator >, NUM_CHECK_CATEGORIES > _checks
Definition WardenWin.h:84
virtual void InitializeModuleForClient(ClientWardenModule &module)=0
virtual void RequestHash()=0
virtual size_t DEBUG_ForceSpecificChecks(std::vector< uint16 > const &checks)=0
virtual void InitializeModule()=0
virtual void Init(WorldSession *session, SessionKey const &K)=0
virtual void HandleCheckResult(ByteBuffer &buff)=0
virtual void RequestChecks()=0
virtual void HandleHashResult(ByteBuffer &buff)=0
Player session in the World.