blob: 4b97dd8d10e98e9c9291a429b64831f190ef2af4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TRINITYCORE_TRAIT_PACKETS_COMMON_H
#define TRINITYCORE_TRAIT_PACKETS_COMMON_H
#include "PacketUtilities.h"
enum class TraitCombatConfigFlags : int32;
enum class TraitConfigType : int32;
namespace UF
{
struct TraitConfig;
struct TraitEntry;
struct TraitSubTreeCache;
}
namespace WorldPackets::Traits
{
struct TraitEntry
{
TraitEntry();
explicit TraitEntry(UF::TraitEntry const& ufEntry);
int32 TraitNodeID = 0;
int32 TraitNodeEntryID = 0;
int32 Rank = 0;
int32 GrantedRanks = 0;
int32 BonusRanks = 0;
};
struct TraitSubTreeCache
{
TraitSubTreeCache();
explicit TraitSubTreeCache(UF::TraitSubTreeCache const& ufSubTreeCache);
int32 TraitSubTreeID = 0;
std::vector<TraitEntry> Entries;
bool Active = false;
};
struct TraitConfig
{
TraitConfig();
explicit TraitConfig(UF::TraitConfig const& ufConfig);
int32 ID = 0;
TraitConfigType Type = {};
int32 ChrSpecializationID = 0;
TraitCombatConfigFlags CombatConfigFlags = {};
int32 LocalIdentifier = 0; // Local to specialization
int32 SkillLineID = 0;
int32 TraitSystemID = 0;
int32 VariationID = 0;
std::vector<TraitEntry> Entries;
std::vector<TraitSubTreeCache> SubTrees;
String<259> Name;
};
ByteBuffer& operator>>(ByteBuffer& data, TraitEntry& traitEntry);
ByteBuffer& operator<<(ByteBuffer& data, TraitEntry const& traitEntry);
ByteBuffer& operator>>(ByteBuffer& data, TraitSubTreeCache& traitSubTreeCache);
ByteBuffer& operator<<(ByteBuffer& data, TraitSubTreeCache const& traitSubTreeCache);
ByteBuffer& operator>>(ByteBuffer& data, TraitConfig& traitConfig);
ByteBuffer& operator<<(ByteBuffer& data, TraitConfig const& traitConfig);
}
#endif // TRINITYCORE_TRAIT_PACKETS_COMMON_H
|