-
Notifications
You must be signed in to change notification settings - Fork 1
/
D2Structs.h
1256 lines (1171 loc) · 36.9 KB
/
D2Structs.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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef _D2STRUCTS_H
#define _D2STRUCTS_H
struct LevelNameInfo;
struct UnitAny;
struct Room1;
struct Room2;
struct Level;
struct Act;
struct ActMisc;
struct RosterUnit;
struct OverheadMsg;
/*struct D2EditBox {
DWORD _1;
DWORD _2[6];
void (__fastcall *func)(D2EditBox*); // +1c
DWORD _3[0x0D];
DWORD dwSelectStart; // +54
DWORD dwSelectEnd; // +58
wchar_t text[0x100]; // +5c
DWORD dwCursorPos; // 0x25C
};*/
/*
struct ControlText {
wchar_t* wText; //0x00
DWORD _1[4]; //0x04
DWORD dwColor; //0x14
DWORD _2; //0x18
ControlText* pNext;//0x1C
};
struct Control {
DWORD dwType; //0x00
DWORD _1[2]; //0x04
DWORD dwPosX; //0x0C
DWORD dwPosY; //0x10
DWORD dwSizeX; //0x14
DWORD dwSizeY; //0x18
DWORD fnCallback; //0x1C
DWORD _2; //0x20
DWORD fnClick; //0x24
DWORD _3[5]; //0x38
Control *pNext; //0x3C
DWORD _4[2]; //0x40
ControlText* pFirstText; //0x48
ControlText* pLastText; //0x4c
ControlText* pSelectedText; //0x50
DWORD dwSelectStart; //0x54
DWORD dwSelectEnd; //0x58
union {
wchar_t wText[256]; //0x5C
struct {
DWORD _5[2]; //0x5C
wchar_t wText2[256]; //0x64
};
};
DWORD dwCursorPos; //0x25C
DWORD dwIsCloaked; //0x260
};
*/
struct LevelNameInfo
{
int nX;
int nY;
int nLevelId;
int nAct;
};
struct InventoryInfo
{
int nLocation;
int nMaxXCells;
int nMaxYCells;
};
struct GameStructInfo
{
DWORD _1[6]; //0x00
WORD _1a; //0x18
char szGameName[0x18]; //0x1A
char szGameServerIp[0x56]; //0x32
char szAccountName[0x30]; //0x88
char szCharName[0x18]; //0xB8
char szRealmName[0x18]; //0xD0
BYTE _2[0x157]; //0xE8
char szGamePassword[0x18]; //0x23F
};
struct AutomapCell {
DWORD fSaved; //0x00
WORD nCellNo; //0x04
WORD xPixel; //0x06
WORD yPixel; //0x08
WORD wWeight; //0x0A
AutomapCell *pLess; //0x0C
AutomapCell *pMore; //0x10
};
struct GfxCell {
DWORD flags; //0x00
DWORD width; //0x04
DWORD height; //0x08
DWORD xoffs; //0x0C
DWORD yoffs; //0x10
DWORD _2; //0x14
DWORD lpParent; //0x18
DWORD length; //0x1C
BYTE cols; //0x20
};
struct InteractStruct
{
DWORD dwMoveType; //0x00
UnitAny* lpPlayerUnit; //0x04
UnitAny* lpTargetUnit; //0x08
DWORD dwTargetX; //0x0C
DWORD dwTargetY; //0x10
DWORD _1; //0x14
DWORD _2; //0x18
};
struct CellFile {
DWORD dwVersion; //0x00
struct {
WORD dwFlags;
BYTE mylastcol;
BYTE mytabno:1;
}; //0x04
DWORD eFormat; //0x08
DWORD termination; //0x0C
DWORD numdirs; //0x10
DWORD numcells; //0x14
GfxCell *cells[1]; //0x18
};
struct CellContext {
DWORD direction; //0x00
GfxCell *hCell; //0x04
DWORD _1[0xD]; //0x08
CellFile* pCellFile; //0x3C
DWORD _2; //0x40
DWORD nCellNo; //0x44
};
struct AutomapLayer {
DWORD nLayerNo; //0x00
DWORD fSaved; //0x04
AutomapCell *pFloors; //0x08
AutomapCell *pWalls; //0x0C
AutomapCell *pObjects; //0x10
AutomapCell *pExtras; //0x14
AutomapLayer *pNextLayer; //0x18
};
struct AutomapLayer2 {
DWORD _1[2]; //0x00
DWORD nLayerNo; //0x08
};
struct LevelTxt {
DWORD dwLevelNo; //0x00
DWORD _1[60]; //0x04
BYTE _2; //0xF4
wchar_t szName[40]; //+16e
char szEntranceText[40]; //0x11D
char szLevelDesc[41]; //0x145
wchar_t wName[40]; //0x16E
wchar_t wEntranceText[40]; //0x1BE
BYTE nObjGroup[8]; //0x196
BYTE nObjPrb[8]; //0x19E
};
struct ControlText {
wchar_t* wText; //0x00
DWORD _1[4]; //0x04
DWORD dwColor; //0x14
DWORD _2; //0x18
ControlText* pNext;//0x1C
};
struct Control { //
DWORD dwType; //0x00
DWORD _1[2]; //0x04
DWORD dwPosX; //0x0C
DWORD dwPosY; //0x10
DWORD dwSizeX; //0x14
DWORD dwSizeY; //0x18
DWORD fnCallback; //0x1C
DWORD _2; //0x20
DWORD fnClick; //0x24
DWORD _3[5]; //0x38
Control *pNext; //0x3C
DWORD _4[2]; //0x40
ControlText* pFirstText; //0x48
ControlText* pLastText; //0x48
ControlText* pSelectedText; //0x4C
DWORD dwSelectStart; //0x54
DWORD dwSelectEnd; //0x58
union {
wchar_t wText[256]; //0x5C
struct {
DWORD _5[2]; //0x5C
wchar_t wText2[256]; //0x64
};
};
DWORD dwCursorPos; //0x25C
DWORD dwIsCloaked; //0x260
};
#pragma pack(push)
#pragma pack(1)
struct RoomTile {
DWORD *nNum; //0x00
Room2* pRoom2; //0x04
DWORD _1[2]; //0x08
RoomTile* pNext; //0x10
};
/*old
struct RosterUnit {
char szName[16]; //0x00
DWORD dwUnitId; //0x10
DWORD dwPartyLife; //0x14
DWORD _1; //0x18
DWORD dwClassId; //0x1C
WORD wLevel; //0x20
WORD wPartyId; //0x22
DWORD dwLevelId; //0x24
DWORD Xpos; //0x28
DWORD Ypos; //0x2C
DWORD dwPartyFlags; //0x30
BYTE * _5; //0x34
DWORD _6[11]; //0x38
WORD _7; //0x64
char szName2[16]; //0x66
WORD _8; //0x76
DWORD _9[2]; //0x78
RosterUnit * pNext; //0x80
};*/
struct RosterUnit {
char szName[16]; //0x00
DWORD dwUnitId; //0x10
DWORD dwPartyLife; //0x14
DWORD _1; //0x18
DWORD dwClassId; //0x1C
WORD wLevel; //0x20
WORD wPartyId; //0x22
DWORD dwLevelId; //0x24
DWORD Xpos; //0x28
DWORD Ypos; //0x2C
DWORD dwPartyFlags; //0x30
BYTE * _5; //0x34
DWORD _6[11]; //0x38
WORD _7; //0x64
char szName2[16]; //0x66
WORD _8; //0x76
DWORD _9[2]; //0x78
RosterUnit * pNext; //0x80
};
/* From Sheppard
struct RosterUnit {
char szName[16]; //0x00
DWORD dwUnitId; //0x10
DWORD dwPartyLife; //0x14
DWORD _1; //0x18
DWORD dwClassId; //0x1C
WORD wLevel; //0x20
WORD wPartyId; //0x22
DWORD dwLevelId; //0x24
DWORD Xpos; //0x28
DWORD Ypos; //0x2C
DWORD dwPartyFlags; //0x30
BYTE * _5; //0x34
DWORD _6[11]; //0x38
WORD _7; //0x64
char szName2[16]; //0x66
WORD _8; //0x76
DWORD _9[2]; //0x78
RosterUnit * pNext; //0x80
}*/;
//from mousepad
struct PartyPlayer {
char name2[0x10]; //+00
DWORD nUnitId; //+10
DWORD life; //+14
DWORD _2[1];
DWORD chrtype; //+1c
WORD chrlvl; //+20
WORD partyno; //+22
DWORD _3[4];
DWORD flags; //+34
DWORD mems; //+38
BYTE _4[0x2a];
char name[1]; //+66
BYTE _5[0x1d];
};
struct QuestInfo {
void *pBuffer; //0x00
DWORD _1; //0x04
};
struct Waypoint {
BYTE flags; //0x00
};
struct PlayerData {
char szName[0x10]; //0x00
QuestInfo *pNormalQuest; //0x10
QuestInfo *pNightmareQuest; //0x14
QuestInfo *pHellQuest; //0x18
Waypoint *pNormalWaypoint; //0x1c
Waypoint *pNightmareWaypoint; //0x20
Waypoint *pHellWaypoint; //0x24
};
struct CollMap {
DWORD dwPosGameX; //0x00
DWORD dwPosGameY; //0x04
DWORD dwSizeGameX; //0x08
DWORD dwSizeGameY; //0x0C
DWORD dwPosRoomX; //0x10
DWORD dwPosRoomY; //0x14
DWORD dwSizeRoomX; //0x18
DWORD dwSizeRoomY; //0x1C
WORD *pMapStart; //0x20
WORD *pMapEnd; //0x22
};
struct PresetUnit {
DWORD dwTxtFileNo; //0x00
DWORD _1[2]; //0x04
DWORD dwPosX; //0x0C
DWORD _2; //0x10
DWORD dwPosY; //0x14
PresetUnit* pPresetNext; //0x18
DWORD dwType; //0x1C
/*
DWORD dwTxtFileNo; //0x00
DWORD _1[2]; //0x04
DWORD dwPosX; //0x0C
DWORD _2[2]; //0x10
DWORD dwPosY; //0x14
PresetUnit* pPresetNext; //0x18
DWORD dwType; //0x1C*/
/*
Routine 1.12: 6FD70BA0 /$ 8B4C24 04 MOV ECX,DWORD PTR SS:[ESP+4]
Routine 1.11b: 6FD87FA0 /$ 8B4C24 04 MOV ECX,DWORD PTR SS:[ESP+4]
DWORD _1[2]; //0x00
DWORD dwPosY; //0x08 <- 0x14
DWORD dwTxtFileNo; //0x0C <- 0x00
DWORD _2[1]; //0x10
PresetUnit *pPresetNext; //0x14 <- 0x18
DWORD dwPosX; //0x18 <- 0x0C
DWORD dwType; //0x1C <- Gleich
*/
};
struct Level {
DWORD _1[21]; //0x00
DWORD dwSeed[2]; //0x54
Level *pNextLevel; //0x5C
DWORD _2; //0x60
ActMisc *pMisc; //0x64
DWORD _3; //0x68
DWORD dwPosX; //0x6C
DWORD dwPosY; //0x08
DWORD dwSizeX; //0x0C
DWORD dwSizeY; //0x10
DWORD _4[6];
DWORD dwLevelNo; //0x94
DWORD _5[97]; //0x98
Room2 *pRoom2First; //0x21C
};
struct Room2 {
Level *pLevel; //0x00
DWORD _1; //0x04
DWORD dwRoomsNear; //0x08
RoomTile *pRoomTiles; //0x0C
Room2 **pRoom2Near; //0x10
DWORD _2[5]; //0x14
Room2 *pRoom2Prev; //0x28
DWORD dwPosX; //0x2C
DWORD dwPosY; //0x30
DWORD dwSizeX; //0x34
DWORD dwSizeY; //0x38
DWORD _3[34]; //0x3C
PresetUnit *pPreset; //0xC4
DWORD _4[3]; //0xC8
Room2 *pRoom2Other; //0xD4
Room1 *pRoom1; //0xD8
DWORD dwSeed[2]; //0xDC
DWORD _5; //0xE4
Room2 *pRoom2Next; //0xE8
};
/* From Sheppard
struct Room2 {
Level* pLevel; //0x00
DWORD _1; //0x04
DWORD dwRoomsNear; //0x08
RoomTile* pRoomTiles; //0x0C
Room2 **pRoom2Near; //0x10
DWORD _3[6]; //0x14
DWORD dwPosX; //0x2C
DWORD dwPosY; //0x30
DWORD dwSizeX; //0x34
DWORD dwSizeY; //0x38
DWORD *pType2Info; //0x3C
// LPDWORD pType2Info; //0xDC
DWORD _4[0x20]; //0x40
DWORD dwPresetType; //0xC0
PresetUnit* pPreset; //0xC4
DWORD _5[0x3]; //0xC8
Room2* pRoom2Next; //0xD4
Room1* pRoom1; //0xD8
//6FDA4613 |> 8BBD C4000000 MOV EDI,DWORD PTR SS:[EBP+C4] ; Default case of switch 6FDA45CE
};
*/
#pragma pack(pop)
struct Room1 {
Room1 **pRoomsNear; //0x00
DWORD _1[2]; //0x04
DWORD dwSeed[2]; //0x0C
DWORD _2; //0x14
DWORD dwXStart; //0x18
DWORD dwYStart; //0x1C
DWORD dwXSize; //0x20
DWORD dwYSize; //0x24
DWORD _3[0x4]; //0x28
Room1* pRoomNext; //0x38
DWORD _4; //0x3C
UnitAny* pUnitFirst; //0x40
DWORD _5[3]; //0x44
CollMap* Coll; //0x50
DWORD _6[0x7]; //0x54
Room2* pRoom2; //0x70
DWORD _7; //0x74
DWORD dwRoomsNear; //0x78
};
//From Cthulhon =)
struct ActMisc {
DWORD _1; //0x00
Act *pAct; //0x04
DWORD _2[238]; //0x3BC
DWORD dwStaffTombLevel; //0x3C0 DrlgMisc *pDrlgMisc; //+38 (in drlgact)
DWORD _3[43]; //0x470
Level *pLevelFirst;
};
//From Cthulhon =)
struct Act {
DWORD _1[13]; //0x00
Room1* pRoom1; //0x34
ActMisc* pMisc; //0x38
DWORD _2; //0x3C
DWORD dwAct; //0x40
};
/* From Sheppard
struct ActMisc {
DWORD _1; //0x00
Act *pAct; //0x04
DWORD _2[238]; //0x3BC
DWORD dwStaffTombLevel; //0x3C0
DWORD _3[43]; //0x470
Level *pLevelFirst;
};*/
/*
dwTombLevel 0x3C0
6FDBFEF3 |. 8B86 70040000 MOV EAX,DWORD PTR DS:[ESI+470] <- Level First
void *_1; //0x00
DWORD _2[31]; //0x04
DWORD pfnCallBack; //0x80
Act *pAct; //0x84
DWORD dwBossTombLevel; //0x88
DWORD _3[248]; //0x8C There's at least 1 Room1 in here, leaving undefined for now
Level *pLevelFirst; //0x46C
DWORD _4[2]; //0x470
DWORD dwStaffTombLevel; //0x478
*/
/* From Sheppard
struct Act {
BYTE _1[0x34]; //0x00
Room1* pRoom1; //0x34
ActMisc* pMisc; //0x38
DWORD _2[2]; //0x40
DWORD dwAct; //0x44
*/
/*
Act Misc +0x38
//6FDA4E37 |> 8B40 38 MOV EAX,DWORD PTR DS:[EAX+38] <- Act Misc
DWORD _1[2]; //0x00
ActMisc *pMisc; //0x08
Room1 *pRoom1; //0x0C
DWORD _2; //0x10
DWORD dwAct; //0x14
DWORD pfnCallBack; //0x18*/
struct Path {
WORD xOffset; //0x00
WORD xPos; //0x02
WORD yOffset; //0x04
WORD yPos; //0x06
DWORD _1[2]; //0x08
WORD xTarget; //0x10
WORD yTarget; //0x12
DWORD _2[2]; //0x14
Room1 *pRoom1; //0x1C
Room1 *pRoomUnk; //0x20
DWORD _3[3]; //0x24
UnitAny *pUnit; //0x30
DWORD dwFlags; //0x34
DWORD _4; //0x38
DWORD dwPathType; //0x3C
DWORD dwPrevPathType; //0x40
DWORD dwUnitSize; //0x44
DWORD _5[4]; //0x48
UnitAny *pTargetUnit; //0x58
DWORD dwTargetType; //0x5C
DWORD dwTargetId; //0x60
BYTE bDirection; //0x64
};
struct ItemPath {
DWORD _1[3]; //0x00
DWORD dwPosX; //0x0C
DWORD dwPosY; //0x10
//Use Path for the rest
};
struct Stat {
WORD wSubIndex; //0x00
WORD wStatIndex; //0x02
DWORD dwStatValue; //0x04
};
struct StatList {
DWORD _1[9]; //0x00
Stat *pStat; //0x24
WORD wStatCount1; //0x28
WORD wStatCount2; //0x2A
DWORD _2[2]; //0x2C
BYTE *_3; //0x34
DWORD _4; //0x38
StatList *pNext; //0x3C
};
struct Inventory {
DWORD dwSignature; //0x00
BYTE *bGame1C; //0x04
UnitAny *pOwner; //0x08
UnitAny *pFirstItem; //0x0C
UnitAny *pLastItem; //0x10
DWORD _1[2]; //0x14
DWORD dwLeftItemUid; //0x1C
UnitAny *pCursorItem; //0x20
DWORD dwOwnerId; //0x24
DWORD dwItemCount; //0x28
};
struct Light {
DWORD _1[3]; //0x00
DWORD dwType; //0x0C
DWORD _2[7]; //0x10
DWORD dwStaticValid; //0x2C
int *pnStaticMap; //0x30
};
struct SkillInfo {
WORD wSkillId; //0x00
};
struct Skill {
SkillInfo *pSkillInfo; //0x00
Skill *pNextSkill; //0x04
DWORD _1[8]; //0x08
DWORD dwSkillLevel; //0x28
DWORD _2[2]; //0x2C
DWORD dwFlags; //0x30
};
struct Info {
BYTE *pGame1C; //0x00
Skill *pFirstSkill; //0x04
Skill *pLeftSkill; //0x08
Skill *pRightSkill; //0x0C
};
struct ItemData {
DWORD dwQuality; //0x00
DWORD _1[2]; //0x04
DWORD dwItemFlags; //0x0C 1 = Owned by player, 0xFFFFFFFF = Not owned
DWORD _2[2]; //0x10
DWORD dwFlags; //0x18
DWORD _3[3]; //0x1C
DWORD dwQuality2; //0x28
DWORD dwItemLevel; //0x2C
DWORD _4[2]; //0x30
WORD wPrefix; //0x38
WORD _5[2]; //0x3A
WORD wSuffix; //0x3E
DWORD _6; //0x40
BYTE BodyLocation; //0x44
BYTE ItemLocation; //0x45 Non-body/belt location (Body/Belt == 0xFF)
BYTE _7; //0x46
WORD _8; //0x47
DWORD _9[4]; //0x48
Inventory *pOwnerInventory; //0x5C
DWORD _10; //0x60
UnitAny *pNextInvItem; //0x64
BYTE _11; //0x68
BYTE NodePage; //0x69 Actual location, this is the most reliable by far
WORD _12; //0x6A
DWORD _13[6]; //0x6C
UnitAny *pOwner; //0x84
};
struct ItemTxt {
wchar_t szName2[0x40]; //0x00
union {
DWORD dwCode;
char szCode[4];
}; //0x40
BYTE _2[0x70]; //0x84
WORD nLocaleTxtNo; //0xF4
BYTE _2a[0x19]; //0xF7
BYTE xSize; //0xFC
BYTE ySize; //0xFD
BYTE _2b[13]; //0xFE
BYTE nType; //0x11E
BYTE _3[0x0d]; //0x11F
BYTE fQuest; //0x12A
};
struct MonsterTxt {
BYTE _1[0x6]; //0x00
WORD nLocaleTxtNo; //0x06
WORD flag; //0x08
WORD _1a; //0x0A
union {
DWORD flag1; //0x0C
struct {
BYTE flag1a; //0x0C
BYTE flag1b; //0x0D
BYTE flag1c[2]; //0x0E
};
};
BYTE _2[0x22]; //0x10
WORD velocity; //0x32
BYTE _2a[0x52]; //0x34
WORD tcs[3][4]; //0x86
BYTE _2b[0x52]; //0x9E
wchar_t szDescriptor[0x3c]; //0xF0
BYTE _3[0x1a0]; //0x12C
};
struct MonsterData {
BYTE _1[22]; //0x00
struct
{
BYTE fUnk:1;
BYTE fNormal:1;
BYTE fChamp:1;
BYTE fBoss:1;
BYTE fMinion:1;
}; //0x16
WORD _2; //0x17
DWORD _3; //0x18
BYTE anEnchants[9]; //0x1C
BYTE _4; //0x25
WORD wUniqueNo; //0x26
DWORD _5; //0x28
struct {
wchar_t wName[28];
}; //0x2C
};
struct ObjectTxt {
char szName[0x40]; //0x00
wchar_t wszName[0x40]; //0x40
BYTE _1[4]; //0xC0
BYTE nSelectable0; //0xC4
BYTE _2[0x87]; //0xC5
BYTE nOrientation; //0x14C
BYTE _2b[0x19]; //0x14D
BYTE nSubClass; //0x166
BYTE _3[0x11]; //0x167
BYTE nParm0; //0x178
BYTE _4[0x39]; //0x179
BYTE nPopulateFn; //0x1B2
BYTE nOperateFn; //0x1B3
BYTE _5[8]; //0x1B4
DWORD nAutoMap; //0x1BB
};
struct ObjectData {
ObjectTxt *pTxt; //0x00
DWORD Type; //0x04 (0x0F would be a Exp Shrine)
DWORD _1[8]; //0x08
char szOwner[0x10]; //0x28
};
struct ObjectPath {
Room1 *pRoom1; //0x00
DWORD _1[2]; //0x04
DWORD dwPosX; //0x0C
DWORD dwPosY; //0x10
//Leaving rest undefined, use Path
};
struct UnitAny {
DWORD dwType; //0x00
DWORD dwTxtFileNo; //0x04
DWORD _1; //0x08
DWORD dwUnitId; //0x0C
DWORD dwMode; //0x10
union
{
PlayerData *pPlayerData;
ItemData *pItemData;
MonsterData *pMonsterData;
ObjectData *pObjectData;
//TileData *pTileData doesn't appear to exist anymore
}; //0x14
DWORD dwAct; //0x18
Act *pAct; //0x1C
DWORD dwSeed[2]; //0x20
DWORD _2; //0x28
union
{
Path *pPath;
ItemPath *pItemPath;
ObjectPath *pObjectPath;
}; //0x2C
DWORD _3[5]; //0x30
DWORD dwGfxFrame; //0x44
DWORD dwFrameRemain; //0x48
WORD wFrameRate; //0x4C
WORD _4; //0x4E
BYTE *pGfxUnk; //0x50
DWORD *pGfxInfo; //0x54
DWORD _5; //0x58
StatList *pStats; //0x5C
Inventory *pInventory; //0x60
Light *ptLight; //0x64
DWORD _6[9]; //0x68
WORD wX; //0x8C
WORD wY; //0x8E
DWORD _7; //0x90
DWORD dwOwnerType; //0x94
DWORD dwOwnerId; //0x98
DWORD _8[2]; //0x9C
OverheadMsg* pOMsg; //0xA4
Info *pInfo; //0xA8
DWORD _9[6]; //0xAC
DWORD dwFlags; //0xC4
DWORD dwFlags2; //0xC8
DWORD _10[5]; //0xCC
UnitAny *pChangedNext; //0xE0
UnitAny *pRoomNext; //0xE4
UnitAny *pListNext; //0xE8 -> 0xD8
char szNameCopy[0x10]; //+0x66
};
struct BnetData
{
DWORD dwId; //0x00
DWORD dwId2; //0x04
DWORD _1[3]; //0x08
DWORD dwId3; //0x14
WORD Unk3; //0x18
char szGameName[22]; //0x1A
char szGameIP[16]; //0x30
DWORD _2[16]; //0x40
DWORD dwId4; //0x80
DWORD _3; //0x84
char szAccountName[48]; //0x88
char szPlayerName[24]; //0xB8
char szRealmName[8]; //0xD0
BYTE _4[273]; //0xD8
BYTE nCharClass; //0x1E9
BYTE nCharFlags; //0x1EA
BYTE nMaxDiff; //0x1EB
BYTE _5[31]; //0x1EC
BYTE nDifficulty; //0x20B
void *_6; //0x20C
DWORD _7[5]; //0x210
WORD _8; //0x224
BYTE _9; //0x226
char szRealmName2[24]; //0x227
char szGamePass[24]; //0x23F
char szGameDesc[256]; //0x257
WORD _10; //0x348
BYTE _11; //0x34B
};
struct WardenClientRegion_t
{
DWORD cbAllocSize; //+00
DWORD offsetFunc1; //+04
DWORD offsetRelocAddressTable; //+08
DWORD nRelocCount; //+0c
DWORD offsetWardenSetup; //+10
DWORD _2[2];
DWORD offsetImportAddressTable; //+1c
DWORD nImportDllCount; //+20
DWORD nSectionCount; //+24
};
struct SMemBlock_t {
DWORD _1[6];
DWORD cbSize; //+18
DWORD _2[31];
BYTE data[1]; //+98
};
struct WardenClient_t {
WardenClientRegion_t* pWardenRegion; //+00
DWORD cbSize; //+04
DWORD nModuleCount; //+08
DWORD param; //+0c
DWORD fnSetupWarden; //+10
};
struct WardenIATInfo_t
{
DWORD offsetModuleName;
DWORD offsetImportTable;
};
struct AttackStruct
{
DWORD dwAttackType; //0x00
UnitAny* lpPlayerUnit; //0x04
UnitAny* lpTargetUnit; //0x08
DWORD dwTargetX; //0x0C
DWORD dwTargetY; //0x10
DWORD _1; //0x14
DWORD _2; //0x18
};
struct Skill_t {
CHAR name[64];
WORD skillID;
};
/*
Akara NPCEntry
0 94 00 00 00 03 00 00 00 .......
8 35 0D 44 0D 00 00 00 00 5.D.....
10 00 00 B0 AA B0 6F 90 BD ..°ª°o½
18 B0 6F 00 00 00 00 00 00 °o......
20 00 00 00 00 00 00 01 .......
*/
// Thanks to Darawk for hooking me up with this preprocessor commands!
#pragma pack(push)
#pragma pack(1)
typedef struct {
DWORD dwNPCClassId;
DWORD dwEntryAmount;
WORD wEntryId1;
WORD wEntryId2;
WORD wEntryId3;
WORD wEntryId4;
WORD _1;
DWORD dwEntryFunc1;
DWORD dwEntryFunc2;
DWORD dwEntryFunc3;
DWORD dwEntryFunc4;
BYTE _2[5];
} NPCMenu;
struct OverheadMsg {
DWORD _1;
DWORD dwTrigger;
DWORD _2[2];
CHAR Msg[232];
};
#pragma pack(pop)
struct D2MSG {
HWND myHWND;
char lpBuf[256];
};
struct InventoryLayout
{
BYTE SlotWidth;
BYTE SlotHeight;
BYTE unk1;
BYTE unk2;
DWORD Left;
DWORD Right;
DWORD Top;
DWORD Bottom;
BYTE SlotPixelWidth;
BYTE SlotPixelHeight;
};
struct MpqTable
{
};
struct sgptDataTable
{
MpqTable* pPlayerClass;
DWORD dwPlayerClassRecords;
MpqTable* pBodyLocs;
DWORD dwBodyLocsRecords;
MpqTable* pStorePage;
DWORD dwStorePageRecords;
MpqTable* pElemTypes;
};
/*
Thanks to 99Elite for posting the list at ladderhall.com!
Layout of sgptDataTables
+0 : ptr to playerclass.bin
+4 : num records in playerclass.bin
+8 : ptr to bodylocs.bin
+c : num records in bodylocs.bin
+10 : ptr to storepage.bin
+14 : num records in storepage.bin
+18 : ptr to elemtypes.bin
+1c : num records in elemtypes.bin
+20 : ptr to hitclass.bin
+24 : num records in hitclass.bin
+28 : ptr to monmode.bin
+2c : num records in monmode.bin
+30 : ptr to plrmode.bin
+34 : num records in plrmode.bin
+38 : ptr to skillcalc.bin
+3c : num records in skillcalc.bin
+44 : ptr to skillscode.bin
+48 : num records in skillscode.bin
+50 : ptr to skilldesccode.bin
+54 : num records in skilldesccode.bin
+58 : ptr to misscalc.bin
+5c : num records in misccalc.bin
+64 : ptr to misscode.bin
+68 : numrecords in misccode.bin
+70 : ptr to events.bin
+74 : numrecords in events.bin
+88 : ptr to monai.bin
+8c : num records in monai.bin
+A4 : ptr to properties.bin
+Ac : num records in properties.bin
+b4 : ptr to hiredesc.bin
+b8 : num records in hiredesc.bin
+194 : ptr to sounds.bin
+19c : num records in sounds.bin
+1a0 : ptr to heirling.bin
+1a4 : num records in heirling.bin
+9a8 : ptr to npc.txt
+9ac : num records in npc.txt
+9b0 : ptr to colors.bin
+9b4 : num records in colors.bin
+a78 : ptr to monstats.bin
+a80 : num records in monstats.bin
+a84 : ptr to monsounds.bin
+a8c : num records in monsunds.bin
+a90 : ptr to monstats2.bin
+a98 : num records in monstats2.bin
+a9c : ptr to monplace.bin
+aa0 : numrecirds in monplace.bin
+aa8 : ptr to monprest.bin
+aac : ptr to monprest.bin (again) // check this
+ad4 : ptr to superuniques.bin
+adc : num records in superuniques.bin
+b64 : missiles.bin
+b6c : num records in missiles.bin
+b70 : ptr to monlvl.bin
+b74 : num records in monlvl.bin
+b78 : ptr to monseq.bin
+b7c : num records in monseq.bin
+b94 : num records in skillsdesc.bin
+b98 : ptr to skills.bin
+ba0 : num records in skills table