-
Notifications
You must be signed in to change notification settings - Fork 2
/
SkillSlot.h
59 lines (52 loc) · 1.43 KB
/
SkillSlot.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
/**
* @file SkillSlot.h
* @author Andrew Spaulding (Kasplat)
* @brief A class-enum for converting attribute IDs to skill slots.
* @bug No known bugs.
*/
#ifndef __SKYRIM_UNCAPPER_AE_SKILL_SLOT_H__
#define __SKYRIM_UNCAPPER_AE_SKILL_SLOT_H__
#include "ActorAttribute.h"
/**
* @brief Encodes the various skill slots of the player.
*/
class SkillSlot {
public:
/**
* @brief Encodes the skills in the order of their IDs.
*
* Note that we must subtract 6 from an ActorAttribute to convert it to
* this enum. As such, the order of the values in this enumeration
* MUST NOT be changed.
*/
enum t {
OneHanded,
TwoHanded,
Marksman,
Block,
Smithing,
HeavyArmor,
LightArmor,
Pickpocket,
LockPicking,
Sneak,
Alchemy,
SpeechCraft,
Alteration,
Conjuration,
Destruction,
Illusion,
Restoration,
Enchanting,
kCount
};
private:
/// @brief Used to convert a skill enum to a skill name.
static const char *const kSkillNames[kCount];
/// @brief Offset from raw skill IDs to the skill enumeration values.
static const unsigned int kOffset = 6;
public:
static t FromAttribute(ActorAttribute::t attr);
static const char *Str(t slot);
};
#endif /* __SKYRIM_UNCAPPER_AE_SKILL_SLOT_H__ */