TrinityCore
Loading...
Searching...
No Matches
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 TRINITYCORE_TALENT_PACKETS_H
19#define TRINITYCORE_TALENT_PACKETS_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 std::vector<uint32> GlyphIDs;
42 };
43
45 {
48 std::vector<TalentGroupInfo> TalentGroups;
49 };
50
52 {
55 };
56
58 {
60 std::vector<ClassicTalentEntry> Talents;
62 std::vector<uint16> GlyphIDs;
65 };
66
68 {
71 bool IsPetTalents = false;
72 std::vector<ClassicTalentGroupInfo> Talents;
73 };
74
75 class UpdateTalentData final : public ServerPacket
76 {
77 public:
79
80 WorldPacket const* Write() override;
81
83 };
84
85 class LearnTalents final : public ClientPacket
86 {
87 public:
88 explicit LearnTalents(WorldPacket&& packet) : ClientPacket(CMSG_LEARN_TALENTS, std::move(packet)) { }
89
90 void Read() override;
92 };
93
94 class RespecWipeConfirm final : public ServerPacket
95 {
96 public:
98
99 WorldPacket const* Write() override;
100
104 };
105
106 class ConfirmRespecWipe final : public ClientPacket
107 {
108 public:
110
111 void Read() override;
112
115 };
116
118 {
119 public:
120 explicit TalentsInvoluntarilyReset(bool isPetTalents) : ServerPacket(SMSG_TALENTS_INVOLUNTARILY_RESET, 1), IsPetTalents(isPetTalents) { }
121
122 WorldPacket const* Write() override;
123
124 bool IsPetTalents = false;
125 };
126
127 class LearnTalentFailed final : public ServerPacket
128 {
129 public:
131
132 WorldPacket const* Write() override;
133
136 std::vector<uint16> Talents;
137 };
138
140 {
141 GlyphBinding(uint32 spellId = 0, uint16 glyphId = 0) : SpellID(spellId), GlyphID(glyphId) { }
142
145 };
146
147 class ActiveGlyphs final : public ServerPacket
148 {
149 public:
151
152 WorldPacket const* Write() override;
153
154 std::vector<GlyphBinding> Glyphs;
155 bool IsFullUpdate = false;
156 };
157
158 class LearnPvpTalents final : public ClientPacket
159 {
160 public:
161 explicit LearnPvpTalents(WorldPacket&& packet) : ClientPacket(CMSG_LEARN_PVP_TALENTS, std::move(packet)) { }
162
163 void Read() override;
164
166 };
167
169 {
170 public:
172
173 WorldPacket const* Write() override;
174
177 std::vector<PvPTalent> Talents;
178 };
179
180 ByteBuffer& operator<<(ByteBuffer& data, ClassicTalentInfoUpdate const& talentInfoInfo);
181 }
182}
183
184#endif // TRINITYCORE_TALENT_PACKETS_H
#define MAX_PVP_TALENT_SLOTS
Definition DBCEnums.h:2815
#define MAX_TALENT_TIERS
Definition DBCEnums.h:2813
uint8_t uint8
Definition Define.h:156
int8_t int8
Definition Define.h:152
int32_t int32
Definition Define.h:150
uint16_t uint16
Definition Define.h:155
uint32_t uint32
Definition Define.h:154
@ SMSG_RESPEC_WIPE_CONFIRM
Definition Opcodes.h:2256
@ SMSG_LEARN_PVP_TALENT_FAILED
Definition Opcodes.h:1805
@ SMSG_ACTIVE_GLYPHS
Definition Opcodes.h:1136
@ SMSG_UPDATE_TALENT_DATA
Definition Opcodes.h:2464
@ SMSG_TALENTS_INVOLUNTARILY_RESET
Definition Opcodes.h:2404
@ SMSG_LEARN_TALENT_FAILED
Definition Opcodes.h:1806
@ CMSG_LEARN_PVP_TALENTS
Definition Opcodes.h:538
@ CMSG_CONFIRM_RESPEC_WIPE
Definition Opcodes.h:284
@ CMSG_LEARN_TALENTS
Definition Opcodes.h:539
std::vector< GlyphBinding > Glyphs
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
Array< uint16, MAX_TALENT_TIERS > Talents
LearnTalents(WorldPacket &&packet)
WorldPacket const * Write() override
WorldPacket const * Write() override
ByteBuffer & operator<<(ByteBuffer &data, PvPTalent const &pvpTalent)
STL namespace.
std::vector< ClassicTalentEntry > Talents
std::vector< ClassicTalentGroupInfo > Talents
GlyphBinding(uint32 spellId=0, uint16 glyphId=0)
std::vector< PvPTalent > PvPTalents
std::vector< TalentGroupInfo > TalentGroups