TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
InstancePackets.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 InstancePackets_h__
19 #define InstancePackets_h__
20 
21 #include "Packet.h"
22 #include "ObjectGuid.h"
23 
24 namespace 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  {
53  uint32 MapID = 0u;
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<InstanceLockInfos> LockList;
70  };
71 
72  class ResetInstances final : public ClientPacket
73  {
74  public:
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 
109  class InstanceSaveCreated final : public ServerPacket
110  {
111  public:
113 
114  WorldPacket const* Write() override;
115 
116  bool Gm = false;
117  };
118 
119  class InstanceLockResponse final : public ClientPacket
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 
153  class RaidInstanceMessage final : public ServerPacket
154  {
155  public:
157 
158  WorldPacket const* Write() override;
159 
160  uint8 Type = 0;
164  bool Locked = false;
165  bool Extended = false;
166  };
167  }
168 }
169 
171 
172 #endif // InstancePackets_h__
bool Extending
Definition: InstancePackets.h:149
InstanceInfo()
Definition: InstancePackets.h:65
int32 TimeUntilLock
Definition: InstancePackets.h:147
Definition: Opcodes.h:355
uint32 MapID
Definition: InstancePackets.h:97
Definition: ByteBuffer.h:70
RaidGroupOnly()
Definition: InstancePackets.h:132
ResetFailedNotify()
Definition: InstancePackets.h:104
uint32 Reason
Definition: InstancePackets.h:137
int32 TimeRemaining
Definition: InstancePackets.h:55
void Read() override
Definition: InstancePackets.h:77
Definition: Opcodes.h:1452
WorldPacket const * Write() override
Definition: InstancePackets.cpp:97
Definition: InstancePackets.h:119
ResetFailedReason
Definition: SharedDefines.h:4906
bool Extended
Definition: InstancePackets.h:59
Definition: Opcodes.h:1139
InstanceResetFailed()
Definition: InstancePackets.h:93
WorldPacket const * Write() override
Definition: InstancePackets.cpp:108
Definition: InstancePackets.h:28
STL namespace.
bool Locked
Definition: InstancePackets.h:164
UpdateLastInstance()
Definition: InstancePackets.h:31
uint32 MapID
Definition: InstancePackets.h:161
uint32 CompletedMask
Definition: InstancePackets.h:56
InstanceSaveCreated()
Definition: InstancePackets.h:112
uint32 DifficultyID
Definition: InstancePackets.h:162
ByteBuffer & operator<<(ByteBuffer &data, WorldPackets::Instance::InstanceLockInfos const &lockInfos)
Definition: InstancePackets.cpp:44
ResetInstances(WorldPacket &&packet)
Definition: InstancePackets.h:75
Definition: Opcodes.h:1428
WorldPacket _worldPacket
Definition: Packet.h:43
Definition: InstancePackets.h:129
WorldPacket const * Write() override
Definition: InstancePackets.cpp:27
Definition: Opcodes.h:1599
Definition: Opcodes.h:584
int32 IOwnInstance
Definition: InstancePackets.h:46
Definition: InstancePackets.h:140
Definition: Packet.h:59
bool AcceptLock
Definition: InstancePackets.h:126
RaidInstanceMessage()
Definition: InstancePackets.h:156
bool WarningOnly
Definition: InstancePackets.h:150
uint32 CompletedMask
Definition: InstancePackets.h:148
uint64 InstanceID
Definition: InstancePackets.h:52
WorldPacket const * Write() override
Definition: InstancePackets.cpp:89
Definition: Packet.h:46
WorldPacket const * Write() override
Definition: InstancePackets.cpp:60
Definition: InstancePackets.h:62
bool Gm
Definition: InstancePackets.h:116
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
uint32 DifficultyID
Definition: InstancePackets.h:54
uint64_t uint64
Definition: Define.h:149
WorldPacket const * Write() override
Definition: InstancePackets.cpp:76
bool Extended
Definition: InstancePackets.h:165
uint32 MapID
Definition: InstancePackets.h:35
WorldPacket const * Write() override
Definition: InstancePackets.cpp:34
UpdateInstanceOwnership()
Definition: InstancePackets.h:42
WorldPacket const * Write() override
Definition: InstancePackets.h:106
Definition: Opcodes.h:1141
Definition: BattlegroundMgr.h:57
InstanceLockResponse(WorldPacket &&packet)
Definition: InstancePackets.h:122
Definition: InstancePackets.h:153
Definition: InstancePackets.h:109
Definition: Opcodes.h:1140
bool Locked
Definition: InstancePackets.h:58
Definition: Opcodes.h:1427
WorldPacket const * Write() override
Definition: InstancePackets.cpp:67
Definition: Opcodes.h:1142
Definition: Opcodes.h:1600
int32 Delay
Definition: InstancePackets.h:136
PendingRaidLock()
Definition: InstancePackets.h:143
Definition: InstancePackets.h:80
uint8_t uint8
Definition: Define.h:152
Definition: InstancePackets.h:39
std::vector< InstanceLockInfos > LockList
Definition: InstancePackets.h:69
Definition: InstancePackets.h:90
void Read() override
Definition: InstancePackets.cpp:84
Definition: Opcodes.h:1327
Type
Type of JSON value.
Definition: rapidjson.h:642
InstanceReset()
Definition: InstancePackets.h:83
Definition: InstancePackets.h:50
uint32 MapID
Definition: InstancePackets.h:53
int32 TimeLeft
Definition: InstancePackets.h:163
Definition: WorldPacket.h:26
Definition: InstancePackets.h:101
WorldPacket const * Write() override
Definition: InstancePackets.cpp:20
uint32 MapID
Definition: InstancePackets.h:87
Definition: InstancePackets.h:72