TrinityCore
TaxiPackets.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 TaxiPackets_h__
19#define TaxiPackets_h__
20
21#include "Packet.h"
22#include "ObjectGuid.h"
23#include "DBCEnums.h"
24#include "Optional.h"
25
26namespace WorldPackets
27{
28 namespace Taxi
29 {
30 class TaxiNodeStatusQuery final : public ClientPacket
31 {
32 public:
34
35 void Read() override;
36
38 };
39
40 class TaxiNodeStatus final : public ServerPacket
41 {
42 public:
44
45 WorldPacket const* Write() override;
46
47 uint8 Status = 0; // replace with TaxiStatus enum
49 };
50
52 {
55 };
56
57 class ShowTaxiNodes final : public ServerPacket
58 {
59 public:
61
62 WorldPacket const* Write() override;
63
65 TaxiMask CanLandNodes; // Nodes known by player
66 TaxiMask CanUseNodes; // Nodes available for use - this can temporarily disable a known node
67 };
68
69 class EnableTaxiNode final : public ClientPacket
70 {
71 public:
73
74 void Read() override;
75
77 };
78
80 {
81 public:
83
84 void Read() override;
85
87 };
88
89 class ActivateTaxi final : public ClientPacket
90 {
91 public:
93
94 void Read() override;
95
100 };
101
102 class NewTaxiPath final : public ServerPacket
103 {
104 public:
106
107 WorldPacket const* Write() override { return &_worldPacket; }
108 };
109
110 class ActivateTaxiReply final : public ServerPacket
111 {
112 public:
114
115 WorldPacket const* Write() override;
116
118 };
119
121 {
122 public:
124
125 void Read() override { }
126 };
127 }
128}
129
130#endif // TaxiPackets_h__
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:25
WorldPacket _worldPacket
Definition: Packet.h:43
WorldPacket const * Write() override
Definition: TaxiPackets.cpp:72
ActivateTaxi(WorldPacket &&packet)
Definition: TaxiPackets.h:92
EnableTaxiNode(WorldPacket &&packet)
Definition: TaxiPackets.h:72
WorldPacket const * Write() override
Definition: TaxiPackets.h:107
Optional< ShowTaxiNodesWindowInfo > WindowInfo
Definition: TaxiPackets.h:64
WorldPacket const * Write() override
Definition: TaxiPackets.cpp:34
TaxiNodeStatusQuery(WorldPacket &&packet)
Definition: TaxiPackets.h:33
WorldPacket const * Write() override
Definition: TaxiPackets.cpp:25
TaxiQueryAvailableNodes(WorldPacket &&packet)
Definition: TaxiPackets.h:82
TaxiRequestEarlyLanding(WorldPacket &&packet)
Definition: TaxiPackets.h:123
@ CMSG_ACTIVATE_TAXI
Definition: Opcodes.h:55
@ CMSG_TAXI_REQUEST_EARLY_LANDING
Definition: Opcodes.h:846
@ CMSG_TAXI_NODE_STATUS_QUERY
Definition: Opcodes.h:844
@ CMSG_TAXI_QUERY_AVAILABLE_NODES
Definition: Opcodes.h:845
@ CMSG_ENABLE_TAXI_NODE
Definition: Opcodes.h:335
@ SMSG_SHOW_TAXI_NODES
Definition: Opcodes.h:1934
@ SMSG_ACTIVATE_TAXI_REPLY
Definition: Opcodes.h:917
@ SMSG_NEW_TAXI_PATH
Definition: Opcodes.h:1658
@ SMSG_TAXI_NODE_STATUS
Definition: Opcodes.h:1992
STL namespace.