d2mercs.h
4.48 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#ifndef D2MERCS_H
#define D2MERCS_H
#include "d2char.h"
#include "d2strings.h"
// The values here are the offsets of each merc's names in the table.
// i.e: Merc names from pos 41 to 61 are Desert mercs
//
// We use these values as offsets later to get the correct name using the relative ID the game provides
typedef enum D2S_MERCTYPE {
D2S_MERCTYPE_UNKNOWN = -1,
D2S_MERCTYPE_ROGUE = 0,
D2S_MERCTYPE_DESERT = 41,
D2S_MERCTYPE_SORCEROR = 62,
D2S_MERCTYPE_BARBARIAN = 82
} D2S_MERCTYPE;
typedef enum D2S_MERCSUBTYPE {
D2S_MERCSUBTYPE_NONE = 0,
D2S_MERCSUBTYPE_FIRE_ARROW = 1,
D2S_MERCSUBTYPE_COLD_ARROW = 2,
D2S_MERCSUBTYPE_COMBAT = 3,
D2S_MERCSUBTYPE_DEFENSIVE = 4,
D2S_MERCSUBTYPE_OFFENSIVE = 5,
D2S_MERCSUBTYPE_FIRE = 6,
D2S_MERCSUBTYPE_COLD = 7,
D2S_MERCSUBTYPE_LIGHTNING = 8
} D2S_MERCSUBTYPE;
const char* const mercNames[] = {
D2S_MERC_NAME_0,
D2S_MERC_NAME_1,
D2S_MERC_NAME_2,
D2S_MERC_NAME_3,
D2S_MERC_NAME_4,
D2S_MERC_NAME_5,
D2S_MERC_NAME_6,
D2S_MERC_NAME_7,
D2S_MERC_NAME_8,
D2S_MERC_NAME_9,
D2S_MERC_NAME_10,
D2S_MERC_NAME_11,
D2S_MERC_NAME_12,
D2S_MERC_NAME_13,
D2S_MERC_NAME_14,
D2S_MERC_NAME_15,
D2S_MERC_NAME_16,
D2S_MERC_NAME_17,
D2S_MERC_NAME_18,
D2S_MERC_NAME_19,
D2S_MERC_NAME_20,
D2S_MERC_NAME_21,
D2S_MERC_NAME_22,
D2S_MERC_NAME_23,
D2S_MERC_NAME_24,
D2S_MERC_NAME_25,
D2S_MERC_NAME_26,
D2S_MERC_NAME_27,
D2S_MERC_NAME_28,
D2S_MERC_NAME_29,
D2S_MERC_NAME_30,
D2S_MERC_NAME_31,
D2S_MERC_NAME_32,
D2S_MERC_NAME_33,
D2S_MERC_NAME_34,
D2S_MERC_NAME_35,
D2S_MERC_NAME_36,
D2S_MERC_NAME_37,
D2S_MERC_NAME_38,
D2S_MERC_NAME_39,
D2S_MERC_NAME_40,
D2S_MERC_NAME_41,
D2S_MERC_NAME_42,
D2S_MERC_NAME_43,
D2S_MERC_NAME_44,
D2S_MERC_NAME_45,
D2S_MERC_NAME_46,
D2S_MERC_NAME_47,
D2S_MERC_NAME_48,
D2S_MERC_NAME_49,
D2S_MERC_NAME_50,
D2S_MERC_NAME_51,
D2S_MERC_NAME_52,
D2S_MERC_NAME_53,
D2S_MERC_NAME_54,
D2S_MERC_NAME_55,
D2S_MERC_NAME_56,
D2S_MERC_NAME_57,
D2S_MERC_NAME_58,
D2S_MERC_NAME_59,
D2S_MERC_NAME_60,
D2S_MERC_NAME_61,
D2S_MERC_NAME_62,
D2S_MERC_NAME_63,
D2S_MERC_NAME_64,
D2S_MERC_NAME_65,
D2S_MERC_NAME_66,
D2S_MERC_NAME_67,
D2S_MERC_NAME_68,
D2S_MERC_NAME_69,
D2S_MERC_NAME_70,
D2S_MERC_NAME_71,
D2S_MERC_NAME_72,
D2S_MERC_NAME_73,
D2S_MERC_NAME_74,
D2S_MERC_NAME_75,
D2S_MERC_NAME_76,
D2S_MERC_NAME_77,
D2S_MERC_NAME_78,
D2S_MERC_NAME_79,
D2S_MERC_NAME_80,
D2S_MERC_NAME_81,
D2S_MERC_NAME_82,
D2S_MERC_NAME_83,
D2S_MERC_NAME_84,
D2S_MERC_NAME_85,
D2S_MERC_NAME_86,
D2S_MERC_NAME_87,
D2S_MERC_NAME_88,
D2S_MERC_NAME_89,
D2S_MERC_NAME_90,
D2S_MERC_NAME_91,
D2S_MERC_NAME_92,
D2S_MERC_NAME_93,
D2S_MERC_NAME_94,
D2S_MERC_NAME_95,
D2S_MERC_NAME_96,
D2S_MERC_NAME_97,
D2S_MERC_NAME_98,
D2S_MERC_NAME_99,
D2S_MERC_NAME_100,
D2S_MERC_NAME_101,
D2S_MERC_NAME_102,
D2S_MERC_NAME_103,
D2S_MERC_NAME_104,
D2S_MERC_NAME_105,
D2S_MERC_NAME_106,
D2S_MERC_NAME_107,
D2S_MERC_NAME_108,
D2S_MERC_NAME_109,
D2S_MERC_NAME_110,
D2S_MERC_NAME_111,
D2S_MERC_NAME_112,
D2S_MERC_NAME_113,
D2S_MERC_NAME_114,
D2S_MERC_NAME_115,
D2S_MERC_NAME_116,
D2S_MERC_NAME_117,
D2S_MERC_NAME_118,
D2S_MERC_NAME_119,
D2S_MERC_NAME_120,
D2S_MERC_NAME_121,
D2S_MERC_NAME_122,
D2S_MERC_NAME_123,
D2S_MERC_NAME_124,
D2S_MERC_NAME_125,
D2S_MERC_NAME_126,
D2S_MERC_NAME_127,
D2S_MERC_NAME_128,
D2S_MERC_NAME_129,
D2S_MERC_NAME_130,
D2S_MERC_NAME_131,
D2S_MERC_NAME_132,
D2S_MERC_NAME_133,
D2S_MERC_NAME_134,
D2S_MERC_NAME_135,
D2S_MERC_NAME_136,
D2S_MERC_NAME_137,
D2S_MERC_NAME_138,
D2S_MERC_NAME_139,
D2S_MERC_NAME_140,
D2S_MERC_NAME_141,
D2S_MERC_NAME_142,
D2S_MERC_NAME_143,
D2S_MERC_NAME_144,
D2S_MERC_NAME_145,
D2S_MERC_NAME_146,
D2S_MERC_NAME_147,
D2S_MERC_NAME_148
};
// Returns static string from library memory, no need to free
const char* getMercName(uint16_t mercID, uint16_t mercNameID);
D2S_MERCTYPE getMercType(uint16_t mercID);
D2S_MERCSUBTYPE getMercSubType(uint16_t mercID);
D2S_DIFFICULTY getMercDifficulty(uint16_t mercID);
int setMerc(D2CharHeader* c, D2S_MERCTYPE type, D2S_MERCSUBTYPE subtype, D2S_DIFFICULTY difficulty);
#endif