TrinityCore
Loading...
Searching...
No Matches
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 TRINITYCORE_ACHIEVEMENT_PACKETS_H
19#define TRINITYCORE_ACHIEVEMENT_PACKETS_H
20
21#include "ObjectGuid.h"
22#include "Optional.h"
23#include "Packet.h"
24#include "PacketUtilities.h"
25#include "WowTime.h"
26
27namespace WorldPackets
28{
29 namespace Achievement
30 {
39
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
89
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 explicit 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
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
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 // TRINITYCORE_ACHIEVEMENT_PACKETS_H
int32_t int32
Definition Define.h:150
uint64_t uint64
Definition Define.h:153
uint32_t uint32
Definition Define.h:154
@ SMSG_ACHIEVEMENT_EARNED
Definition Opcodes.h:1112
@ SMSG_GUILD_ACHIEVEMENT_EARNED
Definition Opcodes.h:1587
@ SMSG_ACCOUNT_CRITERIA_UPDATE
Definition Opcodes.h:1090
@ SMSG_RESPOND_INSPECT_ACHIEVEMENTS
Definition Opcodes.h:2223
@ SMSG_ALL_GUILD_ACHIEVEMENTS
Definition Opcodes.h:1132
@ SMSG_CRITERIA_DELETED
Definition Opcodes.h:1397
@ SMSG_GUILD_CRITERIA_DELETED
Definition Opcodes.h:1597
@ SMSG_GUILD_CRITERIA_UPDATE
Definition Opcodes.h:1598
@ SMSG_GUILD_ACHIEVEMENT_MEMBERS
Definition Opcodes.h:1588
@ SMSG_ALL_ACCOUNT_CRITERIA
Definition Opcodes.h:1130
@ SMSG_GUILD_ACHIEVEMENT_DELETED
Definition Opcodes.h:1586
@ SMSG_ALL_ACHIEVEMENT_DATA
Definition Opcodes.h:1131
@ SMSG_CRITERIA_UPDATE
Definition Opcodes.h:1398
@ SMSG_ACHIEVEMENT_DELETED
Definition Opcodes.h:1111
@ SMSG_BROADCAST_ACHIEVEMENT
Definition Opcodes.h:1237
@ CMSG_GUILD_GET_ACHIEVEMENT_MEMBERS
Definition Opcodes.h:426
@ CMSG_GUILD_SET_FOCUSED_ACHIEVEMENT
Definition Opcodes.h:446
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition Optional.h:25
Achievement
std::vector< GuildAchievementMember > Member
std::vector< GuildCriteriaProgress > Progress
ByteBuffer & operator<<(ByteBuffer &data, EarnedAchievement const &earned)
STL namespace.
std::vector< CriteriaProgress > Progress
std::vector< EarnedAchievement > Earned