Initial commit

This commit is contained in:
Hash Borgir
2024-04-16 21:45:38 -06:00
commit 3159020c38
533 changed files with 135446 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct D2UniqueItemsTxt
{
uint16_t unk0x00; //0x00
char szName[34]; //0x02
uint32_t dwVersion; //0x24
union
{
uint32_t dwBaseItemCode; //0x28
char szBaseItemCode[4]; //0x28
};
uint32_t dwUniqueItemFlags; //0x2C
uint32_t dwRarity; //0x30
uint16_t wLvl; //0x34
uint16_t wLvlReq; //0x36
uint8_t nChrTransform; //0x38
uint8_t nInvTransform; //0x39
char szFlippyFile[32]; //0x3A
char szInvFile[34]; //0x5A
uint32_t dwCostMult; //0x7C
uint32_t dwCostAdd; //0x80
uint16_t wDropSound; //0x84
uint16_t wUseSound; //0x86
uint32_t dwDropSfxFrame; //0x88
uint32_t dwProp1; //0x8C
uint32_t dwPar1; //0x90
uint32_t dwMin1; //0x94
uint32_t dwMax1; //0x98
uint32_t dwProp2; //0x9C
uint32_t dwPar2; //0xA0
uint32_t dwMin2; //0xA4
uint32_t dwMax2; //0xA8
uint32_t dwProp3; //0xAC
uint32_t dwPar3; //0xB0
uint32_t dwMin3; //0xB4
uint32_t dwMax3; //0xB8
uint32_t dwProp4; //0xBC
uint32_t dwPar4; //0xC0
uint32_t dwMin4; //0xC4
uint32_t dwMax4; //0xC8
uint32_t dwProp5; //0xCC
uint32_t dwPar5; //0xD0
uint32_t dwMin5; //0xD4
uint32_t dwMax5; //0xD8
uint32_t dwProp6; //0xDC
uint32_t dwPar6; //0xE0
uint32_t dwMin6; //0xE4
uint32_t dwMax6; //0xE8
uint32_t dwProp7; //0xEC
uint32_t dwPar7; //0xF0
uint32_t dwMin7; //0xF4
uint32_t dwMax7; //0xF8
uint32_t dwProp8; //0xFC
uint32_t dwPar8; //0x100
uint32_t dwMin8; //0x104
uint32_t dwMax8; //0x10
uint32_t dwProp9; //0x10C
uint32_t dwPar9; //0x110
uint32_t dwMin9; //0x114
uint32_t dwMax9; //0x118
uint32_t dwProp10; //0x11C
uint32_t dwPar10; //0x120
uint32_t dwMin10; //0x124
uint32_t dwMax10; //0x128
uint32_t dwProp11; //0x12C
uint32_t dwPar11; //0x130
uint32_t dwMin11; //0x134
uint32_t dwMax11; //0x138
uint32_t dwProp12; //0x13C
uint32_t dwPar12; //0x140
uint32_t dwMin12; //0x144
uint32_t dwMax12; //0x148
};
}
}

View File

@@ -0,0 +1,17 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct room;
struct act_map //ptGame+BC size=0x60
{
uint32_t is_not_managed;
uint32_t uk4;
uint32_t uk8; //size = 0x488
room* pt_first_room;
};
}
}

View File

@@ -0,0 +1,23 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct gfxcell;
struct cellfile {
int32_t version; //0x00
struct {
int16_t flags;
int8_t mylastcol;
int8_t mytabno : 1;
}; //0x04
int32_t format; //0x08
int32_t termination; //0x0C
int32_t numdirs; //0x10
int32_t numcells; //0x14
gfxcell* cells[255]; //0x18
};
}
}

View File

@@ -0,0 +1,11 @@
#pragma once
namespace diablo2 {
namespace structures {
struct unit;
struct client_unit_list {
unit* unit_list[5][128]; //0x1120
};
}
}

View File

@@ -0,0 +1,41 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct damage {
int32_t hit_flags; //0x00
int16_t result_flags; //0x04
int16_t extra; //0x06
int32_t phys_damage; //0x08
int32_t en_dmg_pct; //0x0C
int32_t fire_damage; //0x10
int32_t burn_damage; //0x14
int32_t burn_len; //0x18
int32_t ltng_damage; //0x1C
int32_t mag_damage; //0x20
int32_t cold_damage; //0x24
int32_t pois_damage; //0x28
int32_t pois_len; //0x2C
int32_t cold_len; //0x30
int32_t frz_len; //0x34
int32_t life_leech; //0x38
int32_t mana_leech; //0x3C
int32_t stam_leech; //0x40
int32_t stun_len; //0x44
int32_t abs_life; //0x48
int32_t dmg_total; //0x4C
int32_t unk0_x50; //0x50
int32_t pierce_pct; //0x54
int32_t damage_rate; //0x58
int32_t unk0_x5_c; //0x5C
int32_t hit_class; //0x60
int8_t hit_class_active_set; //0x64
char conv_type; //0x65
int8_t unk0_x66[2]; //0x66
int32_t conv_pct; //0x68
int8_t unk0_x6_c[4]; //0x6C
};
}
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct bodylocs_line {
union {
uint32_t code;
char str[4];
};
};
}
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct elemtypes_line {
union {
uint32_t code;
char str[4];
};
};
}
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct hitclass_line {
union {
uint32_t code;
char str[4];
};
};
}
}

View File

@@ -0,0 +1,45 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct item_types_line {
char code[4]; //0x00
int16_t equiv1; //0x04
int16_t equiv2; //0x06
int8_t repair; //0x08
int8_t body; //0x09
int8_t body_loc1; //0x0A
int8_t body_loc2; //0x0B
int16_t shoots; //0x0C
int16_t quiver; //0x0E
int8_t throwable; //0x10
int8_t reload; //0x11
int8_t re_equip; //0x12
int8_t auto_stack; //0x13
int8_t magic; //0x14
int8_t rare; //0x15
int8_t normal; //0x16
int8_t charm; //0x17
int8_t gem; //0x18
int8_t beltable; //0x19
int8_t max_sock1; //0x1A
int8_t max_sock25; //0x1B
int8_t max_sock40; //0x1C
int8_t treasure_class; //0x1D
int8_t rarity; //0x1E
int8_t staff_mods; //0x1F
int8_t cost_formula; //0x20
int8_t item_class; //0x21
int8_t store_page; //0x22
int8_t var_inv_gfx; //0x23
char inv_gfx1[32]; //0x24
char inv_gfx2[32]; //0x44
char inv_gfx3[32]; //0x64
char inv_gfx4[32]; //0x84
char inv_gfx5[32]; //0xA4
char inv_gfx6[32]; //0xC4
};
}
}

View File

@@ -0,0 +1,211 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
//https://phrozen-library.fandom.com/wiki/Items_line
struct items_line {
char flippy_file[32]; //0x00
char inv_file[32]; //0x20
char unique_inv_file[32]; //0x40
char setinv_file[32]; //0x60
union {
uint32_t number_code; //0x80
char string_code[4]; //0x80
};
uint32_t norm_code; //0x84
uint32_t uber_code; //0x88
uint32_t ultra_code; //0x8C
uint32_t alternate_gfx; //0x90
void* spell; //0x94
uint16_t state; //0x98
uint16_t cstate1; //0x9A
uint16_t cstate2; //0x9C
uint16_t stat1; //0x9E
uint16_t stat2; //0xA0
uint16_t stat3; //0xA2
uint32_t calc1; //0xA4
uint32_t calc2; //0xA8
uint32_t calc3; //0xAC
uint32_t len; //0xB0
uint16_t spell_desc; //0xB4
uint16_t spell_desc_str; //0xB6
uint32_t spell_desc_calc; //0xB8
uint32_t better_gem; //0xBC
uint32_t weapon_class; //0xC0
uint32_t two_handed_weapon_class; //0xC4
uint32_t transmog_type; //0xC8
uint32_t min_ac; //0xCC
uint32_t max_ac; //0xD0
uint32_t gamble_cost; //0xD4
uint32_t speed; //0xD8
uint32_t bit_field1; //0xDC
uint32_t cost; //0xE0
uint32_t min_stack; //0xE4
uint32_t max_stack; //0xE8
uint32_t spawn_stack; //0xEC
uint32_t gem_offset; //0xF0
uint16_t name_str; //0xF4
uint16_t version; //0xF6
uint16_t auto_prefix; //0xF8
uint16_t missile_type; //0xFA
uint8_t rarity; //0xFC
uint8_t level; //0xFD
uint8_t min_damage; //0xFE
uint8_t max_damage; //0xFF
uint8_t min_misdamage; //0x100
uint8_t max_misdamage; //0x101
uint8_t two_hand_min_damage; //0x102
uint8_t two_hand_max_damage; //0x103
uint16_t range_adder; //0x104
uint16_t str_bonus; //0x106
uint16_t dex_bonus; //0x108
uint16_t req_str; //0x10A
uint16_t req_dex; //0x10C
uint8_t absorbs; //0x10E
uint8_t inv_width; //0x10F
uint8_t inv_height; //0x110
uint8_t block; //0x111
uint8_t durability; //0x112
uint8_t no_durability; //0x11
uint8_t missile; //0x114
uint8_t component; //0x115
uint8_t right_arm; //0x116
uint8_t left_arm; //0x117
uint8_t torso; //0x118
uint8_t legs; //0x119
uint8_t right_spad; //0x11A
uint8_t left_spad; //0x11B
uint8_t two_handed; //0x11C
uint8_t useable; //0x11D
uint16_t type; //0x11E
uint16_t type2; //0x120
uint16_t subtype; //0x122
uint16_t drop_sound; //0x124
uint16_t use_sound; //0x126
uint8_t drop_sfx_frame; //0x128
uint8_t unique; //0x129
uint8_t quest; //0x12A
uint8_t quest_diff_check; //0x12B
uint8_t transparent; //0x12C
uint8_t trans_tbl; //0x12D
uint8_t pad0_x12_e; //0x12E
uint8_t light_radius; //0x12F
uint8_t belt; //0x130
uint8_t auto_belt; //0x131
uint8_t stackable; //0x132
uint8_t spawnable; //0x133
uint8_t spell_icon; //0x134
uint8_t dur_warning; //0x135
uint8_t quantity_warning; //0x136
uint8_t has_inv; //0x137
uint8_t gem_sockets; //0x138
uint8_t transmogrify; //0x139
uint8_t transmog_min; //0x13A
uint8_t transmog_max; //0x13B
uint8_t hit_class; //0x13C
uint8_t one_or_two_handed; //0x13D
uint8_t gem_apply_type; //0x13E
uint8_t level_req; //0x13F
uint8_t magic_lvl; //0x140
uint8_t transform; //0x141
uint8_t inv_trans; //0x142
uint8_t compact_save; //0x143
uint8_t skip_name; //0x144
uint8_t nameable; //0x145
uint8_t akara_min; //0x146
uint8_t gheed_min; //0x147
uint8_t charsi_min; //0x148
uint8_t fara_min; //0x149
uint8_t lysander_min; //0x14A
uint8_t drognan_min; //0x14B
uint8_t hralti_min; //0x14C
uint8_t alkor_min; //0x14D
uint8_t ormus_min; //0x14E
uint8_t elzix_min; //0x14F
uint8_t asheara_min; //0x150
uint8_t cain_min; //0x151
uint8_t halbu_min; //0x152
uint8_t jamella_min; //0x153
uint8_t malah_min; //0x154
uint8_t larzuk_min; //0x155
uint8_t drehya_min; //0x156
uint8_t akara_max; //0x157
uint8_t gheed_max; //0x158
uint8_t charsi_max; //0x159
uint8_t fara_max; //0x15A
uint8_t lysander_max; //0x15B
uint8_t drognan_max; //0x15C
uint8_t hralti_max; //0x15D
uint8_t alkor_max; //0x15E
uint8_t ormus_max; //0x15F
uint8_t elzix_max; //0x160
uint8_t asheara_max; //0x161
uint8_t cain_max; //0x162
uint8_t halbu_max; //0x163
uint8_t jamella_max; //0x164
uint8_t malah_max; //0x165
uint8_t larzuk_max; //0x166
uint8_t drehya_max; //0x167
uint8_t akara_magic_min; //0x168
uint8_t gheed_magic_min; //0x169
uint8_t charsi_magic_min; //0x16A
uint8_t fara_magic_min; //0x16B
uint8_t lysander_magic_min; //0x16C
uint8_t drognan_magic_min; //0x16D
uint8_t hralti_magic_min; //0x16E
uint8_t alkor_magic_min; //0x16F
uint8_t ormus_magic_min; //0x170
uint8_t elzix_magic_min; //0x171
uint8_t asheara_magic_min; //0x172
uint8_t cain_magic_min; //0x173
uint8_t halbu_magic_min; //0x174
uint8_t jamella_magic_min; //0x175
uint8_t malah_magic_min; //0x176
uint8_t larzuk_magic_min; //0x177
uint8_t drehya_magic_min; //0x178
uint8_t akara_magic_max; //0x179
uint8_t gheed_magic_max; //0x17A
uint8_t charsi_magic_max; //0x17B
uint8_t fara_magic_max; //0x17C
uint8_t lysander_magic_max; //0x17D
uint8_t drognan_magic_max; //0x17E
uint8_t hralti_magic_max; //0x17F
uint8_t alkor_magic_max; //0x180
uint8_t ormus_magic_max; //0x181
uint8_t elzix_magic_max; //0x182
uint8_t asheara_magic_max; //0x183
uint8_t cain_magic_max; //0x184
uint8_t halbu_magic_max; //0x185
uint8_t jamella_magic_max; //0x186
uint8_t malah_magic_max; //0x187
uint8_t larzuk_magic_max; //0x188
uint8_t drehya_magic_max; //0x189
uint8_t akara_magic_lvl; //0x18A
uint8_t gheed_magic_lvl; //0x18B
uint8_t charsi_magic_lvl; //0x18C
uint8_t fara_magic_lvl; //0x18D
uint8_t lysander_magic_lvl; //0x18E
uint8_t drognan_magic_lvl; //0x18F
uint8_t hralti_magic_lvl; //0x190
uint8_t alkor_magic_lvl; //0x191
uint8_t ormus_magic_lvl; //0x192
uint8_t elzix_magic_lvl; //0x193
uint8_t asheara_magic_lvl; //0x194
uint8_t cain_magic_lvl; //0x195
uint8_t halbu_magic_lvl; //0x196
uint8_t jamella_magic_lvl; //0x197
uint8_t malah_magic_lvl; //0x198
uint8_t larzuk_magic_lvl; //0x199
uint8_t drehya_magic_lvl; //0x19A
uint8_t pad0_x19_b; //0x19B
uint32_t nightmare_upgrade; //0x19C
uint32_t hell_upgrade; //0x1A0
uint8_t perm_store_item; //0x1A4
uint8_t multi_buy; //0x1A5
uint16_t pad0_x1_a6; //0x1A6
};
}
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct monmode_line {
union {
uint32_t code;
char str[4];
};
};
}
}

View File

@@ -0,0 +1,234 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct monstats_line {
uint16_t id; //0x00
uint16_t base_id; //0x02
uint16_t next_in_class; //0x04
uint16_t name_str; //0x06
uint16_t desc_str; //0x08
uint16_t unk0_x0_a; //0x0A
uint32_t mon_stats_flags; //0x0C
uint32_t code; //0x10
uint16_t mon_sound; //0x14
uint16_t u_mon_sound; //0x16
uint16_t mon_stats_ex; //0x18
uint16_t mon_prop; //0x1A
uint16_t mon_type; //0x1C
uint16_t ai; //0x1E
uint16_t spawn; //0x20
uint8_t spawn_x; //0x22
uint8_t spawn_y; //0x23
uint16_t spawn_mode; //0x24
uint16_t minion1; //0x26
uint16_t minion2; //0x28
uint16_t unk0_x2_a; //0x2A
uint8_t party_min; //0x2C
uint8_t party_max; //0x2D
uint8_t rarity; //0x2E
uint8_t min_grp; //0x2F
uint8_t max_grp; //0x30
uint8_t sparse_populate; //0x31
uint16_t velocity; //0x32
uint16_t run; //0x34
uint16_t unk0_x36; //0x36
uint16_t unk0_x38; //0x38
uint16_t miss_a1; //0x3A
uint16_t miss_a2; //0x3C
uint16_t miss_s1; //0x3E
uint16_t miss_s2; //0x40
uint16_t miss_s3; //0x42
uint16_t miss_s4; //0x44
uint16_t miss_c; //0x46
uint16_t miss_sq; //0x48
uint16_t unk0_x4_a; //0x4A
uint8_t align; //0x4C
uint8_t trans_lvl; //0x4D
uint8_t threat; //0x4E
uint8_t ai_del; //0x4F
uint8_t ai_del_n; //0x50
uint8_t ai_del_h; //0x51
uint8_t ai_dist; //0x52
uint8_t ai_dist_n; //0x53
uint16_t ai_dist_h; //0x54
uint16_t ai_p1; //0x56
uint16_t ai_p1_n; //0x58
uint16_t ai_p1_h; //0x5A
uint16_t ai_p2; //0x5C
uint16_t ai_p2_n; //0x5E
uint16_t ai_p2_h; //0x60
uint16_t ai_p3; //0x62
uint16_t ai_p3_n; //0x64
uint16_t ai_p3_h; //0x66
uint16_t ai_p4; //0x68
uint16_t ai_p4_n; //0x6A
uint16_t ai_p4_h; //0x6C
uint16_t ai_p5; //0x6E
uint16_t ai_p5_n; //0x70
uint16_t ai_p5_h; //0x72
uint16_t ai_p6; //0x74
uint16_t ai_p6_n; //0x76
uint16_t ai_p6_h; //0x78
uint16_t ai_p7; //0x7A
uint16_t ai_p7_n; //0x7C
uint16_t ai_p7_h; //0x7E
uint16_t ai_p8; //0x80
uint16_t ai_p8_n; //0x82
uint16_t ai_p8_h; //0x84
uint16_t treasure_class1; //0x86
uint16_t treasure_class2; //0x88
uint16_t treasure_class3; //0x8A
uint16_t treasure_class4; //0x8C
uint16_t treasure_class1_n; //0x8E
uint16_t treasure_class2_n; //0x90
uint16_t treasure_class3_n; //0x92
uint16_t treasure_class4_n; //0x94
uint16_t treasure_class1_h; //0x96
uint16_t treasure_class2_h; //0x98
uint16_t treasure_class3_h; //0x9A
uint16_t treasure_class4_h; //0x9C
uint8_t tc_quest_id; //0x9E
uint8_t tc_quest_cp; //0x9F
uint8_t drain; //0xA0
uint8_t drain_n; //0xA1
uint8_t drain_h; //0xA2
uint8_t to_block; //0xA3
uint8_t b_to_block_n; //0xA4
uint8_t to_block_h; //0xA5
uint16_t crit; //0xA6
uint16_t skill_damage; //0xA8
uint16_t level; //0xAA
uint16_t level_n; //0xAC
uint16_t level_h; //0xAE
uint16_t min_hp; //0xB0
uint16_t min_hp_n; //0xB2
uint16_t min_hp_h; //0xB4
uint16_t max_hp; //0xB6
uint16_t max_hp_n; //0xB8
uint16_t max_hp_h; //0xBA
uint16_t ac; //0xBC
uint16_t ac_n; //0xBE
uint16_t ac_h; //0xC0
uint16_t a1_th; //0xC2
uint16_t a1_th_n; //0xC4
uint16_t a1_th_h; //0xC6
uint16_t a2_th; //0xC8
uint16_t a2_th_n; //0xCA
uint16_t a2_th_h; //0xCC
uint16_t s1_th; //0xCE
uint16_t s1_th_n; //0xD0
uint16_t s1_th_h; //0xD2
uint16_t exp; //0xD4
uint16_t exp_n; //0xD6
uint16_t exp_h; //0xD8
uint16_t a1_min_d; //0xDA
uint16_t a1_min_d_n; //0xDC
uint16_t a1_min_d_h; //0xDE
uint16_t a1_max_d; //0xE0
uint16_t a1_max_d_n; //0xE2
uint16_t a1_max_d_h; //0xE4
uint16_t a2_min_d; //0xE6
uint16_t a2_min_d_n; //0xE8
uint16_t a2_min_d_h; //0xEA
uint16_t a2_max_d; //0xEC
uint16_t a2_max_d_n; //0xEE
uint16_t a2_max_d_h; //0xF0
uint16_t s1_min_d; //0xF2
uint16_t s1_min_d_n; //0xF4
uint16_t s1_min_d_h; //0xF6
uint16_t s1_max_d; //0xF8
uint16_t s1_max_d_n; //0xFA
uint16_t s1_max_d_h; //0xFC
uint8_t el1_mode; //0xFE
uint8_t el2_mode; //0xFF
uint8_t el3_mode; //0x100
uint8_t el1_type; //0x101
uint8_t el2_type; //0x102
uint8_t el3_type; //0x103
uint8_t el1_pct; //0x104
uint8_t el1_pct_n; //0x105
uint8_t el1_pct_h; //0x106
uint8_t el2_pct; //0x107
uint8_t el2_pct_n; //0x108
uint8_t el2_pct_h; //0x109
uint8_t el3_pct; //0x10A
uint8_t el3_pct_n; //0x10B
uint8_t el3_pct_h; //0x10C
uint8_t unk0_x_10d; //0x10D
uint16_t el1_min_d; //0x10E
uint16_t el1_min_d_n; //0x110
uint16_t el1_min_d_h; //0x112
uint16_t el2_min_d; //0x114
uint16_t el2_min_d_n; //0x116
uint16_t el2_min_d_h; //0x118
uint16_t el3_min_d; //0x11A
uint16_t el3_min_d_n; //0x11C
uint16_t el3_min_d_h; //0x11E
uint16_t el1_max_d; //0x120
uint16_t el1_max_d_n; //0x122
uint16_t el1_max_d_h; //0x124
uint16_t el2_max_d; //0x126
uint16_t el2_max_d_n; //0x128
uint16_t el2_max_d_h; //0x12A
uint16_t el3_max_d; //0x12C
uint16_t el3_max_d_n; //0x12E
uint16_t el3_max_d_h; //0x130
uint16_t el_1dur; //0x132
uint16_t el_1dur_n; //0x134
uint16_t el_1dur_h; //0x136
uint16_t el_2dur; //0x138
uint16_t el_2dur_n; //0x13A
uint16_t el_2dur_h; //0x13C
uint16_t el_3dur; //0x13E
uint16_t el_3dur_n; //0x140
uint16_t el_3dur_h; //0x142
uint16_t res_dmg; //0x144
uint16_t res_dmg_n; //0x146
uint16_t res_dmg_h; //0x148
uint16_t res_magic; //0x14A
uint16_t res_magic_n; //0x14C
uint16_t res_magic_h; //0x14E
uint16_t res_fire; //0x150
uint16_t res_fire_n; //0x152
uint16_t res_fire_h; //0x154
uint16_t res_light; //0x156
uint16_t res_light_n; //0x158
uint16_t res_light_h; //0x15A
uint16_t res_cold; //0x15C
uint16_t res_cold_n; //0x15E
uint16_t res_cold_h; //0x160
uint16_t res_poison; //0x162
uint16_t res_poison_n; //0x164
uint16_t res_poiosn_h; //0x166
uint8_t cold_effect; //0x168
uint8_t cold_effect_n; //0x169
uint16_t cold_effect_h; //0x16A
uint32_t send_skills; //0x16C
uint16_t skill1; //0x170
uint16_t skill2; //0x172
uint16_t skill3; //0x174
uint16_t skill4; //0x176
uint16_t skill5; //0x178
uint16_t skill6; //0x17A
uint16_t skill7; //0x17C
uint16_t skill8; //0x17E
uint32_t unk0_x180[6]; //0x180
uint8_t sk1_lvl; //0x198
uint8_t sk2_lvl; //0x199
uint8_t sk3_lvl; //0x19A
uint8_t sk4_lvl; //0x19B
uint8_t sk5_lvl; //0x19C
uint8_t sk6_lvl; //0x19D
uint8_t sk7_lvl; //0x19E
uint8_t sk8_lvl; //0x19F
uint32_t damage_regen; //0x1A0
uint8_t spl_end_death; //0x1A4
uint8_t spl_get_mode_chart; //0x1A5
uint8_t spl_end_generic; //0x1A6
uint8_t spl_client_end; //0x1A7
};
}
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct playerclass_line {
union {
uint32_t code;
char str[4];
};
};
}
}

View File

@@ -0,0 +1,15 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct properties_line {
uint16_t prop;
uint8_t set[8];
uint16_t val[7];
uint8_t func[8];
uint16_t stat[7];
};
}
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct storepage_line {
union {
uint32_t code;
char str[4];
};
};
}
}

View File

@@ -0,0 +1,305 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct linkage;
struct playerclass_line;
struct bodylocs_line;
struct storepage_line;
struct elemtypes_line;
struct hitclass_line;
struct monmode_line;
struct properties_line;
struct unique_items //size=0x14C (332)
{
WORD uniqueId; //+00
BYTE uk1[0x20]; //+02
WORD uniqueNameId; //+22
BYTE uk2[0x08]; //+24
union {
BYTE flag; //+2C
struct {
BYTE ukf : 2;
BYTE carry1 : 1;
BYTE ladder : 1;
};
};
BYTE uk3[0x11F]; //+2D
};
struct data_tables {
playerclass_line* player_class; //+00000000 01415B48 playerclass.txt
linkage* player_class_info; //+00000004 01410524 playerclass info
bodylocs_line* body_locs; //+00000008 01415578 bodylocs.txt
linkage* body_locs_info; //+0000000C 01410504 bodylocs info
storepage_line* store_page; //+00000010 01414CC8 storepage.txt
linkage* store_page_info; //+00000014 01415B24 storepage info
elemtypes_line* elemtypes; //+00000018 01414958 elemtypes.txt
linkage* elemtypes_info; //+0000001C 01415B04 elemtypes info
hitclass_line* hit_class; //+00000020 01414148 hitclass.txt
linkage* hit_class_info; //+00000024 01415AE4 hitclass info
monmode_line* mon_mode; //+00000028 01416878 monmode.txt
linkage* mon_mode_info; //+0000002C 01415514 monmode info
void* pPlayerModeStub; //+00000030 014162E8 plrmode.txt
linkage* iPlayerMode; //+00000034 01414934 plrmode info
void* pSkillCalc; //+00000038 05279860 skillcalc.txt
linkage* iSkillCalc; //+0000003C 01410014 skillcalc info
uint8_t* pSkillsCode; //+00000040 0537A514 skillscode formulae
uint32_t dwSkillsCodeSize; //+00000044 00001768 size of skillscode block
uint32_t dwSkillsCodeSizeEx; //+00000048 00001768 size of skillscode block
uint8_t* pSkillDescCode; //+0000004C 0535C994 skilldesccode formulae
uint32_t dwSkillDescCodeSize; //+00000050 0000107F size of skilldesccode block
uint32_t dwSkillDescCodeSizeEx; //+00000054 0000107F size of skilldesccode block
const char* pMissileCalc; //+00000058 01419C28 misscalc.txt
linkage* iMissileCalc; //+0000005C 01417024 misscalc info
uint8_t* pMissCode; //+00000060 014A4944 misscode formulae
uint32_t dwMissCodeSize; //+00000064 000000D4 size of misscode block
uint32_t dwMissCodeSizeEx; //+00000068 000000D4 size of misscode block
const char* pSkillCode; //+0000006C 052C445C skillcode.txt (Id from skills.txt)
linkage* iSkillCode; //+00000070 0141F084 skillcode info
void* pEvents; //+00000074 0141ACA8 events.txt
linkage* iEvents; //+00000078 0141F064 events info
uint32_t* pCompCodes; //+0000007C 06C4FAFC compcode.txt
linkage* iCompCodes; //+00000080 01410544 compcode info
int nCompCodes; //+00000084 00000073 # of compcode records
void* pMonAI; //+00000088 0564351C monai.txt
linkage* iMonAI; //+0000008C 01414914 monai info
int nMonAI; //+00000090 00000098 # of monai records
linkage* iItems; //+00000094 014BA014 items info
uint8_t* pItemsCode; //+00000098 013FDED8 itemscode formulae
uint32_t dwItemsCodeSize; //+0000009C 000010E0 size of itemscode block
uint32_t dwItemsCodeSizeEx; //+000000A0 000010E0 size of itemscode block
uint32_t* pProperties; //+000000A4 0579E218 properties.txt
linkage* iProperties; //+000000A8 01489464 properties info
int nProperties; //+000000AC 00000110 # of properties records
linkage* iRunes; //+000000B0 014C4774 runes info
uint32_t* pMercDesc; //+000000B4 01417208 hiredesc.txt
linkage* iMercDesc; //+000000B8 01415534 hiredesc info
uint32_t* pStates; //+000000BC 05767EA0 states.txt (limit = 255)
linkage* iStates; //+000000C0 014A16C4 states info
int nStates; //+000000C4 000000BD # of states records
void* pStateMasks; //+000000C8 014A2574 statemasks.txt
uint32_t* fStateMasks[40]; //+000000CC 014A2574 statemasks[40] (statemasks.txt segment array)
short* pProgressiveStates; //+0000016C 014A23E4 progressive-state list
int nProgressiveStates; //+00000170 00000006 # of progressive states
short* pCurseStates; //+00000174 014A2254 curse-state list
int nCurseStates; //+00000178 0000001A # of curse states
short* pTransformStates; //+0000017C 014A20C4 transform-state list
int nTransformStates; //+00000180 00000007 # of transform states
short* pActionStates; //+00000184 014A3E74 action-state list
int nActionStates; //+00000188 00000007 # of action states
short* pColourStates; //+0000018C 014A3CE4 color-state list
int nColourStates; //+00000190 00000002 # of color states
void* pSoundCodes; //+00000194 057656BC soundcode.txt (sound column from sounds.txt)
linkage* iSoundCodes; //+00000198 0141F0E4 soundcode info
int nSoundCodes; //+0000019C 00000000 # of soundcode records (blanked out later)
uint32_t* pHirelings; //+000001A0 055D8CD8 hirelings.txt (limit = 256)
int nHirelings; //+000001A4 00000078 # of hirelings records
int pMercFirst[256]; //+000001A8 00000000 array of 256 integers (namefirst column from hirelings.txt)
int pMercLast[256]; //+000005A8 0000000C array of 256 integers (namelast column from hirelings.txt)
void* pNPCs; //+000009A8 05724F74 npcs.txt
int nNPCs; //+000009AC 00000011 # of npcs records
void* pColours; //+000009B0 01417568 colors.txt
linkage* iColours; //+000009B4 01415554 colors info
linkage* iTreasureClassEx; //+000009B8 014C4714 treasureclassex info
uint32_t* pTreasureClassEx; //+000009BC 05718D98 treasureclassex.txt (limit = 65534 - autotcs#)
int nTreasureClassEx; //+000009C0 0000043C # of treasureclassex records
uint32_t* aTreasureClass[45]; //+000009C4 0571D074 chest treasureclassex list (an array of 45 pointers)
uint32_t* pMonstats; //+00000A78 04FE0014 monstats.txt (limit = 32766)
linkage* iMonstats; //+00000A7C 0143C024 monstats info
int nMonstats; //+00000A80 000002E1 # of monstats records
void* pMonSounds; //+00000A84 013EBC9C monsounds.txt
linkage* iMonSounds; //+00000A88 01438024 monsounds info
int nMonSounds; //+00000A8C 0000008D # of monsounds records
uint32_t* pMonstats2; //+00000A90 05287408 monstats2.txt (no sign of that 1023 record limit)
linkage* iMonstats2; //+00000A94 01502014 monstats2 info
int nMonstats2; //+00000A98 00000245 # of monstats2 records
void* pMonPlace; //+00000A9C 01412648 monplace.txt
linkage* iMonPlace; //+00000AA0 01417BA4 monplace info
int nMonPlace; //+00000AA4 00000025 # of monplace records
void* pMonPreset; //+00000AA8 057248B0 monpreset.txt
void* aMonPresetI[5]; //+00000AAC 057248B0 array of 5 pointers to the monpreset sections for each of the 5 acts
void* aMonPresetII[5]; //+00000AC0 0000002F array of 5 integers (# of records for monpreset in each of the 5 acts)
uint32_t* pSuperUniques; //+00000AD4 05364928 superuniques.txt (limit = 512)
linkage* iSuperUniques; //+00000AD8 0145A1F4 superuniques info
int nSuperUniques; //+00000ADC 00000042 # of superunique records
uint16_t aSuperUniques[66]; //+00000AE0 00010000 array of 66 uint16_ts (the IdNos of the default superuniques, new ones are not added here [thankfully])
uint32_t* pMissiles; //+00000B64 05590014 missiles.txt (does some fixing for collidetype > 8)
linkage* iMissiles; //+00000B68 01492014 missiles info
int nMissiles; //+00000B6C 000002C4 # of missiles records
uint32_t* pMonLvl; //+00000B70 013B0064 monlvl.txt
int nMonLvl; //+00000B74 0000006F # of monlvl records
void* pMonSeq; //+00000B78 05375900 monseq.txt
linkage* iMonSeq; //+00000B7C 0143A024 monseq info
int nMonSeq; //+00000B80 000003F2 # of monseq records
uint32_t* pMonSeqTable; //+00000B84 0143E7E4 sequences table (created from monseq.txt)
int nMonSeqTable; //+00000B88 0000003C # of sequences
uint32_t* pSkillDesc; //+00000B8C 05741104 skilldesc.txt (limit = 32766) [JL and not JLE]
linkage* iSkillDesc; //+00000B90 014B8024 skilldesc info
int nSkillDesc; //+00000B94 000000DD # of skilldesc records
uint32_t* pSkills; //+00000B98 056E4D78 skills.txt (limit = 32766) [JL and not JLE]
linkage* iSkills; //+00000B9C 014B50E4 skills info
int nSkills; //+00000BA0 00000173 # of skills records
int* nClassSkillCount; //+00000BA4 014B9014 class skill count list
int nHighestClassSkillCount; //+00000BA8 0000001E # highest class skill count
short* nClassSkillList; //+00000BAC 014BCB54 class skill list
int nPassiveSkills; //+00000BB0 0000001C # of passive skills
uint16_t* pPassiveSkills; //+00000BB4 014BCB04 passiveskill list
linkage* iOverlay; //+00000BB8 01484024 overlay info
uint32_t* pOverlay; //+00000BBC 05352F54 overlay.txt
int nOverlay; //+00000BC0 00000125 # of overlay records
uint32_t* pCharStats; //+00000BC4 057AD178 charstats.txt
int nCharStats; //+00000BC8 00000007 # of charstats records
uint32_t* pItemStatCost; //+00000BCC 05219760 itemstatcost.txt (limit = 510) [511 used as END_OF_STATS in 'GF/JM' files]
linkage* iItemStatCost; //+00000BD0 0148C024 itemstatcost info
int nItemStatCost; //+00000BD4 0000016E # of itemstatcost records
void* pOPStats; //+00000BD8 014882A4 opstats nesting table
int nOPStats; //+00000BDC 000000D3 # of nested opstats
uint32_t* pMonEquip; //+00000BE0 013B3798 monequip.txt (limit = 32766)
int nMonEquip; //+00000BE4 0000002D # of monequip records
uint32_t* pPetType; //+00000BE8 05774138 pettype.txt (limit = 511)
linkage* iPetType; //+00000BEC 01486024 pettype info
int nPetType; //+00000BF0 00000014 # of pettype records
linkage* iItemTypes; //+00000BF4 0141E024 itemtypes info
uint32_t* pItemTypes; //+00000BF8 050D14AC itemtypes.txt
int nItemTypes; //+00000BFC 00000069 # of itemtypes records
int nItemTypesIndex; //+00000C00 00000004 (itemtypes#+31)/32
uint32_t* pItemTypesNest; //+00000C04 0537C41C itemtypes nesting table
linkage* iSets; //+00000C08 014B3CE4 sets info
void* pSets; //+00000C0C 057A162C sets.txt (limit = 32766)
int nSets; //+00000C10 00000020 # of sets records
linkage* iSetItems; //+00000C14 014B1024 setitems info
uint32_t* pSetItems; //+00000C18 056BBAC0 setitems.txt (limit = 32766)
int nSetItems; //+00000C1C 0000007F # of setitems records
linkage* iUniqueItems; //+00000C20 014AA044 uniqueitems info
unique_items* pUniqueItems; //+00000C24 0510E8B4 uniqueitems.txt (limit = 32766)
int nUniqueItems; //+00000C28 00000191 # of uniqueitems records
//linkage* iMonProp; //+00000C2C 01439024 monprop info
//FileMonpropTable* pMonProp; //+00000C30 05132A2C monprop.txt
//int nMonProp; //+00000C34 0000000E # of monprop records
//linkage* iMonType; //+00000C38 0141C024 montype info
//void* pMonType; //+00000C3C 06C4F014 montype.txt
//int nMonType; //+00000C40 0000003B # of montype records
//uint32_t* pMonTypeNest; //+00000C44 0141AAB4 montype nesting table
//int nMonTypeIndex; //+00000C48 00000002 (montype#+31)/32
//linkage* iMonUMod; //+00000C4C 0145A274 monumod info
//FileMonumodTable* pMonUMod; //+00000C50 0654F014 monumod.txt (limit = 512)
//int nMonUMod; //+00000C54 0000002B # of monumod records
//FileLevelsTable* pLevels; //+00000C58 0562D0EC levels.txt (limit = 1023)
//int nLevels; //+00000C5C 00000096 # of levels records
//FileLevelDefsTable* pLevelDefs; //+00000C60 055E134C leveldefs.txt
//FileLevelPresetTable* pLevelPreset; //+00000C64 0502C7E8 lvlprest.txt
//int nLevelPreset; //+00000C68 00000447 # of lvlprest records
//int nStuff; //+00000C6C 00000006 stuff value (ItemStatCost.txt + 0x140, record #1)
//int cStuff; //+00000C70 0000003F 2 ^ stuff - 1 (used as a controller field for opstats and other special stats)
//FileAnimDataTable* pAnimData; //+00000C74 052369C0 sgptAnimTables (see below)
//FileExperienceTable* pExperience; //+00000C78 05ECF014 experience.txt
//FileDifficultyLevelsTable* pDifficultyLevels; //+00000C7C 05750CD8 difficultylevels.txt (recordNo must equal 3)
//int nDifficultyLevels; //+00000C80 00000003 # of difficultylevels records
//BOOL bCompileTXT; //+00000C84 -txt switch
//void* ExpFieldI[6]; //+00000C88
//uint32_t unk0[4]; //+00000CA0
//void* pExpField; //+00000CB0
//void* ExpFieldII[4]; //+00000CB4
//void* pCubeMain; //+00000CC4
//int nCubeMain; //+00000CC8
//int nInventory; //+00000CCC
//D2InventoryRecordStrc* pInventory; //+00000CD0
//uint32_t unk1; //+00000CD4
//int nMasterItemList; //+00000CD8
//FileItemTable* pMasterItemList; //+00000CDC
//void* pWeapons; //+00000CE0
//int nWeapons; //+00000CE4
//void* pArmor; //+00000CE8
//int nArmor; //+00000CEC
//void* pMisc; //+00000CF0
//int nMisc; //+00000CF4
//uint32_t unk2; //+00000CF8
//int nGems; //+00000CFC
//FileGemsTable* pGems; //+00000D00
//int nLowQualityItems; //+00000D04
//FileLowQualityItemsTable* pLowQualityItems; //+00000D08
//int nBooks; //+00000D0C
//FileBooksTable* pBooks; //+00000D10
//int nRareAffix; //+00000D14
//FileRareAffixTable* pRareAffix; //+00000D18
//FileRareAffixTable* pRareSuffix; //+00000D1C
//FileRareAffixTable* pRarePrefix; //+00000D20
//int nItemRatio; //+00000D24
//FileItemratioTable* pItemRatio; //+00000D28
//uint32_t unk3; //+00000D2C
//int nGamble; //+00000D30
//uint32_t* pGambleSelection; //+00000D34
//int* pGambleChooseLimit[100]; //+00000D3C
//int nAffix; //+00000EC8
//FileAffixTable* pAffix; //+00000ECC [suffixes][prefixes][automagic]
//FileAffixTable* pMagicSuffix; //+00000ED0
//FileAffixTable* pMagicPrefix; //+00000ED4
//FileAffixTable* pAutoMagic; //+00000ED8
//int nRunes; //+00000EDC
//void* pRunes; //+00000EE0
//int nQualityItems; //+00000EE4
//FileQualityitemsTable* pQualityItems; //+00000EE8
//uint32_t unk4; //+00000EEC
//uint32_t dwHiSeed; //+00000EF0
//uint32_t dwLoSeed; //+00000EF4
//uint32_t dwAutoMapRand[72]; //+00000EFC
//void* pLvlTypes; //+00001018
//int* pPortalLevels; //+0000101C
//int nPortalLevels; //+00001020
//int nLvlTypes; //+00001024
//FileLevelWarpTable* pLevelWarp; //+00001028
//int nLevelWarp; //+0000102C
//FileLevelMazeTable* pLevelMaze; //+00001030
//int nLevelMaze; //+00001034
//void* pLvlSub; //+00001038
//int nLvlSub; //+0000103C
//void* sLvlSub; //+00001040
//uint32_t unk5; //+00001044
//void* ppLvlTypes; //+00001048
//uint32_t unk6; //+0000104C
//D2AutoMapShortStrc* pAutoMap; //+00001050
//int nAutoMap; //+00001054
//void* pMonLink; //+00001058
//int nMonItemPercent; //+0000105C
//void* pMonItemPercent; //+00001060
//void* pUniqueTitle; //+00001064
//void* pUniquePrefix; //+00001068
//void* pUniqueSuffix; //+0000106C
//void* pUniqueAppelation; //+00001070
//int nUniqueTitle; //+00001074
//int nUniquePrefix; //+00001078
//int nUniqueSuffix; //+0000107C
//int nUniqueAppelation; //+00001080
//uint32_t unk7[4]; //+00001084
//FileShrinesTable* pShrines; //+00001094
//int nShrines; //+00001098
//FileObjectsTable* pObjects; //+0000109C
//int nObjects; //+000010A0
//void* pObjGroup; //+000010A4
//int nObjectGroup; //+000010A8
//void* pArmType; //+000010AC
//int nMonMode; //+000010B0
//FileMonmodeTable* pMonMode[3]; //+000010B4
//void* pMonLoc; //+000010B8
//int nObjTypeAndMode; //+000010BC
//void* pObjTypeAndMode; //+000010C0
//void* pObjType; //+000010C4
//void* pObjMode; //+000010C8
//int nPlayerTypeAndMode; //+000010CC
//void* pPlayerTypeAndMode; //+000010D0
//void* pPlayerType; //+000010D4
//void* pPlayerMode; //+000010D8
};
}
}

View File

@@ -0,0 +1,16 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct file_handle {
char pad_0000[0x134];
void* file;
int32_t position;
int32_t size;
char pad_0001[0x18];
};
static_assert(sizeof(file_handle) == 0x158);
}
}

View File

@@ -0,0 +1,57 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct unit;
struct game {
char pad_0000[24]; //0x0000
void* critical_section; //0x0018
void* memory_pool; //0x001C
char pad_0020[74]; //0x0020
int8_t game_type; //0x006A
char pad_006_b[2]; //0x006B
int8_t difficulty_level; //0x006D
char pad_006_e[2]; //0x006E
int32_t expansion; //0x0070
int32_t game_type2; //0x0074
int32_t item_format; //0x0078
int32_t init_seed; //0x007C
int32_t object_seed; //0x0080
int32_t init_seed2; //0x0084
void* last_client; //0x0088 structure of last player that entered the game
int32_t clients_count; //0x008C
int32_t unit_counts[6]; //0x0090
int32_t game_frame; //0x00A8
char pad_00_ac[12]; //0x00AC
void* timer_queue; //0x00B8
void* drlg_act[5]; //0x00BC
int32_t lo_seed; //0x00D0
int32_t hi_seed; //0x00D4
char pad_00d8[20]; //0x00D8
int32_t monster_seed; //0x00EC
void* monster_region[1024]; //0x00F0
void* object_controller; //0x10F0
void* quest_controller; //0x10F4
void* unit_nodes[10]; //0x10F8
unit* unit_list[5][128]; //0x1120
void* tile_list; //0x1B20
int32_t unique_flags[128]; //0x1B24
void* npc_control; //0x1D24
void* arena_control; //0x1D28
void* party_control; //0x1D2C
int8_t boss_flags[64]; //0x1D30
int32_t monster_mode_data[17]; //0x1D70
int32_t monster_mode_data_count; //0x1DB4
char pad_1db8[12]; //0x1DB8
int32_t sync_timer; //0x1DC4
char pad_1dc8[32]; //0x1DC8
int32_t uber_baal; //0x1DE8
int32_t uber_diablo; //0x1DEC
int32_t uber_mephisto; //0x1DF0
}; //Size: 0x1DF4
static_assert(sizeof(game) == 0x1DF4);
}
}

View File

@@ -0,0 +1,7 @@
#pragma once
namespace diablo2 {
namespace structures {
struct game_server {};
}
}

View File

@@ -0,0 +1,16 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct gfxcell {
int32_t version;
int32_t width;
int32_t height;
int32_t offset_x;
int32_t offset_y;
void* fram_pixel_data;
};
}
}

View File

@@ -0,0 +1,45 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct cellfile;
struct gfxcell;
struct gfxdata {
gfxcell* cell_init; //+00
cellfile* cell_file; //+04
int32_t frame; //+08
int32_t direction; //+0C
int max_directions; //+10
int max_frames; //+14
int32_t flags; //+18
int8_t state; //+1C
union {
int8_t component; //+1D
int8_t item_flags; //+1D
};
int8_t unk1_e; //+1E - padding no doubt
int8_t unk1_f; //+1F
int unit_type; //+20
int unit_index; //+24
int mode; //+28
int overlay; //+2C
union {
// [token][component][type][mode][hitclass]
struct {
int32_t token; //+30
int32_t component; //+34
int32_t armor_type; //+38 - lit, med , hvy
int32_t mode; //+3C
int32_t hit_class; //+40
} details;
char unk_name[5][4]; //+30
};
const char* name; //+44
};
static_assert(sizeof(gfxdata) == 0x48);
}
}

View File

@@ -0,0 +1,28 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct unit;
struct inventory {
//Offset from Code. Size: 30 or 40
int32_t tag; //0x0000
void* memory_pool; //0x0004
unit* owner; //0x0008
unit* first_item; //0x000C
unit* last_item; //0x0010
void* inventory_info; //0x0014
int32_t inventory_info_count; //0x0018
int32_t weapon_guid; //0x001C
unit* inventory_owner_item; //0x0020
int32_t inventory_owner_guid; //0x0024
int32_t filled_sockets_count; //0x0028
char pad_002_c[8]; //0x002C
void* first_corpse; //0x0034
char pad_0038[4]; //0x0038
int32_t next_corpse_guid; //0x003C
};
}
}

View File

@@ -0,0 +1,120 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct inventory;
struct unit;
enum class item_quality_t : uint32_t {
ITEM_QUALITY_INFERIOR = 0x01,
ITEM_QUALITY_NORMAL = 0x02,
ITEM_QUALITY_SUPERIOR = 0x03,
ITEM_QUALITY_MAGIC = 0x04,
ITEM_QUALITY_SET = 0x05,
ITEM_QUALITY_RARE = 0x06,
ITEM_QUALITY_UNIQUE = 0x07,
ITEM_QUALITY_CRAFTED = 0x08,
ITEM_QUALITY_TEMPERED = 0x09,
ITEM_QUALITY_COUNT
};
struct item_data {
//Offset from Code.
item_quality_t quality; //+00
uint32_t seed_low; //+04
uint32_t seed_hi; //+08
uint32_t player_id; //+0C #10734 / #10735 (PCInventory->ptPlayer->0C)
uint32_t seed_starting; //+10
uint32_t flags1; //+14
union {
uint32_t flags2; //+18
struct {
uint32_t fuk1 : 1; //0x00000001
uint32_t is_indentified : 1; //0x00000002
uint32_t fuk2 : 2; //0x0000000C
uint32_t is_unindentified : 1; //0x00000010
uint32_t fuk3 : 3; //0x000000E0
uint32_t is_broken : 1; //0x00000100
uint32_t fuk4 : 2; //0x00000600
uint32_t is_socketed : 1; //0x00000800
uint32_t fuk5 : 10; //0x003FF000
uint32_t is_etheral : 1; //0x00400000
uint32_t fuk6 : 3; //0x03800000
uint32_t is_runeword : 1; //0x04000000
uint32_t fuk7 : 1; //0x08000000
uint32_t is_personalized : 1; //0x10000000
uint32_t fuk8 : 3; //0xE0000000
};
};
/*
ITEMFLAG_NEWITEM = 0x00000001,
ITEMFLAG_TAGETING = 0x00000004,
ITEMFLAG_UNIDENTIFIED = 0x00000010,
ITEMFLAG_QUANTITY = 0x00000020,
ITEMFLAG_Durability = 0x00000100,
ITEMFLAG_UNKNOWN2 = 0x00000400,
ITEMFLAG_SOCKETED = 0x00000800,
ITEMFLAG_NON_SELLABLE = 0x00001000,
ITEMFLAG_NEWITEM2 = 0x00002000,
ITEMFLAG_UNKNOWN3 = 0x00004000,
ITEMFLAG_CHECKSECPRICE = 0x00010000,
ITEMFLAG_CHECKGAMBLEPRICE = 0x00020000,
ITEMFLAG_UNKNOWN4 = 0x00080000,
ITEMFLAG_INDESTRUCTIBLE(ETHERAL) = 0x00400000,
ITEMFLAG_UNKNOWN5 = 0x00800000,
ITEMFLAG_FROMPLAYER = 0x01000000,
ITEMFLAG_RUNEuint16_t = 0x04000000
*/
uint32_t guid1; //+1C Global Unique ID 1
uint32_t guid2; //+20 Global Unique ID 2
uint32_t guid3; //+24 Global Unique ID 3
uint32_t unique_id; //+28
uint8_t ilvl; //+2C
uint8_t uk1[0x03]; //+2D
uint16_t version; //+30
uint16_t rare_prefix; //+32
uint16_t rare_suffix; //+34
uint16_t auto_pref; //+36
uint16_t prefix[3]; //+38
uint16_t suffix[3]; //+3E
uint8_t equip_loc; //+44
/* emplacement si équipé
* 00 = noequip/inBelt
* 01 = head
* 02 = neck
* 03 = tors
* 04 = rarm
* 05 = larm
* 06 = lrin
* 07 = rrin
* 08 = belt
* 09 = feet
* 0A = glov
* 0B = ralt
* 0C = lalt
*/
uint8_t page; //+45
/* page dans laquel se trouve l'item
* FF = mouse/equip/onEarth
* 00 = inventory
* 01 = cube
* 04 = stash
*/
uint8_t uk4[0x01]; //+46
uint8_t item_data3; //+47 //D2Common10854 D2Common10853
uint8_t p_ear_level; //+48
uint8_t var_gfx; //+49
char i_name[0x12]; //+4A //inscribed/ear get_name
inventory* inventory; //+5C
unit* pt_prev_item; //+60
unit* pt_next_item; //+64
uint8_t uk8[0x01]; //+68
uint8_t item_data2; //+69
uint8_t uk9[0x0A]; //+6A
};
}
}

View File

@@ -0,0 +1,12 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct linkage {
void* link;
uint32_t unk[3];
};
}
}

View File

@@ -0,0 +1,28 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct monstats_line;
struct monster_data { // sizeof(MonsterData)=0x60
monstats_line* monstats;
uint8_t components[16]; //+04
union {
uint16_t flags; //+16
struct {
uint16_t fuk1 : 1;
uint16_t is_super_unique : 1;
uint16_t is_champion : 1;
uint16_t is_unique : 1;
uint16_t fuk2 : 13;
};
};
uint8_t uk1[0x0E]; //+18
uint16_t super_unique_id; //+26
void* unknow1; //+28
uint8_t uk2[0x38]; //+28
};
}
}

View File

@@ -0,0 +1,31 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct game;
struct net_client {
uint32_t client_id; //+00
uint8_t uk1[0x06]; //+04
union { //+0A
uint16_t flag;
struct {
uint16_t f1 : 1;
uint16_t f2 : 1;
uint16_t is_hard_core_game : 1;
};
};
uint8_t uk2; //+0C
char name[0x10]; //+0D
uint8_t uk3[0x15F]; //+1D
uint8_t* savefile; //+17C
uint32_t final_size; //+180
uint32_t counter; //+184
uint32_t current_size; //+188
uint8_t uk4[0x1C]; //+18C
game* game; //+1A8
};
}
}

View File

@@ -0,0 +1,55 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct inventory;
struct npc_gamble //sizeof 0xC
{
inventory* pInventory; //+00
uint32_t dwGUID; //+04 npc_gamble* pNext; //+08
};
struct npc_record //sizeof 0x44
{
int nNPC; //+00
inventory* pInventory; //+04
npc_gamble* pGamble; //+08
bool bGambleInit; //+0C
uint32_t* pMercData; //+10 //D2MercDataStrc*
uint32_t* pEvent; //+14 //D2NPCEventStrc*
uint32_t* pVendorChain; //+18 //D2VendorChainStrc*
bool bTrading; //+1C
union
{
struct
{
union
{
bool bFlags[8]; //+20
struct
{
bool bVendorInit; //+20
bool bHireInit; //+21
uint8_t nAct; //+22
bool bTrader; //+23
bool bLevelRefresh; //+24
bool bInited; //+25
bool bForceVendor; //+26
bool bRefreshInventory; //+27
};
};
uint32_t dwTicks; //+28
uint32_t pProxy[4]; //+2C //D2UnitProxyStrc
uint32_t dwUnk; //+3C
uint32_t dwNPCGUID; //+40
};
uint32_t pTrade; //+20 //D2NPCTradeStrc
};
};
}
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct objects_bin;
struct object_data {
objects_bin* pt_objects_bin;
uint8_t level_id;
};
}
}

View File

@@ -0,0 +1,23 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct room;
struct path //(8 dword)
{ //Offset from Code. Size: 20
uint16_t uk1; //+00
uint16_t mapx; //+02
uint16_t uk2; //+04
uint16_t mapy; //+06
uint32_t uk3; //+08
uint32_t x; //+0C
uint32_t y; //+10
uint32_t uk6; //+14
uint32_t uk7; //+18
room* pt_room; //+1C
};
}
}

View File

@@ -0,0 +1,24 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct net_client;
struct player_data {
char name[0x10]; //+00 Player Name
void* pt_quest[3]; //+10 Quest Pointers for each difficulty
uint8_t uk1[0x18]; //+1C //before : 0x14
void* pt_arena_unit; //+34 ptArena for the Unit
uint8_t uk2[0x4]; //+38 //before : 0x7
uint16_t mp_source_portal_unique_id; //+3C Source Portal Unique_ID
uint8_t uk3[0x2]; //+3E
uint16_t mp_dest_portal_unique_id; //+40 Destination Portal Unique_ID
uint8_t uk4[0x06]; //+42
uint8_t pt_object_un_id; //+48 Object UniqueID for TownPortals
uint8_t uk5[0x53]; //+49
net_client* net_client; //+9C ptClient
};
}
}

View File

@@ -0,0 +1,29 @@
#pragma once
#include <cstdint>
namespace diablo2 {
namespace structures {
struct unit;
struct room//size=0x80
{
//ptRoom +48 0 = spawn new units (monster, objects e.tc), 1 = don't spawn any new units
uint32_t seed1; //+00
uint32_t seed2; //+04
uint8_t uk8[0x1C]; //+08
room* pt_near_rooms; //+24
uint32_t nb_near_rooms; //+28
unit* unit; //+2C
uint8_t uk5[0x44]; //+30
room* pt_next_room; //+74
union {
uint8_t flags; //+78
struct {
uint8_t is_generated : 1;
uint8_t is_generated2 : 1;//???
};
};
};
}
}

View File

@@ -0,0 +1,223 @@
#pragma once
#include <cstdint>
#pragma pack(push, 1)
namespace diablo2 {
namespace structures {
struct skills;
struct game;
struct inventory;
struct stats;
struct path;
struct player_data;
struct item_data;
struct object_data;
struct monster_data;
struct drlg_act;
struct skill_sequence;
struct anim_data;
struct unit_gfxdata;
struct statslistex;
struct quest_record;
struct npc_record;
enum class unit_type_t : int32_t {
UNIT_TYPE_PLAYER = 0,
UNIT_TYPE_MONSTER = 1,
UNIT_TYPE_OBJECT = 2,
UNIT_TYPE_MISSILE = 3,
UNIT_TYPE_ITEM = 4,
UNIT_TYPE_VIS_TILE = 5 //unused?
};
enum player_class_t : int32_t {
PLAYER_CLASS_AMAZON = 0,
PLAYER_CLASS_SORCERESS = 1,
PLAYER_CLASS_NECROMANCER = 2,
PLAYER_CLASS_PALADIN = 3,
PLAYER_CLASS_BARBARIAN = 4,
PLAYER_CLASS_DRUID = 5,
PLAYER_CLASS_ASSASSIN = 6
};
enum itemflags_t : int32_t {
ITEMFLAG_NEWITEM = 0x00000001,
ITEMFLAG_TARGET = 0x00000002,
ITEMFLAG_TARGETING = 0x00000004,
ITEMFLAG_DELETED = 0x00000008,
ITEMFLAG_IDENTIFIED = 0x00000010,
ITEMFLAG_QUANTITY = 0x00000020,
ITEMFLAG_WEAPONSET_IN = 0x00000040,
ITEMFLAG_WEAPONSET_OUT = 0x00000080,
ITEMFLAG_BROKEN = 0x00000100,
ITEMFLAG_REPAIRED = 0x00000200,
ITEMFLAG_UNKNOWN2 = 0x00000400,
ITEMFLAG_SOCKETED = 0x00000800,
ITEMFLAG_NON_SELLABLE = 0x00001000,
ITEMFLAG_INSTORE = 0x00002000,
ITEMFLAG_NOEQUIP = 0x00004000,
ITEMFLAG_NAMED = 0x00008000,
ITEMFLAG_ORGAN = 0x00010000,
ITEMFLAG_SELLCHEAP = 0x00020000,
ITEMFLAG_UNK5 = 0x00040000,
ITEMFLAG_INIT = 0x00080000,
ITEMFLAG_UNK6 = 0x00100000,
ITEMFLAG_COMPACTSAVE = 0x00200000,
ITEMFLAG_ETHEREAL = 0x00400000,
ITEMFLAG_JUSTSAVED = 0x00800000,
ITEMFLAG_PERSONALIZED = 0x01000000,
ITEMFLAG_LOWQUALITY = 0x02000000,
ITEMFLAG_RUNEWORD = 0x04000000,
ITEMFLAG_SHOPITEM = 0x06000000,
ITEMFLAG_ITEM = 0x08000000
};
struct unit {
unit_type_t type;
union {
player_class_t player_class;
int32_t data_record_index;
};
void* memory_pool;
uint32_t guid;
uint32_t mode;
union {
player_data* player_data;
monster_data* monster_data;
object_data* object_data;
//missile_data* missile_data;
item_data* item_data;
};
int8_t act;
int8_t act_padding[0x03];
drlg_act* drlg_act;
struct {
uint32_t low_seed;
uint32_t high_seed;
} seed;
uint32_t init_seed;
path* path;
skill_sequence* skill_sequence;
uint32_t skill_sequence_frame_count;
uint32_t skill_sequence_frame;
uint32_t anim_speed;
uint32_t skill_sequence_mode;
uint32_t current_frame;
uint32_t frame_count;
uint16_t anim_speed_w;
uint8_t action_frame;
uint8_t pad1;
anim_data* anim_data;
unit_gfxdata* gfxdata;
unit_gfxdata* gfxdata_copy;
statslistex* statslistex;
inventory* inventory;
union {
struct {
uint32_t interact_guid;
uint32_t interact_type;
uint8_t interacting;
} interaction;
struct {
void* light_map;
uint32_t start_light_radius;
uint16_t p12_shift_index;
} lightning;
};
uint16_t update_type;
unit* update_unit;
quest_record* quest_record;
uint32_t sparky_chest;
void* timer_args;
union {
game* game;
uint32_t sound_sync;
};
char pad2[0x0C];
void* event;
unit_type_t owner_type;
uint32_t owner_guid;
char pad3[8];
char* hover_text;
void* skills;
void* combat;
uint32_t hit_class;
char pad4[4];
uint32_t drop_code;
char pad5[8];
union {
struct {
uint32_t unit_flags;
uint32_t unit_flags_ex;
} flags;
uint64_t flags64;
};
char pad6[4];
uint32_t node_index;
uint32_t get_tick_count;
union {
uint32_t get_tick_count2;
void* particle_stream;
};
void* timer;
unit* change_next_unit; //?
unit* prev_unit;
unit* prev_unit_in_room;
void* msg_first;
void* msg_last;
bool is_hireling() const {
if (type != unit_type_t::UNIT_TYPE_MONSTER)
return false;
return (flags.unit_flags & 0x00000200) == 0x00000200;
}
bool is_pet() const {
if (type != unit_type_t::UNIT_TYPE_MONSTER)
return false;
return (flags.unit_flags & 0x80000000) == 0x80000000;
}
};
}
}
#pragma pack(pop)