forked from cmangos/mangos-tbc
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTemplateMgr.h
115 lines (94 loc) · 2.43 KB
/
TemplateMgr.h
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#ifndef _TEMPLATE_MGR
#define _TEMPLATE_MGR
#include "precompiled.h"
enum TemplateItemEntry {
};
enum TemplateSpellEntry {
// Warrior
DEFAULT_WARRIOR = 1,
PVP_WARRIOR_ARMS_SWEEPING_STRIKES,
PVP_WARRIOR_ARMS_ENDLESS_RAGE,
PVP_WARRIOR_ARMS_FLURRY,
// Paladin
DEFAULT_PALADIN,
PVP_PALADIN_HOLY,
PVP_PALADIN_RETRIBUTION,
// Hunter
DEFAULT_HUNTER,
PVP_HUNTER_MARKSMANSHIP,
PVP_HUNTER_BEAST_MASTERY,
PVP_HUNTER_SURVIVAL,
// Rogue
DEFAULT_ROGUE,
PVP_ROGUE_MUTILATE,
PVP_ROGUE_COMBAT_FULL,
PVP_ROGUE_COMBAT_WITH_HEMORRHAGE,
PVP_ROGUE_SHADOWSTEP,
// Priest
DEFAULT_PRIEST,
PVP_PRIEST_DISCIPLINE_DEFENSIVE,
PVP_PRIEST_DISCIPLINE_OFFENSIVE,
PVP_PRIEST_SHADOW,
// Shaman
DEFAULT_SHAMAN,
PVP_SHAMAN_ELEMENTAL,
PVP_SHAMAN_ENHANCEMENT,
PVP_SHAMAN_RESTORATION_MANA_TIDE_TOTEM,
PVP_SHAMAN_RESTORATION_IMP_HEALING_WAVE,
// Mage
DEFAULT_MAGE,
PVP_MAGE_FROST,
PVP_MAGE_FIRE_IMP_COUNTERSPELL,
PVP_MAGE_FIRE_ICY_VEINS,
// Warlock
DEFAULT_WARLOCK,
PVP_WARLOCK_AFFLICTION,
PVP_WARLOCK_SIPHON_LIFE_SOUL_LINK,
PVP_WARLOCK_DESTRUCTION,
// Druid
DEFAULT_DRUID,
PVP_DRUID_BALANCE_NATURES_SWIFTNESS,
PVP_DRUID_BALANCE_TREANTS,
PVP_DRUID_FERAL_COMBAT,
PVP_DRUID_RESTORATION_FULL,
PVP_DRUID_RESTORATION_DREAMSTATE
};
enum TemplateReputationEntry {
};
struct TemplateItem
{
uint32 itemEntry;
uint32 itemAmount;
uint32 enchantEntry;
uint32 gemEnchantEntry[MAX_GEM_SOCKETS];
};
struct TemplateReputation
{
uint32 factionEntry;
uint32 factionStanding;
};
typedef std::unordered_map<uint32, std::vector<TemplateItem>> TemplateItems;
typedef std::unordered_map<uint32, std::vector<uint32> /*spellEntry*/> TemplateSpells;
typedef std::unordered_map<uint32, std::vector<TemplateReputation>> TemplateReputations;
class TemplateMgr
{
public:
TemplateMgr()
{
LoadItems();
LoadSpells();
LoadReputations();
}
void AddItems(Player* player, TemplateItemEntry te);
void AddSpells(Player* player, TemplateSpellEntry te);
void AddReputations(Player* player, TemplateReputationEntry te);
private:
void LoadItems();
void LoadSpells();
void LoadReputations();
TemplateItems templateItems;
TemplateSpells templateSpells;
TemplateReputations templateReputations;
};
#define sTemplateMgr MaNGOS::Singleton<TemplateMgr>::Instance()
#endif