TrinityCore
Loading...
Searching...
No Matches
InstancePackets.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_INSTANCE_PACKETS_H
19#define TRINITYCORE_INSTANCE_PACKETS_H
20
21#include "Packet.h"
22#include "ObjectGuid.h"
23
24namespace WorldPackets
25{
26 namespace Instance
27 {
28 class UpdateLastInstance final : public ServerPacket
29 {
30 public:
32
33 WorldPacket const* Write() override;
34
36 };
37
38 // This packet is no longer sent - it is only here for documentation purposes
40 {
41 public:
43
44 WorldPacket const* Write() override;
45
46 int32 IOwnInstance = 0; // Used to control whether "Reset all instances" button appears on the UI - Script_CanShowResetInstances()
47 // but it has been deperecated in favor of simply checking group leader, being inside an instance or using dungeon finder
48 };
49
51 {
57
58 bool Locked = false;
59 bool Extended = false;
60 };
61
62 class InstanceInfo final : public ServerPacket
63 {
64 public:
66
67 WorldPacket const* Write() override;
68
69 std::vector<InstanceLock> LockList;
70 };
71
72 class ResetInstances final : public ClientPacket
73 {
74 public:
75 explicit ResetInstances(WorldPacket&& packet) : ClientPacket(CMSG_RESET_INSTANCES, std::move(packet)) { }
76
77 void Read() override { }
78 };
79
80 class InstanceReset final : public ServerPacket
81 {
82 public:
84
85 WorldPacket const* Write() override;
86
88 };
89
90 class InstanceResetFailed final : public ServerPacket
91 {
92 public:
94
95 WorldPacket const* Write() override;
96
99 };
100
101 class ResetFailedNotify final : public ServerPacket
102 {
103 public:
105
106 WorldPacket const* Write() override { return &_worldPacket; }
107 };
108
110 {
111 public:
113
114 WorldPacket const* Write() override;
115
116 bool Gm = false;
117 };
118
120 {
121 public:
123
124 void Read() override;
125
126 bool AcceptLock = false;
127 };
128
129 class RaidGroupOnly final : public ServerPacket
130 {
131 public:
133
134 WorldPacket const* Write() override;
135
138 };
139
140 class PendingRaidLock final : public ServerPacket
141 {
142 public:
144
145 WorldPacket const* Write() override;
146
149 bool Extending = false;
150 bool WarningOnly = false;
151 };
152
154 {
155 public:
157
158 WorldPacket const* Write() override;
159
164 std::string_view WarningMessage; // GlobalStrings tag
165 bool Locked = false;
166 bool Extended = false;
167 };
168
170 {
171 public:
173
174 WorldPacket const* Write() override;
175
177 uint8 TargetFramePriority = 0; // used to set the initial position of the frame if multiple frames are sent
178 };
179
181 {
182 public:
184
185 WorldPacket const* Write() override;
186
188 };
189
191 {
192 public:
194
195 WorldPacket const* Write() override;
196
198 uint8 TargetFramePriority = 0; // used to update the position of the unit's current frame
199 };
200
202 {
203 public:
205
206 WorldPacket const* Write() override;
207
209 };
210
212 {
213 public:
215
216 WorldPacket const* Write() override;
217
219 };
220
231
241
249
251 {
252 public:
254
255 WorldPacket const* Write() override;
256
257 uint32 InCombatResCount = 0; // amount of usable battle ressurections
261 bool InProgress = true;
262 };
263
265 {
266 public:
268
269 WorldPacket const* Write() override { return &_worldPacket; }
270 };
271
279
290
291 class BossKill final : public ServerPacket
292 {
293 public:
295
296 WorldPacket const* Write() override;
298 };
299 }
300}
301
302#endif // TRINITYCORE_INSTANCE_PACKETS_H
uint8_t uint8
Definition Define.h:156
int16_t int16
Definition Define.h:151
int32_t int32
Definition Define.h:150
uint64_t uint64
Definition Define.h:153
uint32_t uint32
Definition Define.h:154
@ SMSG_INSTANCE_ENCOUNTER_ENGAGE_UNIT
Definition Opcodes.h:1728
@ SMSG_INSTANCE_RESET
Definition Opcodes.h:1747
@ SMSG_INSTANCE_ENCOUNTER_TIMER_START
Definition Opcodes.h:1742
@ SMSG_RAID_INSTANCE_MESSAGE
Definition Opcodes.h:2188
@ SMSG_INSTANCE_ENCOUNTER_IN_COMBAT_RESURRECTION
Definition Opcodes.h:1735
@ SMSG_INSTANCE_ENCOUNTER_START
Definition Opcodes.h:1740
@ SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_START
Definition Opcodes.h:1737
@ SMSG_INSTANCE_ENCOUNTER_DISENGAGE_UNIT
Definition Opcodes.h:1726
@ SMSG_PENDING_RAID_LOCK
Definition Opcodes.h:2040
@ SMSG_INSTANCE_ENCOUNTER_PHASE_SHIFT_CHANGED
Definition Opcodes.h:1739
@ SMSG_UPDATE_INSTANCE_OWNERSHIP
Definition Opcodes.h:2425
@ SMSG_BOSS_KILL
Definition Opcodes.h:1235
@ SMSG_INSTANCE_RESET_FAILED
Definition Opcodes.h:1748
@ SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_UPDATE
Definition Opcodes.h:1738
@ SMSG_RAID_GROUP_ONLY
Definition Opcodes.h:2187
@ SMSG_INSTANCE_INFO
Definition Opcodes.h:1746
@ SMSG_RESET_FAILED_NOTIFY
Definition Opcodes.h:2217
@ SMSG_INSTANCE_ENCOUNTER_CHANGE_PRIORITY
Definition Opcodes.h:1725
@ SMSG_INSTANCE_ENCOUNTER_GAIN_COMBAT_RESURRECTION_CHARGE
Definition Opcodes.h:1734
@ SMSG_INSTANCE_ENCOUNTER_OBJECTIVE_COMPLETE
Definition Opcodes.h:1736
@ SMSG_UPDATE_LAST_INSTANCE
Definition Opcodes.h:2426
@ SMSG_INSTANCE_ENCOUNTER_END
Definition Opcodes.h:1727
@ SMSG_INSTANCE_SAVE_CREATED
Definition Opcodes.h:1749
@ CMSG_RESET_INSTANCES
Definition Opcodes.h:870
@ CMSG_INSTANCE_LOCK_RESPONSE
Definition Opcodes.h:511
ResetFailedReason
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< InstanceLock > LockList
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket _worldPacket
Definition Packet.h:43
STL namespace.