-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathattributes.go
61 lines (58 loc) · 1.61 KB
/
attributes.go
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
package d2s
// All attribute ids described.
const (
strength = 0
energy = 1
dexterity = 2
vitality = 3
unusedStats = 4
unusedSkills = 5
currentHP = 6
maxHP = 7
currentMana = 8
maxMana = 9
currentStamina = 10
maxStamina = 11
level = 12
experience = 13
gold = 14
stashedGold = 15
)
// Attributes are the different type of attributes a character can have.
type Attributes struct {
Strength uint64 `json:"strength"`
Energy uint64 `json:"energy"`
Dexterity uint64 `json:"dexterity"`
Vitality uint64 `json:"vitality"`
UnusedStats uint64 `json:"unused_stats"`
UnusedSkillPoints uint64 `json:"unused_skill_points"`
CurrentHP uint64 `json:"current_hp"`
MaxHP uint64 `json:"max_hp"`
CurrentMana uint64 `json:"current_mana"`
MaxMana uint64 `json:"max_mana"`
CurrentStamina uint64 `json:"current_stamina"`
MaxStamina uint64 `json:"max_stamina"`
Level uint64 `json:"level"`
Experience uint64 `json:"experience"`
Gold uint64 `json:"gold"`
StashedGold uint64 `json:"stashed_gold"`
}
// Holds all the references to bit sizes of all attributes.
var attributeBitMap = map[uint64]uint{
strength: 10,
energy: 10,
dexterity: 10,
vitality: 10,
unusedStats: 10,
unusedSkills: 8,
currentHP: 21,
maxHP: 21,
currentMana: 21,
maxMana: 21,
currentStamina: 21,
maxStamina: 21,
level: 7,
experience: 32,
gold: 25,
stashedGold: 25,
}