TrinityCore
ToyPackets.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 ToyPackets_h__
19#define ToyPackets_h__
20
21#include "SpellPackets.h"
22#include "CollectionMgr.h"
23
24namespace WorldPackets
25{
26 namespace Toy
27 {
28 class AddToy final : public ClientPacket
29 {
30 public:
31 AddToy(WorldPacket&& packet) : ClientPacket(CMSG_ADD_TOY, std::move(packet)) { }
32
33 void Read() override;
34
36 };
37
38 class UseToy final : public ClientPacket
39 {
40 public:
41 UseToy(WorldPacket&& packet) : ClientPacket(CMSG_USE_TOY, std::move(packet)) { }
42
43 void Read() override;
44
46 };
47
48 class AccountToyUpdate final : public ServerPacket
49 {
50 public:
52
53 WorldPacket const* Write() override;
54
55 bool IsFullUpdate = false;
56 ToyBoxContainer const* Toys = nullptr;
57 };
58
59 class ToyClearFanfare final : public ClientPacket
60 {
61 public:
63
64 void Read() override;
65
67 };
68 }
69}
70
71#endif // ToyPackets_h__
std::map< uint32, EnumFlag< ToyFlags > > ToyBoxContainer
Definition: CollectionMgr.h:69
uint32_t uint32
Definition: Define.h:142
ToyBoxContainer const * Toys
Definition: ToyPackets.h:56
WorldPacket const * Write() override
Definition: ToyPackets.cpp:30
AddToy(WorldPacket &&packet)
Definition: ToyPackets.h:31
void Read() override
Definition: ToyPackets.cpp:20
ToyClearFanfare(WorldPacket &&packet)
Definition: ToyPackets.h:62
UseToy(WorldPacket &&packet)
Definition: ToyPackets.h:41
void Read() override
Definition: ToyPackets.cpp:25
WorldPackets::Spells::SpellCastRequest Cast
Definition: ToyPackets.h:45
@ CMSG_USE_TOY
Definition: Opcodes.h:884
@ CMSG_TOY_CLEAR_FANFARE
Definition: Opcodes.h:854
@ CMSG_ADD_TOY
Definition: Opcodes.h:61
@ SMSG_ACCOUNT_TOY_UPDATE
Definition: Opcodes.h:910
STL namespace.