TrinityCore
InspectPackets.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#pragma once
19
20#include "Packet.h"
21#include "CharacterPackets.h"
22#include "DBCEnums.h"
23#include "ItemPacketsCommon.h"
24#include "ObjectGuid.h"
25#include "RaceMask.h"
26#include "SharedDefines.h"
27#include "TraitPacketsCommon.h"
28
29class Item;
30class Player;
31
32namespace WorldPackets
33{
34 namespace Inspect
35 {
36 class Inspect final : public ClientPacket
37 {
38 public:
39 Inspect(WorldPacket&& packet) : ClientPacket(CMSG_INSPECT, std::move(packet)) { }
40
41 void Read() override;
42
44 };
45
47 {
48 InspectEnchantData(uint32 id, uint8 index) : Id(id), Index(index) { }
49
52 };
53
55 {
59 bool SlotUnlocked = false;
60 };
61
63 {
64 InspectItemData(::Item const* item, uint8 index);
65
69 bool Usable = false;
70 std::vector<InspectEnchantData> Enchants;
71 std::vector<Item::ItemGemData> Gems;
72 std::vector<int32> AzeritePowers;
73 std::vector<AzeriteEssenceData> AzeriteEssences;
74 };
75
77 {
79 std::vector<InspectItemData> Items;
80 std::string Name;
85 std::vector<Character::ChrCustomizationChoice> Customizations;
86
87 void Initialize(Player const* player);
88 };
89
91 {
95 };
96
98 {
117 bool Disqualified = false;
118 };
119
121 {
125 };
126
127 class InspectResult final : public ServerPacket
128 {
129 public:
131 {
132 PvpTalents.fill(0);
133 }
134
135 WorldPacket const* Write() override;
136
138 std::vector<uint16> Glyphs;
139 std::vector<uint16> Talents;
140 std::array<uint16, MAX_PVP_TALENT_SLOTS> PvpTalents;
142 std::array<PVPBracketData, 9> Bracket;
151 };
152
154 {
155 public:
157
158 void Read() override;
159
161 };
162
164 }
165}
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint16_t uint16
Definition: Define.h:143
uint32_t uint32
Definition: Define.h:142
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:25
@ RACE_NONE
Definition: RaceMask.h:27
@ CLASS_NONE
@ GENDER_NONE
Definition: Item.h:170
PlayerModelDisplayInfo DisplayInfo
std::array< PVPBracketData, 9 > Bracket
WorldPacket const * Write() override
std::array< uint16, MAX_PVP_TALENT_SLOTS > PvpTalents
Optional< InspectGuildData > GuildData
Inspect(WorldPacket &&packet)
@ CMSG_QUERY_INSPECT_ACHIEVEMENTS
Definition: Opcodes.h:645
@ CMSG_INSPECT
Definition: Opcodes.h:440
@ SMSG_INSPECT_RESULT
Definition: Opcodes.h:1429
STL namespace.
InspectEnchantData(uint32 id, uint8 index)
std::vector< InspectEnchantData > Enchants
std::vector< Item::ItemGemData > Gems
std::vector< AzeriteEssenceData > AzeriteEssences
InspectItemData(::Item const *item, uint8 index)
std::vector< InspectItemData > Items
std::vector< Character::ChrCustomizationChoice > Customizations