forked from derandark/PhatAC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Attributes.h
62 lines (49 loc) · 927 Bytes
/
Attributes.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
#pragma once
enum eAttribute
{
eStrength = 0x01,
eEndurance = 0x02,
eQuickness = 0x03,
eCoordination = 0x04,
eFocus = 0x05,
eSelf = 0x06,
};
#pragma pack(push, 1)
struct _ATTRIBUTEDATA
{
DWORD raises;
DWORD base;
DWORD exp;
};
#pragma pack(pop)
struct ATTRIBUTE;
extern DWORD GetAttributeXP(DWORD Level);
extern DWORD GetAttributeLevel(DWORD XP);
extern DWORD GetAttributeMax();
extern DWORD GetAttributeMaxXP();
extern const char* GetAttributeName(eAttribute index);
extern DWORD GetAttributeMax(ATTRIBUTE *pAttrib, float fVitae);
struct ATTRIBUTE
{
ATTRIBUTE()
{
data.raises = 0;
data.base = 10;
data.exp = 0;
}
void SetBase(DWORD dwBase)
{
data.base = dwBase;
}
void SetRaises(DWORD dwRaises)
{
data.raises = dwRaises;
data.exp = GetAttributeXP(dwRaises);
}
void SetExperience(DWORD dwXP)
{
data.exp = dwXP;
data.raises = GetAttributeLevel(dwXP);
}
_ATTRIBUTEDATA data;
};