TrinityCore
ScenarioPackets.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 ScenarioPackets_h__
19#define ScenarioPackets_h__
20
21#include "Packet.h"
22#include "PacketUtilities.h"
23#include "AchievementPackets.h"
24
25#define MAX_ALLOWED_SCENARIO_POI_QUERY_SIZE 66
26
27struct ScenarioPOI;
28
30{
32{
34 bool ObjectiveComplete = false;
35};
36
38{
40 bool Usable = true;
41};
42
43class ScenarioState final : public ServerPacket
44{
45public:
47
48 WorldPacket const* Write() override;
49
57 std::vector<Achievement::CriteriaProgress> CriteriaProgress;
58 std::vector<BonusObjectiveData> BonusObjectives;
59 std::vector<uint32> PickedSteps;
60 std::vector<ScenarioSpellUpdate> Spells;
62 bool ScenarioComplete = false;
63};
64
66{
67public:
69
70 WorldPacket const* Write() override;
71
73};
74
75class ScenarioCompleted final : public ServerPacket
76{
77public:
79
80 WorldPacket const* Write() override;
81
83};
84
85class ScenarioVacate final : public ServerPacket
86{
87public:
89
90 WorldPacket const* Write() override;
91
96};
97
98class QueryScenarioPOI final : public ClientPacket
99{
100public:
102
103 void Read() override;
104
106};
107
109{
111 std::vector<ScenarioPOI> const* ScenarioPOIs = nullptr;
112};
113
114class ScenarioPOIs final : public ServerPacket
115{
116public:
118
119 WorldPacket const* Write() override;
120
121 std::vector<ScenarioPOIData> ScenarioPOIDataStats;
122};
123}
124
125#endif // ScenarioPackets_h__
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
Array< int32, MAX_ALLOWED_SCENARIO_POI_QUERY_SIZE > MissingScenarioPOIs
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< ScenarioPOIData > ScenarioPOIDataStats
Achievement::CriteriaProgress CriteriaProgress
std::vector< Achievement::CriteriaProgress > CriteriaProgress
WorldPacket const * Write() override
std::vector< BonusObjectiveData > BonusObjectives
std::vector< ScenarioSpellUpdate > Spells
WorldPacket const * Write() override
@ CMSG_QUERY_SCENARIO_POI
Definition: Opcodes.h:658
@ SMSG_SCENARIO_COMPLETED
Definition: Opcodes.h:1874
@ SMSG_SCENARIO_VACATE
Definition: Opcodes.h:1880
@ SMSG_SCENARIO_PROGRESS_UPDATE
Definition: Opcodes.h:1876
@ SMSG_SCENARIO_STATE
Definition: Opcodes.h:1878
@ SMSG_SCENARIO_POIS
Definition: Opcodes.h:1875
STL namespace.