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 bool Unused1125 = false;
66 };
67
69 {
72 bool IsPetTalents = false;
73 std::vector<ClassicTalentGroupInfo> Talents;
74 };
75
76 class UpdateTalentData final : public ServerPacket
77 {
78 public:
80
81 WorldPacket const* Write() override;
82
84 };
85
86 class LearnTalents final : public ClientPacket
87 {
88 public:
89 explicit LearnTalents(WorldPacket&& packet) : ClientPacket(CMSG_LEARN_TALENTS, std::move(packet)) { }
90
91 void Read() override;
93 };
94
95 class RespecWipeConfirm final : public ServerPacket
96 {
97 public:
99
100 WorldPacket const* Write() override;
101
105 };
106
107 class ConfirmRespecWipe final : public ClientPacket
108 {
109 public:
111
112 void Read() override;
113
116 };
117
118 class LearnTalentFailed final : public ServerPacket
119 {
120 public:
122
123 WorldPacket const* Write() override;
124
127 std::vector<uint16> Talents;
128 };
129
131 {
132 GlyphBinding(uint32 spellId = 0, uint16 glyphId = 0) : SpellID(spellId), GlyphID(glyphId) { }
133
136 };
137
138 class ActiveGlyphs final : public ServerPacket
139 {
140 public:
142
143 WorldPacket const* Write() override;
144
145 std::vector<GlyphBinding> Glyphs;
146 bool IsFullUpdate = false;
147 };
148
149 class LearnPvpTalents final : public ClientPacket
150 {
151 public:
152 explicit LearnPvpTalents(WorldPacket&& packet) : ClientPacket(CMSG_LEARN_PVP_TALENTS, std::move(packet)) { }
153
154 void Read() override;
155
157 };
158
160 {
161 public:
163
164 WorldPacket const* Write() override;
165
168 std::vector<PvPTalent> Talents;
169 };
170
171 ByteBuffer& operator<<(ByteBuffer& data, ClassicTalentInfoUpdate const& talentInfoInfo);
172 }
173}
174
175#endif // TRINITYCORE_TALENT_PACKETS_H
#define MAX_PVP_TALENT_SLOTS
Definition DBCEnums.h:2795
#define MAX_TALENT_TIERS
Definition DBCEnums.h:2793
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:2222
@ SMSG_LEARN_PVP_TALENT_FAILED
Definition Opcodes.h:1774
@ SMSG_ACTIVE_GLYPHS
Definition Opcodes.h:1116
@ SMSG_UPDATE_TALENT_DATA
Definition Opcodes.h:2430
@ SMSG_LEARN_TALENT_FAILED
Definition Opcodes.h:1775
@ CMSG_LEARN_PVP_TALENTS
Definition Opcodes.h:522
@ CMSG_CONFIRM_RESPEC_WIPE
Definition Opcodes.h:283
@ CMSG_LEARN_TALENTS
Definition Opcodes.h:523
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