TrinityCore
TalentPackets.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 TalentPackets_h__
19#define TalentPackets_h__
20
21#include "Packet.h"
22#include "DBCEnums.h"
23#include "ObjectGuid.h"
24#include "PacketUtilities.h"
25
26namespace WorldPackets
27{
28 namespace Talent
29 {
30 struct PvPTalent
31 {
34 };
35
37 {
39 std::vector<uint16> TalentIDs;
40 std::vector<PvPTalent> PvPTalents;
41 };
42
44 {
47 std::vector<TalentGroupInfo> TalentGroups;
48 };
49
50 class UpdateTalentData final : public ServerPacket
51 {
52 public:
54
55 WorldPacket const* Write() override;
56
58 };
59
60 class LearnTalents final : public ClientPacket
61 {
62 public:
64
65 void Read() override;
67 };
68
69 class RespecWipeConfirm final : public ServerPacket
70 {
71 public:
73
74 WorldPacket const* Write() override;
75
79 };
80
81 class ConfirmRespecWipe final : public ClientPacket
82 {
83 public:
85
86 void Read() override;
87
90 };
91
92 class LearnTalentFailed final : public ServerPacket
93 {
94 public:
96
97 WorldPacket const* Write() override;
98
101 std::vector<uint16> Talents;
102 };
103
105 {
106 GlyphBinding(uint32 spellId = 0, uint16 glyphId = 0) : SpellID(spellId), GlyphID(glyphId) { }
107
110 };
111
112 class ActiveGlyphs final : public ServerPacket
113 {
114 public:
116
117 WorldPacket const* Write() override;
118
119 std::vector<GlyphBinding> Glyphs;
120 bool IsFullUpdate = false;
121 };
122
123 class LearnPvpTalents final : public ClientPacket
124 {
125 public:
127
128 void Read() override;
129
131 };
132
134 {
135 public:
137
138 WorldPacket const* Write() override;
139
142 std::vector<PvPTalent> Talents;
143 };
144 }
145}
146
147#endif // TalentPackets_h__
#define MAX_PVP_TALENT_SLOTS
Definition: DBCEnums.h:2134
#define MAX_TALENT_TIERS
Definition: DBCEnums.h:2132
uint8_t uint8
Definition: Define.h:144
int8_t int8
Definition: Define.h:140
int32_t int32
Definition: Define.h:138
uint16_t uint16
Definition: Define.h:143
uint32_t uint32
Definition: Define.h:142
std::vector< GlyphBinding > Glyphs
WorldPacket const * Write() override
ConfirmRespecWipe(WorldPacket &&packet)
Definition: TalentPackets.h:84
WorldPacket const * Write() override
LearnPvpTalents(WorldPacket &&packet)
WorldPacket const * Write() override
Array< uint16, MAX_TALENT_TIERS > Talents
Definition: TalentPackets.h:66
LearnTalents(WorldPacket &&packet)
Definition: TalentPackets.h:63
WorldPacket const * Write() override
WorldPacket const * Write() override
@ CMSG_LEARN_PVP_TALENTS
Definition: Opcodes.h:450
@ CMSG_CONFIRM_RESPEC_WIPE
Definition: Opcodes.h:281
@ CMSG_LEARN_TALENTS
Definition: Opcodes.h:451
@ SMSG_RESPEC_WIPE_CONFIRM
Definition: Opcodes.h:1854
@ SMSG_LEARN_PVP_TALENT_FAILED
Definition: Opcodes.h:1470
@ SMSG_ACTIVE_GLYPHS
Definition: Opcodes.h:918
@ SMSG_UPDATE_TALENT_DATA
Definition: Opcodes.h:2040
@ SMSG_LEARN_TALENT_FAILED
Definition: Opcodes.h:1471
STL namespace.
GlyphBinding(uint32 spellId=0, uint16 glyphId=0)
std::vector< PvPTalent > PvPTalents
Definition: TalentPackets.h:40
std::vector< TalentGroupInfo > TalentGroups
Definition: TalentPackets.h:47