TrinityCore
Loading...
Searching...
No Matches
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 TRINITYCORE_TAXI_PACKETS_H
19#define TRINITYCORE_TAXI_PACKETS_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
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:
72 explicit EnableTaxiNode(WorldPacket&& packet) : ClientPacket(CMSG_ENABLE_TAXI_NODE, std::move(packet)) { }
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:
92 explicit ActivateTaxi(WorldPacket&& packet) : ClientPacket(CMSG_ACTIVATE_TAXI, std::move(packet)) { }
93
94 void Read() override;
95
100 };
101
102 class NewTaxiPath final : public ServerPacket
103 {
104 public:
105 explicit NewTaxiPath(int32 taxiNodesId) : ServerPacket(SMSG_NEW_TAXI_PATH, 4), TaxiNodesID(taxiNodesId) { }
106
107 WorldPacket const* Write() override;
108
110 };
111
112 class ActivateTaxiReply final : public ServerPacket
113 {
114 public:
116
117 WorldPacket const* Write() override;
118
120 };
121
123 {
124 public:
126
127 void Read() override { }
128 };
129 }
130}
131
132#endif // TRINITYCORE_TAXI_PACKETS_H
uint8_t uint8
Definition Define.h:156
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
@ SMSG_SHOW_TAXI_NODES
Definition Opcodes.h:2308
@ SMSG_ACTIVATE_TAXI_REPLY
Definition Opcodes.h:1115
@ SMSG_NEW_TAXI_PATH
Definition Opcodes.h:2014
@ SMSG_TAXI_NODE_STATUS
Definition Opcodes.h:2371
@ CMSG_ACTIVATE_TAXI
Definition Opcodes.h:49
@ CMSG_TAXI_REQUEST_EARLY_LANDING
Definition Opcodes.h:986
@ CMSG_TAXI_NODE_STATUS_QUERY
Definition Opcodes.h:984
@ CMSG_TAXI_QUERY_AVAILABLE_NODES
Definition Opcodes.h:985
@ CMSG_ENABLE_TAXI_NODE
Definition Opcodes.h:341
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition Optional.h:25
WorldPacket const * Write() override
ActivateTaxi(WorldPacket &&packet)
Definition TaxiPackets.h:92
EnableTaxiNode(WorldPacket &&packet)
Definition TaxiPackets.h:72
WorldPacket const * Write() override
NewTaxiPath(int32 taxiNodesId)
Optional< ShowTaxiNodesWindowInfo > WindowInfo
Definition TaxiPackets.h:64
WorldPacket const * Write() override
TaxiNodeStatusQuery(WorldPacket &&packet)
Definition TaxiPackets.h:33
WorldPacket const * Write() override
TaxiQueryAvailableNodes(WorldPacket &&packet)
Definition TaxiPackets.h:82
STL namespace.