TrinityCore
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 "Warden.h"
24#include <array>
25#include <utility>
26
27#pragma pack(push, 1)
28
30{
39
48
57};
58static_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));
59
60#pragma pack(pop)
61
62class WorldSession;
63class Warden;
64
66{
67 public:
68 WardenWin();
69
70 void Init(WorldSession* session, SessionKey const& K) override;
71 void InitializeModuleForClient(ClientWardenModule& module) override;
72 void InitializeModule() override;
73 void RequestHash() override;
74 void HandleHashResult(ByteBuffer &buff) override;
75 void RequestChecks() override;
76 void HandleCheckResult(ByteBuffer &buff) override;
77
78 size_t DEBUG_ForceSpecificChecks(std::vector<uint16> const& checks) override;
79
80 private:
82 std::array<std::pair<std::vector<uint16>, std::vector<uint16>::const_iterator>, NUM_CHECK_CATEGORIES> _checks;
83 std::vector<uint16> _currentChecks;
84};
85
86#endif
std::array< uint8, SESSION_KEY_LENGTH > SessionKey
Definition: AuthDefines.h:25
#define TC_GAME_API
Definition: Define.h:123
uint8_t uint8
Definition: Define.h:144
uint16_t uint16
Definition: Define.h:143
uint32_t uint32
Definition: Define.h:142
@ NUM_CHECK_CATEGORIES
std::vector< uint16 > _currentChecks
Definition: WardenWin.h:83
uint32 _serverTicks
Definition: WardenWin.h:81
std::array< std::pair< std::vector< uint16 >, std::vector< uint16 >::const_iterator >, NUM_CHECK_CATEGORIES > _checks
Definition: WardenWin.h:82
Definition: Warden.h:85
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.
Definition: WorldSession.h:963