Add levels and fix tz?
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
package area
|
||||
|
||||
type Area int
|
||||
type ID int
|
||||
|
||||
func (a Area) IsTown() bool {
|
||||
type Area struct {
|
||||
ID
|
||||
Name string
|
||||
}
|
||||
|
||||
func (a ID) IsTown() bool {
|
||||
switch a {
|
||||
case RogueEncampment, LutGholein, KurastDocks, ThePandemoniumFortress, Harrogath:
|
||||
return true
|
||||
@@ -11,7 +16,7 @@ func (a Area) IsTown() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (a Area) Act() int {
|
||||
func (a ID) Act() int {
|
||||
if a < 40 {
|
||||
return 1
|
||||
}
|
||||
@@ -29,146 +34,146 @@ func (a Area) Act() int {
|
||||
}
|
||||
|
||||
const (
|
||||
Abaddon Area = 125
|
||||
AncientTunnels Area = 65
|
||||
ArcaneSanctuary Area = 74
|
||||
ArreatPlateau Area = 112
|
||||
ArreatSummit Area = 120
|
||||
Barracks Area = 28
|
||||
BlackMarsh Area = 6
|
||||
BloodMoor Area = 2
|
||||
BloodyFoothills Area = 110
|
||||
BurialGrounds Area = 17
|
||||
CanyonOfTheMagi Area = 46
|
||||
CatacombsLevel1 Area = 34
|
||||
CatacombsLevel2 Area = 35
|
||||
CatacombsLevel3 Area = 36
|
||||
CatacombsLevel4 Area = 37
|
||||
Cathedral Area = 33
|
||||
CaveLevel1 Area = 9
|
||||
CaveLevel2 Area = 13
|
||||
ChaosSanctuary Area = 108
|
||||
CityOfTheDamned Area = 106
|
||||
ClawViperTempleLevel1 Area = 58
|
||||
ClawViperTempleLevel2 Area = 61
|
||||
ColdPlains Area = 3
|
||||
Crypt Area = 18
|
||||
CrystallinePassage Area = 113
|
||||
DarkWood Area = 5
|
||||
DenOfEvil Area = 8
|
||||
DisusedFane Area = 95
|
||||
DisusedReliquary Area = 99
|
||||
DrifterCavern Area = 116
|
||||
DryHills Area = 42
|
||||
DuranceOfHateLevel1 Area = 100
|
||||
DuranceOfHateLevel2 Area = 101
|
||||
DuranceOfHateLevel3 Area = 102
|
||||
DurielsLair Area = 73
|
||||
FarOasis Area = 43
|
||||
FlayerDungeonLevel1 Area = 88
|
||||
FlayerDungeonLevel2 Area = 89
|
||||
FlayerDungeonLevel3 Area = 91
|
||||
FlayerJungle Area = 78
|
||||
ForgottenReliquary Area = 96
|
||||
ForgottenSands Area = 134
|
||||
ForgottenTemple Area = 97
|
||||
ForgottenTower Area = 20
|
||||
FrigidHighlands Area = 111
|
||||
FrozenRiver Area = 114
|
||||
FrozenTundra Area = 117
|
||||
FurnaceOfPain Area = 135
|
||||
GlacialTrail Area = 115
|
||||
GreatMarsh Area = 77
|
||||
HallsOfAnguish Area = 122
|
||||
HallsOfPain Area = 123
|
||||
HallsOfTheDeadLevel1 Area = 56
|
||||
HallsOfTheDeadLevel2 Area = 57
|
||||
HallsOfTheDeadLevel3 Area = 60
|
||||
HallsOfVaught Area = 124
|
||||
HaremLevel1 Area = 50
|
||||
HaremLevel2 Area = 51
|
||||
Harrogath Area = 109
|
||||
HoleLevel1 Area = 11
|
||||
HoleLevel2 Area = 15
|
||||
IcyCellar Area = 119
|
||||
InfernalPit Area = 127
|
||||
InnerCloister Area = 32
|
||||
JailLevel1 Area = 29
|
||||
JailLevel2 Area = 30
|
||||
JailLevel3 Area = 31
|
||||
KurastBazaar Area = 80
|
||||
KurastCauseway Area = 82
|
||||
KurastDocks Area = 75
|
||||
LostCity Area = 44
|
||||
LowerKurast Area = 79
|
||||
LutGholein Area = 40
|
||||
MaggotLairLevel1 Area = 62
|
||||
MaggotLairLevel2 Area = 63
|
||||
MaggotLairLevel3 Area = 64
|
||||
MatronsDen Area = 133
|
||||
Mausoleum Area = 19
|
||||
MonasteryGate Area = 26
|
||||
MooMooFarm Area = 39
|
||||
NihlathaksTemple Area = 121
|
||||
None Area = 0
|
||||
OuterCloister Area = 27
|
||||
OuterSteppes Area = 104
|
||||
PalaceCellarLevel1 Area = 52
|
||||
PalaceCellarLevel2 Area = 53
|
||||
PalaceCellarLevel3 Area = 54
|
||||
PitLevel1 Area = 12
|
||||
PitLevel2 Area = 16
|
||||
PitOfAcheron Area = 126
|
||||
PlainsOfDespair Area = 105
|
||||
RiverOfFlame Area = 107
|
||||
RockyWaste Area = 41
|
||||
RogueEncampment Area = 1
|
||||
RuinedFane Area = 98
|
||||
RuinedTemple Area = 94
|
||||
SewersLevel1Act2 Area = 47
|
||||
SewersLevel1Act3 Area = 92
|
||||
SewersLevel2Act2 Area = 48
|
||||
SewersLevel2Act3 Area = 93
|
||||
SewersLevel3Act2 Area = 49
|
||||
SpiderCave Area = 84
|
||||
SpiderCavern Area = 85
|
||||
SpiderForest Area = 76
|
||||
StonyField Area = 4
|
||||
StonyTombLevel1 Area = 55
|
||||
StonyTombLevel2 Area = 59
|
||||
SwampyPitLevel1 Area = 86
|
||||
SwampyPitLevel2 Area = 87
|
||||
SwampyPitLevel3 Area = 90
|
||||
TalRashasTomb1 Area = 66
|
||||
TalRashasTomb2 Area = 67
|
||||
TalRashasTomb3 Area = 68
|
||||
TalRashasTomb4 Area = 69
|
||||
TalRashasTomb5 Area = 70
|
||||
TalRashasTomb6 Area = 71
|
||||
TalRashasTomb7 Area = 72
|
||||
TamoeHighland Area = 7
|
||||
TheAncientsWay Area = 118
|
||||
ThePandemoniumFortress Area = 103
|
||||
TheWorldstoneChamber Area = 132
|
||||
TheWorldStoneKeepLevel1 Area = 128
|
||||
TheWorldStoneKeepLevel2 Area = 129
|
||||
TheWorldStoneKeepLevel3 Area = 130
|
||||
ThroneOfDestruction Area = 131
|
||||
TowerCellarLevel1 Area = 21
|
||||
TowerCellarLevel2 Area = 22
|
||||
TowerCellarLevel3 Area = 23
|
||||
TowerCellarLevel4 Area = 24
|
||||
TowerCellarLevel5 Area = 25
|
||||
Travincal Area = 83
|
||||
Tristram Area = 38
|
||||
UberTristram Area = 136
|
||||
UndergroundPassageLevel1 Area = 10
|
||||
UndergroundPassageLevel2 Area = 14
|
||||
UpperKurast Area = 81
|
||||
ValleyOfSnakes Area = 45
|
||||
MapsAncientTemple Area = 137
|
||||
MapsDesecratedTemple Area = 138
|
||||
MapsFrigidPlateau Area = 139
|
||||
MapsInfernalTrial Area = 140
|
||||
MapsRuinedCitadel Area = 141
|
||||
Abaddon ID = 125
|
||||
AncientTunnels ID = 65
|
||||
ArcaneSanctuary ID = 74
|
||||
ArreatPlateau ID = 112
|
||||
ArreatSummit ID = 120
|
||||
Barracks ID = 28
|
||||
BlackMarsh ID = 6
|
||||
BloodMoor ID = 2
|
||||
BloodyFoothills ID = 110
|
||||
BurialGrounds ID = 17
|
||||
CanyonOfTheMagi ID = 46
|
||||
CatacombsLevel1 ID = 34
|
||||
CatacombsLevel2 ID = 35
|
||||
CatacombsLevel3 ID = 36
|
||||
CatacombsLevel4 ID = 37
|
||||
Cathedral ID = 33
|
||||
CaveLevel1 ID = 9
|
||||
CaveLevel2 ID = 13
|
||||
ChaosSanctuary ID = 108
|
||||
CityOfTheDamned ID = 106
|
||||
ClawViperTempleLevel1 ID = 58
|
||||
ClawViperTempleLevel2 ID = 61
|
||||
ColdPlains ID = 3
|
||||
Crypt ID = 18
|
||||
CrystallinePassage ID = 113
|
||||
DarkWood ID = 5
|
||||
DenOfEvil ID = 8
|
||||
DisusedFane ID = 95
|
||||
DisusedReliquary ID = 99
|
||||
DrifterCavern ID = 116
|
||||
DryHills ID = 42
|
||||
DuranceOfHateLevel1 ID = 100
|
||||
DuranceOfHateLevel2 ID = 101
|
||||
DuranceOfHateLevel3 ID = 102
|
||||
DurielsLair ID = 73
|
||||
FarOasis ID = 43
|
||||
FlayerDungeonLevel1 ID = 88
|
||||
FlayerDungeonLevel2 ID = 89
|
||||
FlayerDungeonLevel3 ID = 91
|
||||
FlayerJungle ID = 78
|
||||
ForgottenReliquary ID = 96
|
||||
ForgottenSands ID = 134
|
||||
ForgottenTemple ID = 97
|
||||
ForgottenTower ID = 20
|
||||
FrigidHighlands ID = 111
|
||||
FrozenRiver ID = 114
|
||||
FrozenTundra ID = 117
|
||||
FurnaceOfPain ID = 135
|
||||
GlacialTrail ID = 115
|
||||
GreatMarsh ID = 77
|
||||
HallsOfAnguish ID = 122
|
||||
HallsOfPain ID = 123
|
||||
HallsOfTheDeadLevel1 ID = 56
|
||||
HallsOfTheDeadLevel2 ID = 57
|
||||
HallsOfTheDeadLevel3 ID = 60
|
||||
HallsOfVaught ID = 124
|
||||
HaremLevel1 ID = 50
|
||||
HaremLevel2 ID = 51
|
||||
Harrogath ID = 109
|
||||
HoleLevel1 ID = 11
|
||||
HoleLevel2 ID = 15
|
||||
IcyCellar ID = 119
|
||||
InfernalPit ID = 127
|
||||
InnerCloister ID = 32
|
||||
JailLevel1 ID = 29
|
||||
JailLevel2 ID = 30
|
||||
JailLevel3 ID = 31
|
||||
KurastBazaar ID = 80
|
||||
KurastCauseway ID = 82
|
||||
KurastDocks ID = 75
|
||||
LostCity ID = 44
|
||||
LowerKurast ID = 79
|
||||
LutGholein ID = 40
|
||||
MaggotLairLevel1 ID = 62
|
||||
MaggotLairLevel2 ID = 63
|
||||
MaggotLairLevel3 ID = 64
|
||||
MatronsDen ID = 133
|
||||
Mausoleum ID = 19
|
||||
MonasteryGate ID = 26
|
||||
MooMooFarm ID = 39
|
||||
NihlathaksTemple ID = 121
|
||||
None ID = 0
|
||||
OuterCloister ID = 27
|
||||
OuterSteppes ID = 104
|
||||
PalaceCellarLevel1 ID = 52
|
||||
PalaceCellarLevel2 ID = 53
|
||||
PalaceCellarLevel3 ID = 54
|
||||
PitLevel1 ID = 12
|
||||
PitLevel2 ID = 16
|
||||
PitOfAcheron ID = 126
|
||||
PlainsOfDespair ID = 105
|
||||
RiverOfFlame ID = 107
|
||||
RockyWaste ID = 41
|
||||
RogueEncampment ID = 1
|
||||
RuinedFane ID = 98
|
||||
RuinedTemple ID = 94
|
||||
SewersLevel1Act2 ID = 47
|
||||
SewersLevel1Act3 ID = 92
|
||||
SewersLevel2Act2 ID = 48
|
||||
SewersLevel2Act3 ID = 93
|
||||
SewersLevel3Act2 ID = 49
|
||||
SpiderCave ID = 84
|
||||
SpiderCavern ID = 85
|
||||
SpiderForest ID = 76
|
||||
StonyField ID = 4
|
||||
StonyTombLevel1 ID = 55
|
||||
StonyTombLevel2 ID = 59
|
||||
SwampyPitLevel1 ID = 86
|
||||
SwampyPitLevel2 ID = 87
|
||||
SwampyPitLevel3 ID = 90
|
||||
TalRashasTomb1 ID = 66
|
||||
TalRashasTomb2 ID = 67
|
||||
TalRashasTomb3 ID = 68
|
||||
TalRashasTomb4 ID = 69
|
||||
TalRashasTomb5 ID = 70
|
||||
TalRashasTomb6 ID = 71
|
||||
TalRashasTomb7 ID = 72
|
||||
TamoeHighland ID = 7
|
||||
TheAncientsWay ID = 118
|
||||
ThePandemoniumFortress ID = 103
|
||||
TheWorldstoneChamber ID = 132
|
||||
TheWorldStoneKeepLevel1 ID = 128
|
||||
TheWorldStoneKeepLevel2 ID = 129
|
||||
TheWorldStoneKeepLevel3 ID = 130
|
||||
ThroneOfDestruction ID = 131
|
||||
TowerCellarLevel1 ID = 21
|
||||
TowerCellarLevel2 ID = 22
|
||||
TowerCellarLevel3 ID = 23
|
||||
TowerCellarLevel4 ID = 24
|
||||
TowerCellarLevel5 ID = 25
|
||||
Travincal ID = 83
|
||||
Tristram ID = 38
|
||||
UberTristram ID = 136
|
||||
UndergroundPassageLevel1 ID = 10
|
||||
UndergroundPassageLevel2 ID = 14
|
||||
UpperKurast ID = 81
|
||||
ValleyOfSnakes ID = 45
|
||||
MapsAncientTemple ID = 137
|
||||
MapsDesecratedTemple ID = 138
|
||||
MapsFrigidPlateau ID = 139
|
||||
MapsInfernalTrial ID = 140
|
||||
MapsRuinedCitadel ID = 141
|
||||
)
|
||||
|
||||
143
pkg/data/area/areas.go
Normal file
143
pkg/data/area/areas.go
Normal file
@@ -0,0 +1,143 @@
|
||||
// Code generated by d2data. DO NOT EDIT.
|
||||
// source: cmd/d2data/d2data/levels.json
|
||||
package area
|
||||
|
||||
var Areas = map[ID]Area{
|
||||
0: {Name: "", ID: 0},
|
||||
1: {Name: "Rogue Encampment", ID: 1},
|
||||
10: {Name: "Underground Passage Level 1", ID: 10},
|
||||
100: {Name: "Durance of Hate Level 1", ID: 100},
|
||||
101: {Name: "Durance of Hate Level 2", ID: 101},
|
||||
102: {Name: "Durance of Hate Level 3", ID: 102},
|
||||
103: {Name: "The Pandemonium Fortress", ID: 103},
|
||||
104: {Name: "Outer Steppes", ID: 104},
|
||||
105: {Name: "Plains of Despair", ID: 105},
|
||||
106: {Name: "City of the Damned", ID: 106},
|
||||
107: {Name: "River of Flame", ID: 107},
|
||||
108: {Name: "Chaos Sanctum", ID: 108},
|
||||
109: {Name: "Harrogath", ID: 109},
|
||||
11: {Name: "Hole Level 1", ID: 11},
|
||||
110: {Name: "Bloody Foothills", ID: 110},
|
||||
111: {Name: "Rigid Highlands", ID: 111},
|
||||
112: {Name: "Arreat Plateau", ID: 112},
|
||||
113: {Name: "Crystalized Cavern Level 1", ID: 113},
|
||||
114: {Name: "Cellar of Pity", ID: 114},
|
||||
115: {Name: "Crystalized Cavern Level 2", ID: 115},
|
||||
116: {Name: "Echo Chamber", ID: 116},
|
||||
117: {Name: "Tundra Wastelands", ID: 117},
|
||||
118: {Name: "Glacial Caves Level 1", ID: 118},
|
||||
119: {Name: "Glacial Caves Level 2", ID: 119},
|
||||
12: {Name: "Pit Level 1", ID: 12},
|
||||
120: {Name: "Rocky Summit", ID: 120},
|
||||
121: {Name: "Nihlathaks Temple", ID: 121},
|
||||
122: {Name: "Halls of Anguish", ID: 122},
|
||||
123: {Name: "Halls of Death's Calling", ID: 123},
|
||||
124: {Name: "Halls of Vaught", ID: 124},
|
||||
125: {Name: "Hell1", ID: 125},
|
||||
126: {Name: "Hell2", ID: 126},
|
||||
127: {Name: "Hell3", ID: 127},
|
||||
128: {Name: "The Worldstone Keep Level 1", ID: 128},
|
||||
129: {Name: "The Worldstone Keep Level 2", ID: 129},
|
||||
13: {Name: "Cave Level 2", ID: 13},
|
||||
130: {Name: "The Worldstone Keep Level 3", ID: 130},
|
||||
131: {Name: "Throne of Destruction", ID: 131},
|
||||
132: {Name: "The Worldstone Chamber", ID: 132},
|
||||
133: {Name: "Pandemonium Run 1", ID: 133},
|
||||
134: {Name: "Pandemonium Run 2", ID: 134},
|
||||
135: {Name: "Pandemonium Run 3", ID: 135},
|
||||
136: {Name: "Tristram", ID: 136},
|
||||
14: {Name: "Underground Passage Level 2", ID: 14},
|
||||
15: {Name: "Hole Level 2", ID: 15},
|
||||
16: {Name: "Pit Level 2", ID: 16},
|
||||
17: {Name: "Burial Grounds", ID: 17},
|
||||
18: {Name: "Crypt", ID: 18},
|
||||
19: {Name: "Mausoleum", ID: 19},
|
||||
2: {Name: "Blood Moor", ID: 2},
|
||||
20: {Name: "Forgotten Tower", ID: 20},
|
||||
21: {Name: "Tower Cellar Level 1", ID: 21},
|
||||
22: {Name: "Tower Cellar Level 2", ID: 22},
|
||||
23: {Name: "Tower Cellar Level 3", ID: 23},
|
||||
24: {Name: "Tower Cellar Level 4", ID: 24},
|
||||
25: {Name: "Tower Cellar Level 5", ID: 25},
|
||||
26: {Name: "Monastery Gate", ID: 26},
|
||||
27: {Name: "Outer Cloister", ID: 27},
|
||||
28: {Name: "Barracks", ID: 28},
|
||||
29: {Name: "Jail Level 1", ID: 29},
|
||||
3: {Name: "Cold Plains", ID: 3},
|
||||
30: {Name: "Jail Level 2", ID: 30},
|
||||
31: {Name: "Jail Level 3", ID: 31},
|
||||
32: {Name: "Inner Cloister", ID: 32},
|
||||
33: {Name: "Cathedral", ID: 33},
|
||||
34: {Name: "Catacombs Level 1", ID: 34},
|
||||
35: {Name: "Catacombs Level 2", ID: 35},
|
||||
36: {Name: "Catacombs Level 3", ID: 36},
|
||||
37: {Name: "Catacombs Level 4", ID: 37},
|
||||
38: {Name: "Tristram", ID: 38},
|
||||
39: {Name: "Moo Moo Farm", ID: 39},
|
||||
4: {Name: "Stony Field", ID: 4},
|
||||
40: {Name: "Lut Gholein", ID: 40},
|
||||
41: {Name: "Rocky Waste", ID: 41},
|
||||
42: {Name: "Dry Hills", ID: 42},
|
||||
43: {Name: "Far Oasis", ID: 43},
|
||||
44: {Name: "Lost City", ID: 44},
|
||||
45: {Name: "Valley of Snakes", ID: 45},
|
||||
46: {Name: "Canyon of the Magi", ID: 46},
|
||||
47: {Name: "Sewers Level 1", ID: 47},
|
||||
48: {Name: "Sewers Level 2", ID: 48},
|
||||
49: {Name: "Sewers Level 3", ID: 49},
|
||||
5: {Name: "Dark Wood", ID: 5},
|
||||
50: {Name: "Harem Level 1", ID: 50},
|
||||
51: {Name: "Harem Level 2", ID: 51},
|
||||
52: {Name: "Palace Cellar Level 1", ID: 52},
|
||||
53: {Name: "Palace Cellar Level 2", ID: 53},
|
||||
54: {Name: "Palace Cellar Level 3", ID: 54},
|
||||
55: {Name: "Stony Tomb Level 1", ID: 55},
|
||||
56: {Name: "Halls of the Dead Level 1", ID: 56},
|
||||
57: {Name: "Halls of the Dead Level 2", ID: 57},
|
||||
58: {Name: "Claw Viper Temple Level 1", ID: 58},
|
||||
59: {Name: "Stony Tomb Level 2", ID: 59},
|
||||
6: {Name: "Black Marsh", ID: 6},
|
||||
60: {Name: "Halls of the Dead Level 3", ID: 60},
|
||||
61: {Name: "Claw Viper Temple Level 2", ID: 61},
|
||||
62: {Name: "Maggot Lair Level 1", ID: 62},
|
||||
63: {Name: "Maggot Lair Level 2", ID: 63},
|
||||
64: {Name: "Maggot Lair Level 3", ID: 64},
|
||||
65: {Name: "Ancient Tunnels", ID: 65},
|
||||
66: {Name: "Tal Rasha's Tomb", ID: 66},
|
||||
67: {Name: "Tal Rasha's Tomb", ID: 67},
|
||||
68: {Name: "Tal Rasha's Tomb", ID: 68},
|
||||
69: {Name: "Tal Rasha's Tomb", ID: 69},
|
||||
7: {Name: "Tamoe Highland", ID: 7},
|
||||
70: {Name: "Tal Rasha's Tomb", ID: 70},
|
||||
71: {Name: "Tal Rasha's Tomb", ID: 71},
|
||||
72: {Name: "Tal Rasha's Tomb", ID: 72},
|
||||
73: {Name: "Duriel's Lair", ID: 73},
|
||||
74: {Name: "Arcane Sanctuary", ID: 74},
|
||||
75: {Name: "Kurast Docktown", ID: 75},
|
||||
76: {Name: "Spider Forest", ID: 76},
|
||||
77: {Name: "Great Marsh", ID: 77},
|
||||
78: {Name: "Flayer Jungle", ID: 78},
|
||||
79: {Name: "Lower Kurast", ID: 79},
|
||||
8: {Name: "Den of Evil", ID: 8},
|
||||
80: {Name: "Kurast Bazaar", ID: 80},
|
||||
81: {Name: "Upper Kurast", ID: 81},
|
||||
82: {Name: "Kurast Causeway", ID: 82},
|
||||
83: {Name: "Travincal", ID: 83},
|
||||
84: {Name: "Spider Cave", ID: 84},
|
||||
85: {Name: "Spider Cavern", ID: 85},
|
||||
86: {Name: "Swampy Pit Level 1", ID: 86},
|
||||
87: {Name: "Swampy Pit Level 2", ID: 87},
|
||||
88: {Name: "Flayer Dungeon Level 1", ID: 88},
|
||||
89: {Name: "Flayer Dungeon Level 2", ID: 89},
|
||||
9: {Name: "Cave Level 1", ID: 9},
|
||||
90: {Name: "Swampy Pit Level 3", ID: 90},
|
||||
91: {Name: "Flayer Dungeon Level 3", ID: 91},
|
||||
92: {Name: "Sewers Level 1", ID: 92},
|
||||
93: {Name: "Sewers Level 2", ID: 93},
|
||||
94: {Name: "Ruined Temple", ID: 94},
|
||||
95: {Name: "Disused Fane", ID: 95},
|
||||
96: {Name: "Forgotten Reliquary", ID: 96},
|
||||
97: {Name: "Forgotten Temple", ID: 97},
|
||||
98: {Name: "Ruined Fane", ID: 98},
|
||||
99: {Name: "Disused Reliquary", ID: 99},
|
||||
}
|
||||
@@ -1,55 +1,55 @@
|
||||
package area
|
||||
|
||||
// WPAddresses represents the addresses of the waypoints in the game UI and the linked areas between them
|
||||
var WPAddresses = map[Area]WPAddress{
|
||||
var WPAddresses = map[ID]WPAddress{
|
||||
// Act 1
|
||||
RogueEncampment: {1, 1, nil},
|
||||
ColdPlains: {1, 2, []Area{RogueEncampment, BloodMoor}},
|
||||
StonyField: {1, 3, []Area{ColdPlains}},
|
||||
DarkWood: {1, 4, []Area{StonyField, UndergroundPassageLevel1}},
|
||||
BlackMarsh: {1, 5, []Area{DarkWood}},
|
||||
OuterCloister: {1, 6, []Area{BlackMarsh, TamoeHighland, MonasteryGate}},
|
||||
JailLevel1: {1, 7, []Area{OuterCloister, Barracks}},
|
||||
InnerCloister: {1, 8, []Area{JailLevel1, JailLevel2, JailLevel3}},
|
||||
CatacombsLevel2: {1, 9, []Area{InnerCloister, Cathedral, CatacombsLevel1}},
|
||||
ColdPlains: {1, 2, []ID{RogueEncampment, BloodMoor}},
|
||||
StonyField: {1, 3, []ID{ColdPlains}},
|
||||
DarkWood: {1, 4, []ID{StonyField, UndergroundPassageLevel1}},
|
||||
BlackMarsh: {1, 5, []ID{DarkWood}},
|
||||
OuterCloister: {1, 6, []ID{BlackMarsh, TamoeHighland, MonasteryGate}},
|
||||
JailLevel1: {1, 7, []ID{OuterCloister, Barracks}},
|
||||
InnerCloister: {1, 8, []ID{JailLevel1, JailLevel2, JailLevel3}},
|
||||
CatacombsLevel2: {1, 9, []ID{InnerCloister, Cathedral, CatacombsLevel1}},
|
||||
// Act 2
|
||||
LutGholein: {2, 1, nil},
|
||||
SewersLevel2Act2: {2, 2, []Area{LutGholein, SewersLevel1Act2}},
|
||||
DryHills: {2, 3, []Area{LutGholein, RockyWaste}},
|
||||
HallsOfTheDeadLevel2: {2, 4, []Area{DryHills, HallsOfTheDeadLevel1}},
|
||||
FarOasis: {2, 5, []Area{DryHills}},
|
||||
LostCity: {2, 6, []Area{FarOasis}},
|
||||
PalaceCellarLevel1: {2, 7, []Area{LutGholein, HaremLevel1, HaremLevel2}},
|
||||
ArcaneSanctuary: {2, 8, []Area{PalaceCellarLevel1, PalaceCellarLevel2, PalaceCellarLevel3}},
|
||||
CanyonOfTheMagi: {2, 9, []Area{ArcaneSanctuary}},
|
||||
SewersLevel2Act2: {2, 2, []ID{LutGholein, SewersLevel1Act2}},
|
||||
DryHills: {2, 3, []ID{LutGholein, RockyWaste}},
|
||||
HallsOfTheDeadLevel2: {2, 4, []ID{DryHills, HallsOfTheDeadLevel1}},
|
||||
FarOasis: {2, 5, []ID{DryHills}},
|
||||
LostCity: {2, 6, []ID{FarOasis}},
|
||||
PalaceCellarLevel1: {2, 7, []ID{LutGholein, HaremLevel1, HaremLevel2}},
|
||||
ArcaneSanctuary: {2, 8, []ID{PalaceCellarLevel1, PalaceCellarLevel2, PalaceCellarLevel3}},
|
||||
CanyonOfTheMagi: {2, 9, []ID{ArcaneSanctuary}},
|
||||
// Act 3
|
||||
KurastDocks: {3, 1, nil},
|
||||
SpiderForest: {3, 2, []Area{KurastDocks}},
|
||||
GreatMarsh: {3, 3, []Area{SpiderForest}},
|
||||
FlayerJungle: {3, 4, []Area{GreatMarsh}},
|
||||
LowerKurast: {3, 5, []Area{FlayerJungle}},
|
||||
KurastBazaar: {3, 6, []Area{LowerKurast}},
|
||||
UpperKurast: {3, 7, []Area{KurastBazaar}},
|
||||
Travincal: {3, 8, []Area{UpperKurast, KurastCauseway}},
|
||||
DuranceOfHateLevel2: {3, 9, []Area{Travincal, DuranceOfHateLevel1}},
|
||||
SpiderForest: {3, 2, []ID{KurastDocks}},
|
||||
GreatMarsh: {3, 3, []ID{SpiderForest}},
|
||||
FlayerJungle: {3, 4, []ID{GreatMarsh}},
|
||||
LowerKurast: {3, 5, []ID{FlayerJungle}},
|
||||
KurastBazaar: {3, 6, []ID{LowerKurast}},
|
||||
UpperKurast: {3, 7, []ID{KurastBazaar}},
|
||||
Travincal: {3, 8, []ID{UpperKurast, KurastCauseway}},
|
||||
DuranceOfHateLevel2: {3, 9, []ID{Travincal, DuranceOfHateLevel1}},
|
||||
// Act 4
|
||||
ThePandemoniumFortress: {4, 1, nil},
|
||||
CityOfTheDamned: {4, 2, []Area{ThePandemoniumFortress, OuterSteppes, PlainsOfDespair}},
|
||||
RiverOfFlame: {4, 3, []Area{CityOfTheDamned}},
|
||||
CityOfTheDamned: {4, 2, []ID{ThePandemoniumFortress, OuterSteppes, PlainsOfDespair}},
|
||||
RiverOfFlame: {4, 3, []ID{CityOfTheDamned}},
|
||||
// Act 5
|
||||
Harrogath: {5, 1, nil},
|
||||
FrigidHighlands: {5, 2, []Area{Harrogath, BloodyFoothills}},
|
||||
ArreatPlateau: {5, 3, []Area{FrigidHighlands}},
|
||||
CrystallinePassage: {5, 4, []Area{ArreatPlateau}},
|
||||
GlacialTrail: {5, 5, []Area{CrystallinePassage}},
|
||||
HallsOfPain: {5, 6, []Area{Harrogath, NihlathaksTemple, HallsOfAnguish}},
|
||||
FrozenTundra: {5, 7, []Area{GlacialTrail}},
|
||||
TheAncientsWay: {5, 8, []Area{FrozenTundra}},
|
||||
TheWorldStoneKeepLevel2: {5, 9, []Area{TheAncientsWay, ArreatSummit, TheWorldStoneKeepLevel1}},
|
||||
FrigidHighlands: {5, 2, []ID{Harrogath, BloodyFoothills}},
|
||||
ArreatPlateau: {5, 3, []ID{FrigidHighlands}},
|
||||
CrystallinePassage: {5, 4, []ID{ArreatPlateau}},
|
||||
GlacialTrail: {5, 5, []ID{CrystallinePassage}},
|
||||
HallsOfPain: {5, 6, []ID{Harrogath, NihlathaksTemple, HallsOfAnguish}},
|
||||
FrozenTundra: {5, 7, []ID{GlacialTrail}},
|
||||
TheAncientsWay: {5, 8, []ID{FrozenTundra}},
|
||||
TheWorldStoneKeepLevel2: {5, 9, []ID{TheAncientsWay, ArreatSummit, TheWorldStoneKeepLevel1}},
|
||||
}
|
||||
|
||||
type WPAddress struct {
|
||||
Tab int
|
||||
Row int
|
||||
LinkedFrom []Area
|
||||
LinkedFrom []ID
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ type Data struct {
|
||||
OpenMenus OpenMenus
|
||||
Roster Roster
|
||||
HoverData HoverData
|
||||
TerrorZones []area.Area
|
||||
TerrorZones []area.ID
|
||||
Quests quest.Quests
|
||||
KeyBindings KeyBindings
|
||||
}
|
||||
@@ -112,7 +112,7 @@ func (d Data) MercHPPercent() int {
|
||||
|
||||
type RosterMember struct {
|
||||
Name string
|
||||
Area area.Area
|
||||
Area area.ID
|
||||
Position Position
|
||||
}
|
||||
type Roster []RosterMember
|
||||
@@ -128,7 +128,7 @@ func (r Roster) FindByName(name string) (RosterMember, bool) {
|
||||
}
|
||||
|
||||
type Level struct {
|
||||
Area area.Area
|
||||
Area area.ID
|
||||
Position Position
|
||||
IsEntrance bool // This means the area can not be accessed just walking through it, needs to be clicked
|
||||
}
|
||||
@@ -159,7 +159,7 @@ type Position struct {
|
||||
type PlayerUnit struct {
|
||||
Name string
|
||||
ID UnitID
|
||||
Area area.Area
|
||||
Area area.ID
|
||||
Position Position
|
||||
Stats map[stat.ID]int
|
||||
Skills map[skill.ID]skill.Points
|
||||
@@ -167,7 +167,7 @@ type PlayerUnit struct {
|
||||
Class Class
|
||||
LeftSkill skill.ID
|
||||
RightSkill skill.ID
|
||||
AvailableWaypoints []area.Area // Is only filled when WP menu is open and only for the specific selected tab
|
||||
AvailableWaypoints []area.ID // Is only filled when WP menu is open and only for the specific selected tab
|
||||
MaxHPValue *PointCounter
|
||||
MaxMPValue *PointCounter
|
||||
}
|
||||
|
||||
@@ -144,21 +144,21 @@ func (gd *GameReader) GetPlayerUnit(playerUnit uintptr, previousHP, previousMP *
|
||||
levelPtr := uintptr(gd.Process.ReadUInt(room2Ptr+0x90, Uint64))
|
||||
levelNo := gd.Process.ReadUInt(levelPtr+0x1F8, Uint32)
|
||||
|
||||
availableWPs := make([]area.Area, 0)
|
||||
availableWPs := make([]area.ID, 0)
|
||||
// Probably there is a better place to pick up those values, since this seems to be very tied to the UI
|
||||
wpList := gd.Process.ReadBytesFromMemory(gd.moduleBaseAddressPtr+0x21AD220, 0x48)
|
||||
for i := 0; i < 0x48; i = i + 8 {
|
||||
a := binary.LittleEndian.Uint32(wpList[i : i+4])
|
||||
available := binary.LittleEndian.Uint32(wpList[i+4 : i+8])
|
||||
if available == 1 || area.Area(levelNo) == area.Area(a) {
|
||||
availableWPs = append(availableWPs, area.Area(a))
|
||||
if available == 1 || area.ID(levelNo) == area.ID(a) {
|
||||
availableWPs = append(availableWPs, area.ID(a))
|
||||
}
|
||||
}
|
||||
|
||||
d := data.PlayerUnit{
|
||||
Name: name,
|
||||
ID: data.UnitID(unitID),
|
||||
Area: area.Area(levelNo),
|
||||
Area: area.ID(levelNo),
|
||||
Position: data.Position{
|
||||
X: int(xPos),
|
||||
Y: int(yPos),
|
||||
|
||||
@@ -17,7 +17,7 @@ func (gd *GameReader) getRoster() (roster []data.RosterMember) {
|
||||
|
||||
roster = append(roster, data.RosterMember{
|
||||
Name: name,
|
||||
Area: area.Area(a),
|
||||
Area: area.ID(a),
|
||||
Position: data.Position{X: int(xPos), Y: int(yPos)},
|
||||
})
|
||||
partyStruct = uintptr(gd.Process.ReadUInt(partyStruct+0x148, Uint64))
|
||||
|
||||
@@ -4,13 +4,13 @@ import (
|
||||
"github.com/hectorgimenez/d2go/pkg/data/area"
|
||||
)
|
||||
|
||||
func (gd *GameReader) TerrorZones() (areas []area.Area) {
|
||||
tz := gd.moduleBaseAddressPtr + 0x299E2D8
|
||||
func (gd *GameReader) TerrorZones() (areas []area.ID) {
|
||||
tz := gd.moduleBaseAddressPtr + 0x29E9558
|
||||
|
||||
for i := 0; i < 7; i++ {
|
||||
tzArea := gd.ReadUInt(tz+uintptr(i*Uint32), Uint32)
|
||||
if tzArea != 0 {
|
||||
areas = append(areas, area.Area(tzArea))
|
||||
areas = append(areas, area.ID(tzArea))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user