TrinityCore
Loading...
Searching...
No Matches
TaxiPackets.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 "TaxiPackets.h"
19#include "PacketOperators.h"
20
21namespace WorldPackets::Taxi
22{
27
29{
31 _worldPacket << Bits<2>(Status);
33
34 return &_worldPacket;
35}
36
38{
41
42 _worldPacket << uint32(CanLandNodes.size() / 8); // client reads this in uint64 blocks, size is ensured to be divisible by 8 in TaxiMask constructor
43 _worldPacket << uint32(CanUseNodes.size() / 8); // client reads this in uint64 blocks, size is ensured to be divisible by 8 in TaxiMask constructor
44
45 if (WindowInfo)
46 {
47 _worldPacket << WindowInfo->UnitGUID;
48 _worldPacket << uint32(WindowInfo->CurrentNode);
49 }
50
53
54 return &_worldPacket;
55}
56
61
66
74
81
83{
84 _worldPacket << Bits<4>(Reply);
86
87 return &_worldPacket;
88}
89}
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
void append(T value)
Definition ByteBuffer.h:130
void FlushBits()
Definition ByteBuffer.h:141
size_t size() const
Definition DBCEnums.h:2513
value_type const * data() const
Definition DBCEnums.h:2514
WorldPacket _worldPacket
Definition Packet.h:43
WorldPacket const * Write() override
WorldPacket const * Write() override
Optional< ShowTaxiNodesWindowInfo > WindowInfo
Definition TaxiPackets.h:64
WorldPacket const * Write() override
WorldPacket const * Write() override
OptionalInitWriter< T > OptionalInit(Optional< T > const &value)