TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
TalentPackets.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 TalentPackets_h__
19 #define TalentPackets_h__
20 
21 #include "Packet.h"
22 #include "Player.h"
23 
24 namespace WorldPackets
25 {
26  namespace Talent
27  {
29  {
31  std::vector<uint16> TalentIDs;
33  };
34 
36  {
38  std::vector<TalentGroupInfo> TalentGroups;
39  };
40 
41  class UpdateTalentData final : public ServerPacket
42  {
43  public:
45 
46  WorldPacket const* Write() override;
47 
49  };
50 
51  class SetSpecialization final : public ClientPacket
52  {
53  public:
55 
56  void Read() override;
57 
59  };
60 
61  class LearnTalents final : public ClientPacket
62  {
63  public:
64  LearnTalents(WorldPacket&& packet) : ClientPacket(std::move(packet))
65  {
66  ASSERT(packet.GetOpcode() == CMSG_LEARN_TALENTS);
67  }
68 
69  void Read() override;
70  std::vector<uint16> Talents;
71  };
72 
73  class RespecWipeConfirm final : public ServerPacket
74  {
75  public:
77 
78  WorldPacket const* Write() override;
79 
81  uint32 Cost = 0;
83  };
84 
85  class ConfirmRespecWipe final : public ClientPacket
86  {
87  public:
89 
90  void Read() override;
91 
94  };
95 
96  }
97 }
98 
99 #endif // TalentPackets_h__
Definition: Opcodes.h:228
ObjectGuid RespecMaster
Definition: TalentPackets.h:92
Definition: Opcodes.h:1602
uint32 SpecGroupIndex
Definition: TalentPackets.h:58
int8_t int8
Definition: Define.h:148
WorldPacket const * Write() override
Definition: TalentPackets.cpp:20
Definition: Opcodes.h:1455
Definition: TalentPackets.h:85
std::vector< TalentGroupInfo > TalentGroups
Definition: TalentPackets.h:38
STL namespace.
uint32 SpecID
Definition: TalentPackets.h:30
void Read() override
Definition: TalentPackets.cpp:46
int8 RespecType
Definition: TalentPackets.h:82
uint8 RespecType
Definition: TalentPackets.h:93
std::vector< uint16 > Talents
Definition: TalentPackets.h:70
Definition: TalentPackets.h:61
Definition: Packet.h:59
TalentInfoUpdate Info
Definition: TalentPackets.h:48
#define MAX_GLYPH_SLOT_INDEX
Definition: SharedDefines.h:854
Definition: TalentPackets.h:51
Definition: Packet.h:46
Definition: TalentPackets.h:28
uint32_t uint32
Definition: Define.h:150
uint16_t uint16
Definition: Define.h:151
SetSpecialization(WorldPacket &&packet)
Definition: TalentPackets.h:54
uint32 Cost
Definition: TalentPackets.h:81
uint16 GlyphIDs[MAX_GLYPH_SLOT_INDEX]
Definition: TalentPackets.h:32
ObjectGuid RespecMaster
Definition: TalentPackets.h:80
std::vector< uint16 > TalentIDs
Definition: TalentPackets.h:31
Definition: BattlegroundMgr.h:57
Definition: TalentPackets.h:41
void Read() override
Definition: TalentPackets.cpp:67
WorldPacket const * Write() override
Definition: TalentPackets.cpp:59
Definition: Opcodes.h:363
Definition: TalentPackets.h:35
uint8_t uint8
Definition: Define.h:152
#define ASSERT
Definition: Errors.h:55
Definition: Opcodes.h:636
Definition: TalentPackets.h:73
Definition: ObjectGuid.h:189
uint8 ActiveGroup
Definition: TalentPackets.h:37
ConfirmRespecWipe(WorldPacket &&packet)
Definition: TalentPackets.h:88
void Read() override
Definition: TalentPackets.cpp:40
UpdateTalentData()
Definition: TalentPackets.h:44
Definition: WorldPacket.h:26
RespecWipeConfirm()
Definition: TalentPackets.h:76
LearnTalents(WorldPacket &&packet)
Definition: TalentPackets.h:64