TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GarrisonPackets.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 GarrisonPackets_h__
19 #define GarrisonPackets_h__
20 
21 #include "Packet.h"
22 #include "ObjectGuid.h"
23 #include "Position.h"
24 #include "PacketUtilities.h"
25 #include "DB2Structure.h"
26 
27 namespace WorldPackets
28 {
29  namespace Garrison
30  {
31  class GarrisonCreateResult final : public ServerPacket
32  {
33  public:
35 
36  WorldPacket const* Write() override;
37 
40  };
41 
42  class GarrisonDeleteResult final : public ServerPacket
43  {
44  public:
46 
47  WorldPacket const* Write() override;
48 
51  };
52 
53  class GetGarrisonInfo final : public ClientPacket
54  {
55  public:
57 
58  void Read() override { }
59  };
60 
62  {
66  };
67 
69  {
72  time_t TimeBuilt = time_t(0);
74  time_t TimeSpecCooldown = time_t(2288912640); // 06/07/1906 18:35:44 - another in the series of magic blizz dates
75  bool Active = false;
76  };
77 
79  {
80  uint64 DbID = 0;
86  uint32 Xp = 0;
89  std::list<GarrAbilityEntry const*> AbilityID;
91  std::string CustomName;
92  };
93 
95  {
96  uint64 DbID = 0;
98  time_t OfferTime = time_t(0);
100  time_t StartTime = time_t(2288912640);
104  };
105 
107  {
109  time_t StartTime = time_t(0);
110  };
111 
112  class GetGarrisonInfoResult final : public ServerPacket
113  {
114  public:
116 
117  WorldPacket const* Write() override;
118 
123  std::vector<GarrisonPlotInfo*> Plots;
124  std::vector<GarrisonBuildingInfo const*> Buildings;
125  std::vector<GarrisonFollower const*> Followers;
126  std::vector<GarrisonMission const*> Missions;
127  std::vector<GarrisonMissionAreaBonus const*> MissionAreaBonuses;
128  std::vector<bool> CanStartMission;
129  std::vector<int32> ArchivedMissions;
130  };
131 
133  {
135  GarrisonRemoteBuildingInfo(uint32 plotInstanceId, uint32 buildingId) : GarrPlotInstanceID(plotInstanceId), GarrBuildingID(buildingId) { }
136 
139  };
140 
142  {
144  std::vector<GarrisonRemoteBuildingInfo> Buildings;
145  };
146 
147  class GarrisonRemoteInfo final : public ServerPacket
148  {
149  public:
151 
152  WorldPacket const* Write() override;
153 
154  std::vector<GarrisonRemoteSiteInfo> Sites;
155  };
156 
158  {
159  public:
161 
162  void Read() override;
163 
167  };
168 
170  {
171  public:
173 
174  WorldPacket const* Write() override;
175 
179  };
180 
182  {
183  public:
185 
186  void Read() override;
187 
190  };
191 
193  {
194  public:
196 
197  WorldPacket const* Write() override;
198 
202  };
203 
205  {
206  public:
208 
209  WorldPacket const* Write() override;
210 
213  };
214 
216  {
217  public:
219 
220  WorldPacket const* Write() override;
221 
224  };
225 
227  {
228  public:
230 
231  void Read() override { }
232  };
233 
235  {
236  public:
238 
239  WorldPacket const* Write() override;
240 
241  std::unordered_set<uint32> const* SpecializationsKnown = nullptr;
242  std::unordered_set<uint32> const* BlueprintsKnown = nullptr;
243  };
244 
246  {
247  public:
249 
250  void Read() override { }
251  };
252 
254  {
256  GarrisonBuildingLandmark(uint32 buildingPlotInstId, Position const& pos) : GarrBuildingPlotInstID(buildingPlotInstId), Pos(pos) { }
257 
260  };
261 
263  {
264  public:
266 
267  WorldPacket const* Write() override;
268 
269  std::vector<GarrisonBuildingLandmark> Landmarks;
270  };
271 
272  class GarrisonPlotPlaced final : public ServerPacket
273  {
274  public:
276 
277  WorldPacket const* Write() override;
278 
280  };
281 
282  class GarrisonPlotRemoved final : public ServerPacket
283  {
284  public:
286 
287  WorldPacket const* Write() override;
288 
290  };
291 
293  {
294  public:
295  GarrisonAddFollowerResult() : ServerPacket(SMSG_GARRISON_ADD_FOLLOWER_RESULT, 8 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 5 * 4 + 4) { }
296 
297  WorldPacket const* Write() override;
298 
301  };
302 
304  {
305  public:
307 
308  WorldPacket const* Write() override;
309 
313  };
314 
316  {
317  public:
319 
320  WorldPacket const* Write() override;
321 
323  };
324  }
325 }
326 
327 #endif // GarrisonPackets_h__
std::vector< bool > CanStartMission
Definition: GarrisonPackets.h:128
Definition: Opcodes.h:291
GarrisonPurchaseBuilding(WorldPacket &&packet)
Definition: GarrisonPackets.h:160
void Read() override
Definition: GarrisonPackets.h:58
Definition: GarrisonPackets.h:141
uint32 NumFollowerActivationsRemaining
Definition: GarrisonPackets.h:122
Definition: GarrisonPackets.h:157
GarrisonCancelConstruction(WorldPacket &&packet)
Definition: GarrisonPackets.h:184
Definition: GarrisonPackets.h:253
time_t TimeBuilt
Definition: GarrisonPackets.h:72
Definition: Opcodes.h:1047
uint32 TravelDuration
Definition: GarrisonPackets.h:101
GarrisonDeleteResult()
Definition: GarrisonPackets.h:45
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:227
GarrisonBuildingLandmark()
Definition: GarrisonPackets.h:255
GarrisonBuildingActivated()
Definition: GarrisonPackets.h:318
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:28
uint32 Result
Definition: GarrisonPackets.h:49
uint32 Result
Definition: GarrisonPackets.h:311
std::unordered_set< uint32 > const * BlueprintsKnown
Definition: GarrisonPackets.h:242
Definition: GarrisonPackets.h:315
uint64 DbID
Definition: GarrisonPackets.h:96
uint64 FollowerDBID
Definition: GarrisonPackets.h:310
GarrisonBuildingLandmark(uint32 buildingPlotInstId, Position const &pos)
Definition: GarrisonPackets.h:256
GarrisonRemoteInfo()
Definition: GarrisonPackets.h:150
Position Pos
Definition: GarrisonPackets.h:259
Definition: GarrisonPackets.h:106
uint32 BuildingID
Definition: GarrisonPackets.h:165
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:250
Definition: Opcodes.h:1005
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:103
Definition: Opcodes.h:275
GarrisonRequestBlueprintAndSpecializationData(WorldPacket &&packet)
Definition: GarrisonPackets.h:229
uint32 Result
Definition: GarrisonPackets.h:300
STL namespace.
Definition: Garrison.h:83
GarrisonCreateResult()
Definition: GarrisonPackets.h:34
uint32 PlotType
Definition: GarrisonPackets.h:65
Definition: GarrisonPackets.h:192
uint32 FactionIndex
Definition: GarrisonPackets.h:121
uint32 BuildingID
Definition: GarrisonPackets.h:211
GarrisonAddFollowerResult()
Definition: GarrisonPackets.h:295
GarrisonLearnBlueprintResult()
Definition: GarrisonPackets.h:207
uint32 GarrPlotInstanceID
Definition: GarrisonPackets.h:137
uint32 GarrBuildingID
Definition: GarrisonPackets.h:201
Definition: Opcodes.h:273
uint32 OfferDuration
Definition: GarrisonPackets.h:99
uint32 MissionRecID
Definition: GarrisonPackets.h:97
uint32 FollowerStatus
Definition: GarrisonPackets.h:90
Definition: Opcodes.h:1006
bool PlayActivationCinematic
Definition: GarrisonPackets.h:178
std::vector< GarrisonPlotInfo * > Plots
Definition: GarrisonPackets.h:123
uint32 CurrentBuildingID
Definition: GarrisonPackets.h:87
Definition: GarrisonPackets.h:53
uint32 GarrBuildingPlotInstID
Definition: GarrisonPackets.h:258
GetGarrisonInfo(WorldPacket &&packet)
Definition: GarrisonPackets.h:56
Definition: Opcodes.h:1032
Definition: GarrisonPackets.h:61
uint32 GarrSiteID
Definition: GarrisonPackets.h:119
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:290
void Read() override
Definition: GarrisonPackets.h:250
std::list< GarrAbilityEntry const * > AbilityID
Definition: GarrisonPackets.h:89
uint32 GarrPlotInstanceID
Definition: GarrisonPackets.h:63
Definition: GarrisonPackets.h:147
Definition: Packet.h:59
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:219
uint32 GarrSiteID
Definition: GarrisonPackets.h:50
Position PlotPos
Definition: GarrisonPackets.h:64
void Read() override
Definition: GarrisonPackets.h:231
GarrisonPlotInfo * PlotInfo
Definition: GarrisonPackets.h:279
uint32 CurrentGarSpecID
Definition: GarrisonPackets.h:73
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:281
GarrisonGetBuildingLandmarks(WorldPacket &&packet)
Definition: GarrisonPackets.h:248
GarrisonBuildingLandmarks()
Definition: GarrisonPackets.h:265
ObjectGuid NpcGUID
Definition: GarrisonPackets.h:188
bool Active
Definition: GarrisonPackets.h:75
uint32 GarrSiteLevelID
Definition: GarrisonPackets.h:143
uint32 GarrSiteLevelID
Definition: GarrisonPackets.h:120
std::vector< GarrisonRemoteSiteInfo > Sites
Definition: GarrisonPackets.h:154
Definition: GarrisonPackets.h:112
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:170
Definition: Opcodes.h:1011
GarrisonRequestBlueprintAndSpecializationDataResult()
Definition: GarrisonPackets.h:237
GarrisonBuildingRemoved()
Definition: GarrisonPackets.h:195
Definition: Packet.h:46
std::unordered_set< uint32 > const * SpecializationsKnown
Definition: GarrisonPackets.h:241
uint32 GarrFollowerID
Definition: GarrisonPackets.h:81
Definition: GarrisonPackets.h:31
Definition: Opcodes.h:269
time_t OfferTime
Definition: GarrisonPackets.h:98
time_t StartTime
Definition: GarrisonPackets.h:100
uint32 Quality
Definition: GarrisonPackets.h:82
std::vector< int32 > ArchivedMissions
Definition: GarrisonPackets.h:129
GarrisonUnlearnBlueprintResult()
Definition: GarrisonPackets.h:218
uint32_t uint32
Definition: Define.h:150
uint64_t uint64
Definition: Define.h:149
Definition: GarrisonPackets.h:262
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:211
uint32 Xp
Definition: GarrisonPackets.h:86
Definition: GarrisonPackets.h:282
Definition: GarrisonPackets.h:78
uint32 GarrPlotInstanceID
Definition: GarrisonPackets.h:322
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:186
uint32 Result
Definition: GarrisonPackets.h:39
uint32 Result
Definition: GarrisonPackets.h:212
uint64 DbID
Definition: GarrisonPackets.h:80
std::vector< GarrisonFollower const * > Followers
Definition: GarrisonPackets.h:125
Definition: BattlegroundMgr.h:57
uint32 GarrBuildingID
Definition: GarrisonPackets.h:138
uint32 GarrMssnBonusAbilityID
Definition: GarrisonPackets.h:108
std::vector< GarrisonMissionAreaBonus const * > MissionAreaBonuses
Definition: GarrisonPackets.h:127
Definition: Opcodes.h:1001
uint32 GarrSiteLevelID
Definition: GarrisonPackets.h:38
Definition: Opcodes.h:1042
std::vector< GarrisonRemoteBuildingInfo > Buildings
Definition: GarrisonPackets.h:144
std::string CustomName
Definition: GarrisonPackets.h:91
Definition: Opcodes.h:1039
GetGarrisonInfoResult()
Definition: GarrisonPackets.h:115
uint32 FollowerLevel
Definition: GarrisonPackets.h:83
Definition: GarrisonPackets.h:68
Definition: GarrisonPackets.h:42
uint32 MissionState
Definition: GarrisonPackets.h:103
Definition: GarrisonPackets.h:94
uint32 Result
Definition: GarrisonPackets.h:223
uint32 PlotInstanceID
Definition: GarrisonPackets.h:189
uint32 Destroyed
Definition: GarrisonPackets.h:312
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:202
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:259
GarrisonPlaceBuildingResult()
Definition: GarrisonPackets.h:172
GarrisonRemoteBuildingInfo()
Definition: GarrisonPackets.h:134
uint32 Result
Definition: GarrisonPackets.h:199
Definition: Opcodes.h:1018
ObjectGuid NpcGUID
Definition: GarrisonPackets.h:164
Definition: Opcodes.h:1037
GarrisonPlotPlaced()
Definition: GarrisonPackets.h:275
Definition: Position.h:27
uint32 PlotInstanceID
Definition: GarrisonPackets.h:166
GarrisonPlotRemoved()
Definition: GarrisonPackets.h:285
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:266
uint32 GarrPlotInstanceID
Definition: GarrisonPackets.h:70
Definition: ObjectGuid.h:189
std::vector< GarrisonBuildingLandmark > Landmarks
Definition: GarrisonPackets.h:269
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:273
GarrisonRemoteBuildingInfo(uint32 plotInstanceId, uint32 buildingId)
Definition: GarrisonPackets.h:135
uint32 CurrentMissionID
Definition: GarrisonPackets.h:88
uint32 ItemLevelWeapon
Definition: GarrisonPackets.h:84
GarrisonBuildingInfo BuildingInfo
Definition: GarrisonPackets.h:177
Definition: Opcodes.h:1030
void Read() override
Definition: GarrisonPackets.cpp:179
uint32 Result
Definition: GarrisonPackets.h:176
Definition: Opcodes.h:1004
uint32 BuildingID
Definition: GarrisonPackets.h:222
Definition: GarrisonPackets.h:272
Definition: Opcodes.h:1031
Pos
Definition: boss_gothik.cpp:115
GarrisonRemoveFollowerResult()
Definition: GarrisonPackets.h:306
uint32 ItemLevelArmor
Definition: GarrisonPackets.h:85
std::vector< GarrisonMission const * > Missions
Definition: GarrisonPackets.h:126
std::vector< GarrisonBuildingInfo const * > Buildings
Definition: GarrisonPackets.h:124
uint32 GarrPlotInstanceID
Definition: GarrisonPackets.h:289
GarrisonFollower Follower
Definition: GarrisonPackets.h:299
Definition: GarrisonPackets.h:292
Definition: WorldPacket.h:26
Definition: Opcodes.h:1010
time_t StartTime
Definition: GarrisonPackets.h:109
WorldPacket const * Write() override
Definition: GarrisonPackets.cpp:20
time_t TimeSpecCooldown
Definition: GarrisonPackets.h:74
uint32 GarrPlotInstanceID
Definition: GarrisonPackets.h:200
void Read() override
Definition: GarrisonPackets.cpp:196
uint32 GarrBuildingID
Definition: GarrisonPackets.h:71
uint32 MissionDuration
Definition: GarrisonPackets.h:102