TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AchievementPackets.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
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 "ObjectGuid.h"
22 #include "Packet.h"
23 
24 namespace WorldPackets
25 {
26  namespace Achievement
27  {
29  {
30  uint32 Id = 0;
31  time_t Date = time_t(0);
35  };
36 
38  {
39  uint32 Id = 0;
43  time_t Date = time_t(0);
46  };
47 
49  {
50  std::vector<EarnedAchievement> Earned;
51  std::vector<CriteriaProgress> Progress;
52  };
53 
54  class AllAchievementData final : public ServerPacket
55  {
56  public:
58 
59  WorldPacket const* Write() override;
60 
62  };
63 
65  {
66  public:
68 
69  WorldPacket const* Write() override;
70 
73  };
74 
75  class CriteriaUpdate final : public ServerPacket
76  {
77  public:
78  CriteriaUpdate() : ServerPacket(SMSG_CRITERIA_UPDATE, 4 + 8 + 16 + 4 + 4 + 4 + 4) { }
79 
80  WorldPacket const* Write() override;
81 
86  time_t CurrentTime = time_t(0);
89  };
90 
91  class CriteriaDeleted final : public ServerPacket
92  {
93  public:
95 
96  WorldPacket const* Write() override;
97 
99  };
100 
101  class AchievementDeleted final : public ServerPacket
102  {
103  public:
105 
106  WorldPacket const* Write() override;
107 
109  uint32 Immunities = 0; // this is just garbage, not used by client
110  };
111 
112  class AchievementEarned final : public ServerPacket
113  {
114  public:
115  AchievementEarned() : ServerPacket(SMSG_ACHIEVEMENT_EARNED, 16 + 4 + 4 + 4 + 4 + 1 + 16) { }
116 
117  WorldPacket const* Write() override;
118 
123  time_t Time = time_t(0);
124  bool Initial = false;
126  };
127 
129  {
130  public:
132 
133  WorldPacket const* Write() override;
134 
136  std::string Name;
138  bool GuildAchievement = false;
139  };
140 
142  {
146  time_t DateUpdated = 0;
150  };
151 
152  class GuildCriteriaUpdate final : public ServerPacket
153  {
154  public:
156 
157  WorldPacket const* Write() override;
158 
159  std::vector<GuildCriteriaProgress> Progress;
160  };
161 
162  class GuildCriteriaDeleted final : public ServerPacket
163  {
164  public:
166 
167  WorldPacket const* Write() override;
168 
171  };
172 
174  {
175  public:
177 
178  void Read() override;
179 
181  };
182 
184  {
185  public:
187 
188  WorldPacket const* Write() override;
189 
192  time_t TimeDeleted = time_t(0);
193  };
194 
196  {
197  public:
199 
200  WorldPacket const* Write() override;
201 
204  time_t TimeEarned = time_t(0);
205  };
206 
207  class AllGuildAchievements final : public ServerPacket
208  {
209  public:
211 
212  WorldPacket const* Write() override;
213 
214  std::vector<EarnedAchievement> Earned;
215  };
216  }
217 }
218 
219 #endif // game_AchievementPackets_h__
time_t TimeDeleted
Definition: AchievementPackets.h:192
Definition: Opcodes.h:1065
uint32 AchievementID
Definition: AchievementPackets.h:122
time_t CurrentTime
Definition: AchievementPackets.h:86
ObjectGuid PlayerGUID
Definition: AchievementPackets.h:135
WorldPacket const * Write() override
Definition: AchievementPackets.cpp:81
Definition: Opcodes.h:341
uint32 TimeFromCreate
Definition: AchievementPackets.h:45
Definition: AchievementPackets.h:152
AllAchievements Data
Definition: AchievementPackets.h:72
uint64 Quantity
Definition: AchievementPackets.h:147
GuildSetFocusedAchievement(WorldPacket &&packet)
Definition: AchievementPackets.h:176
WorldPacket const * Write() override
Definition: AchievementPackets.cpp:53
std::string Name
Definition: AchievementPackets.h:136
ServerFirstAchievement()
Definition: AchievementPackets.h:131
Definition: AchievementPackets.h:195
Definition: AchievementPackets.h:207
AchievementEarned()
Definition: AchievementPackets.h:115
int32 CriteriaID
Definition: AchievementPackets.h:143
bool Initial
Definition: AchievementPackets.h:124
GuildCriteriaUpdate()
Definition: AchievementPackets.h:155
ObjectGuid GuildGUID
Definition: AchievementPackets.h:203
uint32 AchievementID
Definition: AchievementPackets.h:191
ObjectGuid Player
Definition: AchievementPackets.h:71
WorldPacket const * Write() override
Definition: AchievementPackets.cpp:68
GuildCriteriaDeleted()
Definition: AchievementPackets.h:165
STL namespace.
Definition: AchievementPackets.h:37
bool GuildAchievement
Definition: AchievementPackets.h:138
WorldPacket const * Write() override
Definition: AchievementPackets.cpp:161
Definition: AchievementPackets.h:91
GuildAchievementEarned()
Definition: AchievementPackets.h:198
ObjectGuid Earner
Definition: AchievementPackets.h:119
ObjectGuid PlayerGUID
Definition: AchievementPackets.h:148
Definition: Opcodes.h:1076
Definition: AchievementPackets.h:28
uint32 CriteriaID
Definition: AchievementPackets.h:82
Definition: Opcodes.h:1456
Definition: Opcodes.h:938
uint32 Flags
Definition: AchievementPackets.h:42
Definition: Opcodes.h:1488
Definition: Opcodes.h:1064
Definition: Opcodes.h:745
WorldPacket const * Write() override
Definition: AchievementPackets.cpp:170
time_t TimeEarned
Definition: AchievementPackets.h:204
Definition: AchievementPackets.h:48
uint32 ElapsedTime
Definition: AchievementPackets.h:87
int32 Flags
Definition: AchievementPackets.h:149
std::vector< CriteriaProgress > Progress
Definition: AchievementPackets.h:51
time_t Date
Definition: AchievementPackets.h:43
time_t Time
Definition: AchievementPackets.h:123
uint32 CriteriaID
Definition: AchievementPackets.h:98
time_t DateUpdated
Definition: AchievementPackets.h:146
uint32 EarnerNativeRealm
Definition: AchievementPackets.h:120
WorldPacket const * Write() override
Definition: AchievementPackets.cpp:60
Definition: Opcodes.h:733
WorldPacket const * Write() override
Definition: AchievementPackets.cpp:96
Definition: Packet.h:59
AllAchievements Data
Definition: AchievementPackets.h:61
ObjectGuid Owner
Definition: AchievementPackets.h:32
uint32 TimeFromStart
Definition: AchievementPackets.h:44
uint64 Quantity
Definition: AchievementPackets.h:40
Definition: Opcodes.h:732
Definition: AchievementPackets.h:183
time_t Date
Definition: AchievementPackets.h:31
Definition: Opcodes.h:746
Definition: Packet.h:46
CriteriaUpdate()
Definition: AchievementPackets.h:78
std::vector< EarnedAchievement > Earned
Definition: AchievementPackets.h:50
Definition: AchievementPackets.h:141
std::vector< EarnedAchievement > Earned
Definition: AchievementPackets.h:214
uint32 AchievementID
Definition: AchievementPackets.h:108
int32_t int32
Definition: Define.h:146
Achievement
Definition: boss_loatheb.cpp:52
WorldPacket const * Write() override
Definition: AchievementPackets.cpp:139
uint32_t uint32
Definition: Define.h:150
uint32 Id
Definition: AchievementPackets.h:39
uint64_t uint64
Definition: Define.h:149
Definition: Opcodes.h:1075
WorldPacket const * Write() override
Definition: AchievementPackets.cpp:152
uint32 DateCreated
Definition: AchievementPackets.h:144
uint32 Flags
Definition: AchievementPackets.h:85
ObjectGuid GuildGUID
Definition: AchievementPackets.h:190
uint32 VirtualRealmAddress
Definition: AchievementPackets.h:33
std::vector< GuildCriteriaProgress > Progress
Definition: AchievementPackets.h:159
AllGuildAchievements()
Definition: AchievementPackets.h:210
Definition: BattlegroundMgr.h:57
WorldPacket const * Write() override
Definition: AchievementPackets.cpp:88
uint32 CreationTime
Definition: AchievementPackets.h:88
ObjectGuid GuildGUID
Definition: AchievementPackets.h:169
Definition: AchievementPackets.h:173
uint64 Quantity
Definition: AchievementPackets.h:83
Definition: AchievementPackets.h:75
ObjectGuid Sender
Definition: AchievementPackets.h:125
uint32 Id
Definition: AchievementPackets.h:30
uint32 Immunities
Definition: AchievementPackets.h:109
void Read() override
Definition: AchievementPackets.cpp:147
int32 CriteriaID
Definition: AchievementPackets.h:170
Definition: Opcodes.h:937
uint32 DateStarted
Definition: AchievementPackets.h:145
uint32 AchievementID
Definition: AchievementPackets.h:202
Definition: ObjectGuid.h:189
uint32 EarnerVirtualRealm
Definition: AchievementPackets.h:121
Definition: AchievementPackets.h:54
ObjectGuid PlayerGUID
Definition: AchievementPackets.h:84
Definition: AchievementPackets.h:162
AchievementDeleted()
Definition: AchievementPackets.h:104
uint32 AchievementID
Definition: AchievementPackets.h:180
RespondInspectAchievements()
Definition: AchievementPackets.h:67
Definition: AchievementPackets.h:101
WorldPacket const * Write() override
Definition: AchievementPackets.cpp:121
CriteriaDeleted()
Definition: AchievementPackets.h:94
Definition: WorldPacket.h:26
GuildAchievementDeleted()
Definition: AchievementPackets.h:186
uint32 AchievementID
Definition: AchievementPackets.h:137
ObjectGuid Player
Definition: AchievementPackets.h:41
Definition: AchievementPackets.h:112
Definition: AchievementPackets.h:128
AllAchievementData()
Definition: AchievementPackets.h:57
uint32 NativeRealmAddress
Definition: AchievementPackets.h:34
WorldPacket const * Write() override
Definition: AchievementPackets.cpp:110