TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ToyPackets.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
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 "Packet.h"
22 #include "ObjectGuid.h"
23 #include "SpellPackets.h"
24 #include "CollectionMgr.h"
25 
26 namespace WorldPackets
27 {
28  namespace Toy
29  {
30  class AddToy final : public ClientPacket
31  {
32  public:
33  AddToy(WorldPacket&& packet) : ClientPacket(CMSG_ADD_TOY, std::move(packet)) { }
34 
35  void Read() override;
36 
38  };
39 
40  class UseToy final : public ClientPacket
41  {
42  public:
43  UseToy(WorldPacket&& packet) : ClientPacket(CMSG_USE_TOY, std::move(packet)) { }
44 
45  void Read() override;
46 
49  };
50 
51  class AccountToysUpdate final : public ServerPacket
52  {
53  public:
55 
56  WorldPacket const* Write() override;
57 
58  bool IsFullUpdate = false;
59  ToyBoxContainer const* Toys = nullptr;
60  };
61 
62  class ToySetFavorite final : public ClientPacket
63  {
64  public:
66 
67  void Read() override;
68 
70  bool Favorite = false;
71  };
72  }
73 }
74 
75 #endif // ToyPackets_h__
Definition: ToyPackets.h:62
AddToy(WorldPacket &&packet)
Definition: ToyPackets.h:33
void Read() override
Definition: ToyPackets.cpp:25
bool IsFullUpdate
Definition: ToyPackets.h:58
uint32 ItemID
Definition: ToyPackets.h:48
ToyBoxContainer const * Toys
Definition: ToyPackets.h:59
Definition: Opcodes.h:57
STL namespace.
Definition: ToyPackets.h:30
WorldPacket const * Write() override
Definition: ToyPackets.cpp:31
void Read() override
Definition: ToyPackets.cpp:51
std::map< uint32, bool > ToyBoxContainer
Definition: CollectionMgr.h:45
Definition: Packet.h:59
ToySetFavorite(WorldPacket &&packet)
Definition: ToyPackets.h:65
Definition: Opcodes.h:711
ObjectGuid Guid
Definition: ToyPackets.h:37
Definition: Packet.h:46
uint32_t uint32
Definition: Define.h:150
void Read() override
Definition: ToyPackets.cpp:20
Definition: BattlegroundMgr.h:57
bool Favorite
Definition: ToyPackets.h:70
AccountToysUpdate()
Definition: ToyPackets.h:54
Definition: Opcodes.h:731
Definition: SpellPackets.h:247
Definition: ToyPackets.h:40
Definition: ObjectGuid.h:189
uint32 ItemID
Definition: ToyPackets.h:69
WorldPackets::Spells::SpellCastRequest Cast
Definition: ToyPackets.h:47
Definition: WorldPacket.h:26
UseToy(WorldPacket &&packet)
Definition: ToyPackets.h:43
Definition: Opcodes.h:682
Definition: ToyPackets.h:51