TrinityCore
AchievementPackets.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 game_AchievementPackets_h__
19#define game_AchievementPackets_h__
20
21#include "Packet.h"
22#include "ObjectGuid.h"
23#include "Optional.h"
24#include "PacketUtilities.h"
25#include "WowTime.h"
26
27namespace WorldPackets
28{
29 namespace Achievement
30 {
32 {
38 };
39
41 {
51 };
52
54 {
55 std::vector<EarnedAchievement> Earned;
56 std::vector<CriteriaProgress> Progress;
57 };
58
59 class AllAchievementData final : public ServerPacket
60 {
61 public:
63
64 WorldPacket const* Write() override;
65
67 };
68
69 class AllAccountCriteria final : public ServerPacket
70 {
71 public:
73
74 WorldPacket const* Write() override;
75
76 std::vector<CriteriaProgress> Progress;
77 };
78
80 {
81 public:
83
84 WorldPacket const* Write() override;
85
88 };
89
90 class CriteriaUpdate final : public ServerPacket
91 {
92 public:
93 CriteriaUpdate() : ServerPacket(SMSG_CRITERIA_UPDATE, 4 + 8 + 16 + 4 + 4 + 4 + 4) { }
94
95 WorldPacket const* Write() override;
96
106 };
107
109 {
110 public:
112
113 WorldPacket const* Write() override;
114
116 };
117
118 class CriteriaDeleted final : public ServerPacket
119 {
120 public:
122
123 WorldPacket const* Write() override;
124
126 };
127
128 class AchievementDeleted final : public ServerPacket
129 {
130 public:
132
133 WorldPacket const* Write() override;
134
136 uint32 Immunities = 0; // this is just garbage, not used by client
137 };
138
139 class AchievementEarned final : public ServerPacket
140 {
141 public:
142 AchievementEarned() : ServerPacket(SMSG_ACHIEVEMENT_EARNED, 16 + 4 + 4 + 4 + 4 + 1 + 16) { }
143
144 WorldPacket const* Write() override;
145
151 bool Initial = false;
153 };
154
156 {
157 public:
159
160 WorldPacket const* Write() override;
161
163 std::string Name;
165 bool GuildAchievement = false;
166 };
167
169 {
178 };
179
181 {
182 public:
184
185 WorldPacket const* Write() override;
186
187 std::vector<GuildCriteriaProgress> Progress;
188 };
189
191 {
192 public:
194
195 WorldPacket const* Write() override;
196
199 };
200
202 {
203 public:
205
206 void Read() override;
207
209 };
210
212 {
213 public:
215
216 WorldPacket const* Write() override;
217
221 };
222
224 {
225 public:
227
228 WorldPacket const* Write() override;
229
233 };
234
236 {
237 public:
239
240 WorldPacket const* Write() override;
241
242 std::vector<EarnedAchievement> Earned;
243 };
244
246 {
247 public:
249
250 void Read() override;
251
255 };
256
258 {
261
263 };
264
266 {
267 public:
269
270 WorldPacket const* Write() override;
271
274 std::vector<GuildAchievementMember> Member;
275 };
276
277 ByteBuffer& operator<<(ByteBuffer& data, CriteriaProgress const& criteria);
278 }
279}
280
281#endif // game_AchievementPackets_h__
int32_t int32
Definition: Define.h:138
uint64_t uint64
Definition: Define.h:141
uint32_t uint32
Definition: Define.h:142
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:25
Achievement
std::vector< CriteriaProgress > Progress
std::vector< GuildAchievementMember > Member
std::vector< GuildCriteriaProgress > Progress
@ CMSG_GUILD_GET_ACHIEVEMENT_MEMBERS
Definition: Opcodes.h:412
@ CMSG_GUILD_SET_FOCUSED_ACHIEVEMENT
Definition: Opcodes.h:427
@ SMSG_ACHIEVEMENT_EARNED
Definition: Opcodes.h:914
@ SMSG_GUILD_ACHIEVEMENT_EARNED
Definition: Opcodes.h:1370
@ SMSG_ACCOUNT_CRITERIA_UPDATE
Definition: Opcodes.h:904
@ SMSG_RESPOND_INSPECT_ACHIEVEMENTS
Definition: Opcodes.h:1855
@ SMSG_ALL_GUILD_ACHIEVEMENTS
Definition: Opcodes.h:934
@ SMSG_CRITERIA_DELETED
Definition: Opcodes.h:1187
@ SMSG_GUILD_CRITERIA_DELETED
Definition: Opcodes.h:1380
@ SMSG_GUILD_CRITERIA_UPDATE
Definition: Opcodes.h:1381
@ SMSG_GUILD_ACHIEVEMENT_MEMBERS
Definition: Opcodes.h:1371
@ SMSG_ALL_ACCOUNT_CRITERIA
Definition: Opcodes.h:932
@ SMSG_GUILD_ACHIEVEMENT_DELETED
Definition: Opcodes.h:1369
@ SMSG_ALL_ACHIEVEMENT_DATA
Definition: Opcodes.h:933
@ SMSG_CRITERIA_UPDATE
Definition: Opcodes.h:1188
@ SMSG_ACHIEVEMENT_DELETED
Definition: Opcodes.h:913
@ SMSG_BROADCAST_ACHIEVEMENT
Definition: Opcodes.h:1043
ByteBuffer & operator<<(ByteBuffer &data, EarnedAchievement const &earned)
STL namespace.
std::vector< CriteriaProgress > Progress
std::vector< EarnedAchievement > Earned