TrinityCore
Loading...
Searching...
No Matches
GarrisonPackets.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_GARRISON_PACKETS_H
19#define TRINITYCORE_GARRISON_PACKETS_H
20
21#include "Packet.h"
22#include "ItemPacketsCommon.h"
23#include "ObjectGuid.h"
24#include "Optional.h"
25#include "Position.h"
26#include "PacketUtilities.h"
27#include <list>
28#include <unordered_set>
29#include <vector>
30
31struct GarrAbilityEntry;
32
33namespace WorldPackets
34{
35 namespace Garrison
36 {
38 {
39 public:
41
42 WorldPacket const* Write() override;
43
46 };
47
49 {
50 public:
52
53 WorldPacket const* Write() override;
54
57 };
58
59 class GetGarrisonInfo final : public ClientPacket
60 {
61 public:
62 explicit GetGarrisonInfo(WorldPacket&& packet) : ClientPacket(CMSG_GET_GARRISON_INFO, std::move(packet)) { }
63
64 void Read() override { }
65 };
66
73
75 {
80 Timestamp<> TimeSpecCooldown = time_t(2288912640); // 06/07/1906 18:35:44 - another in the series of magic blizz dates
81 bool Active = false;
82 };
83
104
115
127
146
152
158
167
173
175 {
177 std::vector<GarrisonCollectionEntry> Entries;
178 };
179
185
187 {
189 std::vector<GarrisonEventEntry> Events;
190 };
191
197
199 {
204 uint32 NumMissionsStartedToday = 0; // might mean something else, but sending 0 here enables follower abilities "Increase success chance of the first mission of the day by %."
206 std::vector<GarrisonPlotInfo const*> Plots;
207 std::vector<GarrisonBuildingInfo const*> Buildings;
208 std::vector<GarrisonFollower const*> Followers;
209 std::vector<GarrisonFollower const*> AutoTroops;
210 std::vector<GarrisonMission const*> Missions;
211 std::vector<std::vector<GarrisonMissionReward>> MissionRewards;
212 std::vector<std::vector<GarrisonMissionReward>> MissionOvermaxRewards;
213 std::vector<GarrisonMissionBonusAbility const*> MissionAreaBonuses;
214 std::vector<GarrisonTalent> Talents;
215 std::vector<GarrisonCollection> Collections;
216 std::vector<GarrisonEventList> EventLists;
217 std::vector<GarrisonSpecGroup> SpecGroups;
218 std::vector<bool> CanStartMission;
219 std::vector<int32> ArchivedMissions;
220 };
221
227
229 {
230 public:
232
233 WorldPacket const* Write() override;
234
236 std::vector<GarrisonInfo> Garrisons;
237 std::vector<FollowerSoftCapInfo> FollowerSoftCaps;
238 };
239
248
250 {
252 std::vector<GarrisonRemoteBuildingInfo> Buildings;
253 };
254
255 class GarrisonRemoteInfo final : public ServerPacket
256 {
257 public:
259
260 WorldPacket const* Write() override;
261
262 std::vector<GarrisonRemoteSiteInfo> Sites;
263 };
264
266 {
267 public:
269
270 void Read() override;
271
275 };
276
289
291 {
292 public:
294
295 void Read() override;
296
299 };
300
302 {
303 public:
305
306 WorldPacket const* Write() override;
307
312 };
313
315 {
316 public:
318
319 WorldPacket const* Write() override;
320
324 };
325
337
345
347 {
348 public:
350
351 WorldPacket const* Write() override;
352
354 std::unordered_set<uint32> const* BlueprintsKnown = nullptr;
355 std::unordered_set<uint32> const* SpecializationsKnown = nullptr;
356 };
357
358 class GarrisonGetMapData final : public ClientPacket
359 {
360 public:
362
363 void Read() override { }
364 };
365
374
376 {
377 public:
379
380 WorldPacket const* Write() override;
381
382 std::vector<GarrisonBuildingMapData> Buildings;
383 };
384
385 class GarrisonPlotPlaced final : public ServerPacket
386 {
387 public:
389
390 WorldPacket const* Write() override;
391
394 };
395
397 {
398 public:
400
401 WorldPacket const* Write() override;
402
404 };
405
407 {
408 public:
409 explicit GarrisonAddFollowerResult() : ServerPacket(SMSG_GARRISON_ADD_FOLLOWER_RESULT, 8 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 5 * 4 + 4) { }
410
411 WorldPacket const* Write() override;
412
416 };
417
419 {
420 public:
422
423 WorldPacket const* Write() override;
424
429 };
430
432 {
433 public:
435
436 WorldPacket const* Write() override;
437
439 };
440 }
441}
442
443#endif // TRINITYCORE_GARRISON_PACKETS_H
uint8_t uint8
Definition Define.h:156
int64_t int64
Definition Define.h:149
int8_t int8
Definition Define.h:152
int32_t int32
Definition Define.h:150
uint64_t uint64
Definition Define.h:153
uint32_t uint32
Definition Define.h:154
@ SMSG_GARRISON_UNLEARN_BLUEPRINT_RESULT
Definition Opcodes.h:1544
@ SMSG_GARRISON_REQUEST_BLUEPRINT_AND_SPECIALIZATION_DATA_RESULT
Definition Opcodes.h:1532
@ SMSG_GARRISON_BUILDING_ACTIVATED
Definition Opcodes.h:1488
@ SMSG_GARRISON_MAP_DATA_RESPONSE
Definition Opcodes.h:1516
@ SMSG_GARRISON_PLOT_REMOVED
Definition Opcodes.h:1524
@ SMSG_GARRISON_DELETE_RESULT
Definition Opcodes.h:1501
@ SMSG_GARRISON_PLOT_PLACED
Definition Opcodes.h:1523
@ SMSG_GARRISON_REMOVE_FOLLOWER_RESULT
Definition Opcodes.h:1530
@ SMSG_GET_GARRISON_INFO_RESULT
Definition Opcodes.h:1555
@ SMSG_GARRISON_BUILDING_REMOVED
Definition Opcodes.h:1489
@ SMSG_GARRISON_LEARN_BLUEPRINT_RESULT
Definition Opcodes.h:1512
@ SMSG_GARRISON_ADD_FOLLOWER_RESULT
Definition Opcodes.h:1482
@ SMSG_GARRISON_PLACE_BUILDING_RESULT
Definition Opcodes.h:1522
@ SMSG_GARRISON_REMOTE_INFO
Definition Opcodes.h:1526
@ SMSG_GARRISON_CREATE_RESULT
Definition Opcodes.h:1499
@ CMSG_GARRISON_CANCEL_CONSTRUCTION
Definition Opcodes.h:354
@ CMSG_GARRISON_GET_MAP_DATA
Definition Opcodes.h:360
@ CMSG_GARRISON_PURCHASE_BUILDING
Definition Opcodes.h:364
@ CMSG_GET_GARRISON_INFO
Definition Opcodes.h:387
@ CMSG_GARRISON_REQUEST_BLUEPRINT_AND_SPECIALIZATION_DATA
Definition Opcodes.h:369
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition Optional.h:25
std::vector< GarrisonBuildingMapData > Buildings
std::vector< GarrisonRemoteSiteInfo > Sites
std::vector< FollowerSoftCapInfo > FollowerSoftCaps
STL namespace.
GarrisonBuildingMapData(uint32 buildingPlotInstId, Position const &pos)
std::vector< GarrisonCollectionEntry > Entries
std::vector< GarrisonEventEntry > Events
std::list< GarrAbilityEntry const * > AbilityID
std::vector< GarrisonTalent > Talents
std::vector< GarrisonEventList > EventLists
std::vector< GarrisonMissionBonusAbility const * > MissionAreaBonuses
std::vector< GarrisonFollower const * > AutoTroops
std::vector< GarrisonFollower const * > Followers
std::vector< GarrisonMission const * > Missions
std::vector< std::vector< GarrisonMissionReward > > MissionRewards
std::vector< GarrisonCollection > Collections
std::vector< std::vector< GarrisonMissionReward > > MissionOvermaxRewards
std::vector< GarrisonBuildingInfo const * > Buildings
std::vector< GarrisonPlotInfo const * > Plots
std::vector< GarrisonSpecGroup > SpecGroups
Optional< Item::ItemInstance > ItemInstance
std::vector< GarrisonEncounter > Encounters
std::vector< GarrisonMissionReward > Rewards
std::vector< GarrisonMissionReward > OvermaxRewards
TaggedPosition< Position::XYZO > PlotPos
GarrisonRemoteBuildingInfo(uint32 plotInstanceId, uint32 buildingId)
std::vector< GarrisonRemoteBuildingInfo > Buildings
Optional< GarrisonTalentSocketData > Socket