TrinityCore
Loading...
Searching...
No Matches
InstancePackets.cpp
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#include "InstancePackets.h"
19#include "PacketOperators.h"
20
22{
29
36
38{
39 data << uint32(lockInfos.MapID);
40 data << int16(lockInfos.DifficultyID);
41 data << uint64(lockInfos.InstanceID);
42 data << int32(lockInfos.TimeRemaining);
43 data << uint32(lockInfos.CompletedMask);
44
45 data << Bits<1>(lockInfos.Locked);
46 data << Bits<1>(lockInfos.Extended);
47
48 data.FlushBits();
49
50 return data;
51}
52
54{
55 _worldPacket << Size<int32>(LockList);
56
57 for (InstanceLock const& instanceLock : LockList)
58 _worldPacket << instanceLock;
59
60 return &_worldPacket;
61}
62
64{
66
67 return &_worldPacket;
68}
69
71{
73 _worldPacket << Bits<2>(ResetFailedReason);
75
76 return &_worldPacket;
77}
78
80{
81 _worldPacket << Bits<1>(Gm);
83
84 return &_worldPacket;
85}
86
88{
89 _worldPacket >> Bits<1>(AcceptLock);
90}
91
99
101{
104 _worldPacket << Bits<1>(Extending);
105 _worldPacket << Bits<1>(WarningOnly);
107
108 return &_worldPacket;
109}
110
112{
117 _worldPacket << SizedString::BitsSize<8>(WarningMessage);
118 _worldPacket << Bits<1>(Locked);
119 _worldPacket << Bits<1>(Extended);
121
123
124 return &_worldPacket;
125}
126
134
141
149
156
163
171
178
190
198
205}
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
ResetFailedReason
void FlushBits()
Definition ByteBuffer.h:141
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 _worldPacket
Definition Packet.h:43
ByteBuffer & operator<<(ByteBuffer &data, InstanceLock const &lockInfos)
DataWriter< Container > Data(Container const &value)