-
Notifications
You must be signed in to change notification settings - Fork 2
/
FA_struct.h
253 lines (238 loc) · 4.9 KB
/
FA_struct.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
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
#ifndef __FA_STRUCT__H__
#define __FA_STRUCT__H__
#include "FA_def.h"
/**
* 英雄结构 0x492
* refrences http://tieba.baidu.com/p/2689989340
*/
#pragma pack(push, 1)
struct H3_Hero {
WORD x;
WORD y;
WORD z; // 0 upworld 1 underworld
BYTE visible;
DWORD plMapitem;
BYTE _u1;
long plotype; //??
DWORD P10Cflag;
DWORD plSetup;
WORD mp; //+18h left spell magic points
int number;
DWORD _unk_id;
BYTE player; //0~7 ff
char name[13]; //hero name
DWORD type; //+30h 0~17 骑士,牧师,... etc
BYTE pic;
WORD movx; //move to x (0~143)格
WORD movy; //move to y (0~143)
WORD movz; //move to z (see z)
BYTE _un2[9];
BYTE x0;
BYTE y0;
BYTE run;
BYTE direction; //[0~7] 1:30 3:00 4:30 6:00 7:30 9:00 10:30 12:00
BYTE flags;
DWORD maxmovement; //max movement (div 100 equal steps)
DWORD curmovement; //left movement(div 100 equal steps)
DWORD exp; //+51h
WORD level; //+55h
DWORD visited[10];
BYTE _un3[18];
int creaturetype[7]; //creature type (FFFFFFFF is empty)
int creaturecount[7]; //off
BYTE skilllv[28]; //skill level [0~3]
BYTE skilltree[28]; //skill tree [0~10 show order]
DWORD skillcount; //+101h
BYTE _un4[17];
char morale;
BYTE _un5[3];
char morale1;
char luck;
BYTE _un6[17];
int artinbody[19][2]; //artifacts in body 4bytes FFFFFFFF
BYTE freeaddslots;
char lockedslots[14]; //0未放置 1放置
int artinpacks[64][2]; //artifacts in package
BYTE artinpackscount; //max 64
DWORD sex;
BYTE fly_b;
DWORD _un7;
char* mes;
long _unmes1;
long _unmes2;
BYTE spell[70]; //spell 修习地址
BYTE spellb[70]; //spell 记录地址
char adpk[4]; //+476h attack defance power knowledge
BYTE _un8[24];
};
/**
* 玩家结构 0x168
*/
struct H3_Player {
char playeridx; //[0~7]
char heroescount;
BYTE _u1[2];
int curhero;
int heroes[8];
int herol;
int heror;
BYTE _u2[13];
char daysleft;
char townscount;
char curtown;
char towns[48];
BYTE _u3[4];
int tophero;
BYTE _u4[0x54];
char name[21]; //name.
BYTE activeflag; //+E1h 1 active 0 sleep
BYTE playerflag; //+E2h 1 player 0 computer
BYTE _u5[0x45];
double resimp[8]; //unknow
};
/**
* H3 Map Item struct 0x26
*/
struct H3_MapItem {
DWORD setup;
BYTE land;
BYTE ltype;
BYTE river;
BYTE rtype;
BYTE road;
BYTE rdtype;
WORD _u1;
BYTE mirror;
BYTE attrib;
WORD bits;
WORD _u2;
DWORD* draw;
DWORD* drawend;
DWORD* drawend2;
int type;
WORD stype;
WORD drawnum;
};
/**
* H3 core struct 0x4e7cc
*/
struct H3_Core {
BYTE _u1[0xa4];
struct H3_Hero heroes[0x9c];
BYTE _u2[0x1ea];
WORD dayofweek;
WORD week;
WORD month;
};
#pragma pack(pop)
/**
* H3 Lod Item table struct
*/
struct H3_LodItemTable {
DWORD count;
DWORD* itemlist;
};
/**
* H3 Artifact
*/
struct H3_Artifact {
char *name; // +00h
DWORD cost; // +04h
int position; // +08h //1头部 2披肩 3脖子
int type; // +0Ch //0x02 04 08 10 ???
char *description; // +10h
int comboindex; // +14h //>=0组合宝物序号 -1非组合宝物
int combopartindex; // +18h //>=组合部件 -1非组合部件
BYTE Disable; // +1Ch //0->FALSE
BYTE newspell; // +1Dh //0->FALSE 1->(泰坦之剑)
BYTE _u1; // +1Eh
BYTE _u2; // +1Fh
};
/**
* H3 Combo Artifact 0x18
*/
struct H3_ComboArtifact {
int id;
DWORD flags[5];
};
/**
* H3 Dlg Item Command struct
*/
struct H3_DlgItemCmd {
int type; // 0x200:mouse push/pop
int stype;
int itemid;
int flags;
int xabs;
int yabs;
int param;
int flags2;
};
struct H3_Dlg;
/**
* H3 Dlg class Virtual Table
*/
struct H3_Dlg_VTable {
DWORD dctor;
DWORD show;
DWORD hide;
DWORD vmt3; //???
DWORD nullstub;
DWORD redraw;
void (FA_THISCALL *exec)(struct H3_Dlg*, int shown);
DWORD init;
DWORD active;
DWORD (FA_THISCALL *dlgproc)(struct H3_Dlg*, struct H3_DlgItemCmd*);
DWORD mousemove;
DWORD mouserclick;
DWORD clickret;
DWORD vmt3_ret3;
DWORD unknow;
};
/**
* H3 Dlg struct/class 0x68
*/
struct H3_Dlg {
struct H3_Dlg_VTable* vtable;
BYTE _u1[12];
DWORD count; //+10h 固定为0x12
DWORD _u2;
int x;
int y;
int width;
int height;
struct {
DWORD* first;
DWORD* last;
} initeditemlist;
struct {
DWORD* unknow; //+30h
DWORD* first; //+34h start of items mem
DWORD* last; //+38h
DWORD* end; //+3ch end of items mem
} itemlist;
BYTE _u3[32];
DWORD ukflag; //+60h should be 0 ?
DWORD ukflag2; //+64h
BYTE* lv[0];
};
/**
* Mod struct
*/
struct FA_Mod {
DWORD Type; //Type see FA_def.h
DWORD Orig; //Orig address
DWORD Detour; //Detour address
union {
DWORD Size; //Mod Size
DWORD Proxy; //Detour Proxy
} U;
};
/**
* Mod queue struct
*/
struct FA_Mod_Q {
int sz;
struct FA_Mod mods[10240];
};
#endif