-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathAttributes.cpp
65 lines (53 loc) · 1.12 KB
/
Attributes.cpp
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
#include "StdAfx.h"
#include "attributes.h"
#include "TurbineXPTable.h"
#include "Rules.h"
DWORD GetAttributeXP(DWORD Level)
{
XPTABLE* pXPTable = g_pGameRules->GetXPTable();
if (pXPTable)
return pXPTable->GetAttributeXP(Level);
else
return 0;
}
DWORD GetAttributeLevel(DWORD XP)
{
XPTABLE* pXPTable = g_pGameRules->GetXPTable();
if (pXPTable)
return pXPTable->GetAttributeLevel(XP);
else
return 0;
}
DWORD GetAttributeMax()
{
XPTABLE* pXPTable = g_pGameRules->GetXPTable();
if (pXPTable)
return pXPTable->GetAttributeMax();
else
return 0;
}
DWORD GetAttributeMaxXP()
{
XPTABLE* pXPTable = g_pGameRules->GetXPTable();
if (pXPTable)
return pXPTable->GetAttributeMaxXP();
else
return 0;
}
const char* GetAttributeName(eAttribute index)
{
switch (index)
{
case eStrength: return "Strength";
case eEndurance: return "Endurance";
case eCoordination: return "Coordination";
case eQuickness: return "Quickness";
case eFocus: return "Focus";
case eSelf: return "Self";
default: return "";
}
}
DWORD GetAttributeMax(ATTRIBUTE *pAttrib, float fVitae)
{
return (pAttrib->data.base + pAttrib->data.raises);
}