From 709d1963d726beafd70f51a51c8f9798622c03e5 Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Sun, 2 Aug 2020 17:48:46 +0100 Subject: [PATCH] Fixed stat calculation. Started adding some item identifiers --- d2stat.c | 22 ++++++++-------------- d2stat.h | 1 + d2strings.h | 642 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ docs/d2s_save_item_format_1.13d.txt | 4 ++-- docs/design | 11 +++++++++++ 5 files changed, 664 insertions(+), 16 deletions(-) diff --git a/d2stat.c b/d2stat.c index 411521f..114d28c 100644 --- a/d2stat.c +++ b/d2stat.c @@ -3,26 +3,23 @@ #include #include +#define readBits(data, start, size) ((*((uint64_t*) &data[(start) / 8]) >> ((start) & 7)) & ((1 << (size)) - 1)) + // Internal function, gives the offset ***IN BITS, NOT BYTES*** of the specified stat unsigned long long int _searchStat(D2S_STAT stat, void* charData, size_t dataLen) { if(!strncmp(charData, D2S_STAT_HEADER, D2S_STAT_HEADER_LENGTH)) { fprintf(stderr,"libd2char error: Stat header not present in charData\n"); return 0; } - unsigned long long int byteOffset = D2S_STAT_HEADER_LENGTH; - unsigned long long int bitOffset = 0; - while(byteOffset < dataLen) { - uint16_t statID = 0; - memcpy(&statID, charData + byteOffset, sizeof(statID)); - statID >>= bitOffset; - statID &= 0x1FF; + unsigned long long int offset = D2S_STAT_HEADER_LENGTH * 8; + while(offset < (dataLen * 8)) { + uint64_t statID = readBits(charData, offset, D2S_STAT_IDENTIFIER_BIT_LENGTH); if(statID == D2S_STAT_FOOTER) { break; } else if(statID == stat) { - return (byteOffset * 8) + bitOffset; + return offset + D2S_STAT_IDENTIFIER_BIT_LENGTH; } - byteOffset += statCost[statID] / 8; - bitOffset += statCost[statID] % 8; + offset += D2S_STAT_IDENTIFIER_BIT_LENGTH + statCost[statID]; } return 0; } @@ -33,10 +30,7 @@ int getStat(D2S_STAT stat, unsigned int* value, void* charData, size_t dataLen) fprintf(stderr,"libd2char error: Unable to find attribute: %d\n", stat); return -1; } - uint64_t statValue = 0; - memcpy(&statValue, charData + (statOffset / 8), sizeof(statValue)); - statValue >>= (statOffset % 8); - statValue &= statCostMask[stat]; + uint64_t statValue = readBits(charData, statOffset, statCost[stat]); *value = (unsigned int)statValue; return 0; } diff --git a/d2stat.h b/d2stat.h index da75b6f..80dc3e1 100644 --- a/d2stat.h +++ b/d2stat.h @@ -7,6 +7,7 @@ #define D2S_STAT_HEADER "gf" #define D2S_STAT_HEADER_LENGTH 2 #define D2S_STAT_FOOTER 0x1FF +#define D2S_STAT_IDENTIFIER_BIT_LENGTH 9 typedef enum D2S_STAT { D2S_STAT_STRENGTH = 0x00, diff --git a/d2strings.h b/d2strings.h index 99be047..0e66142 100644 --- a/d2strings.h +++ b/d2strings.h @@ -1045,4 +1045,646 @@ const char* D2S_CHARPROGRESS_EXPANSION_TIER3_NAME_HARDCORE = "Guardian"; #define D2S_WAYPOINT_37 "The Ancient's Way" #define D2S_WAYPOINT_38 "Worldstone Keep Level 2" +// Item identifiers +#define D2S_ITEMDATA_IDENTIFIER_CAP "cap " +#define D2S_ITEMDATA_IDENTIFIER_WAR_HAT "xap " +#define D2S_ITEMDATA_IDENTIFIER_SHAKO "uap " +#define D2S_ITEMDATA_IDENTIFIER_SKULL_CAP "skp " +#define D2S_ITEMDATA_IDENTIFIER_SALLET "xkp " +#define D2S_ITEMDATA_IDENTIFIER_HYDRASKULL "ukp " +#define D2S_ITEMDATA_IDENTIFIER_HELM "hlm " +#define D2S_ITEMDATA_IDENTIFIER_CASQUE "xlm " +#define D2S_ITEMDATA_IDENTIFIER_ARMET "ulm " +#define D2S_ITEMDATA_IDENTIFIER_FULL_HELM "fhl " +#define D2S_ITEMDATA_IDENTIFIER_BASINET "xhl " +#define D2S_ITEMDATA_IDENTIFIER_GIANT_CONCH "uhl " +#define D2S_ITEMDATA_IDENTIFIER_GREAT_HELM "ghm " +#define D2S_ITEMDATA_IDENTIFIER_WINGED_HELM "xhm " +#define D2S_ITEMDATA_IDENTIFIER_SPIRED_HELM "uhm " +#define D2S_ITEMDATA_IDENTIFIER_CROWN "crn " +#define D2S_ITEMDATA_IDENTIFIER_GRAND_CROWN "xrn " +#define D2S_ITEMDATA_IDENTIFIER_CORONA "urn " +#define D2S_ITEMDATA_IDENTIFIER_MASK "msk " +#define D2S_ITEMDATA_IDENTIFIER_DEATH_MASK "xsk " +#define D2S_ITEMDATA_IDENTIFIER_DEMONHEAD "usk " +#define D2S_ITEMDATA_IDENTIFIER_BONE_HELM "bhm " +#define D2S_ITEMDATA_IDENTIFIER_GRIM_HELM "xh9 " +#define D2S_ITEMDATA_IDENTIFIER_BONE_VISAGE "uh9 " +#define D2S_ITEMDATA_IDENTIFIER_QUILTED_ARMOR "qui " +#define D2S_ITEMDATA_IDENTIFIER_GHOST_ARMOR "xui " +#define D2S_ITEMDATA_IDENTIFIER_DUSK_SHROUD "uui " +#define D2S_ITEMDATA_IDENTIFIER_LEATHER_ARMOR "lea " +#define D2S_ITEMDATA_IDENTIFIER_SERPENTSKIN "xea " +#define D2S_ITEMDATA_IDENTIFIER_WYRMHIDE "uea " +#define D2S_ITEMDATA_IDENTIFIER_HARD_LEATHER "hla " +#define D2S_ITEMDATA_IDENTIFIER_DEMONHIDE_ARMOR "xla " +#define D2S_ITEMDATA_IDENTIFIER_SCARAB_HUSK "ula " +#define D2S_ITEMDATA_IDENTIFIER_STUDDED_LEATHER "stu " +#define D2S_ITEMDATA_IDENTIFIER_TRELLISED_ARMOR "xtu " +#define D2S_ITEMDATA_IDENTIFIER_WIRE_FLEECE "utu " +#define D2S_ITEMDATA_IDENTIFIER_RING_MAIL "rng " +#define D2S_ITEMDATA_IDENTIFIER_LINKED_MAIL "xng " +#define D2S_ITEMDATA_IDENTIFIER_DIAMOND_MAIL "ung " +#define D2S_ITEMDATA_IDENTIFIER_SCALE_MAIL "scl " +#define D2S_ITEMDATA_IDENTIFIER_TIGULATED_MAIL "xcl " +#define D2S_ITEMDATA_IDENTIFIER_LORICATED_MAIL "ucl " +#define D2S_ITEMDATA_IDENTIFIER_CHAIN_MAIL "chn " +#define D2S_ITEMDATA_IDENTIFIER_MESH_ARMOR "xhn " +#define D2S_ITEMDATA_IDENTIFIER_BONEWEAVE "uhn " +#define D2S_ITEMDATA_IDENTIFIER_BREAST_PLATE "brs " +#define D2S_ITEMDATA_IDENTIFIER_CUIRASS "xrs " +#define D2S_ITEMDATA_IDENTIFIER_GREAT_HAUBERK "urs " +#define D2S_ITEMDATA_IDENTIFIER_SPLINT_MAIL "spl " +#define D2S_ITEMDATA_IDENTIFIER_RUSSET_ARMOR "xpl " +#define D2S_ITEMDATA_IDENTIFIER_BALROG_SKIN "upl " +#define D2S_ITEMDATA_IDENTIFIER_PLATE_MAIL "plt " +#define D2S_ITEMDATA_IDENTIFIER_TEMPLAR_COAT "xlt " +#define D2S_ITEMDATA_IDENTIFIER_HELLFORGE_PLATE "ult " +#define D2S_ITEMDATA_IDENTIFIER_FIELD_PLATE "fld " +#define D2S_ITEMDATA_IDENTIFIER_SHARKTOOTH "xld " +#define D2S_ITEMDATA_IDENTIFIER_KRAKEN_SHELL "uld " +#define D2S_ITEMDATA_IDENTIFIER_GOTHIC_PLATE "gth " +#define D2S_ITEMDATA_IDENTIFIER_EMBOSSED_PLATE "xth " +#define D2S_ITEMDATA_IDENTIFIER_LACQUERED_PLATE "uth " +#define D2S_ITEMDATA_IDENTIFIER_FULL_PLATE_MAIL "ful " +#define D2S_ITEMDATA_IDENTIFIER_CHAOS_ARMOR "xul " +#define D2S_ITEMDATA_IDENTIFIER_SHADOW_PLATE "uul " +#define D2S_ITEMDATA_IDENTIFIER_ANCIENT_ARMOR "aar " +#define D2S_ITEMDATA_IDENTIFIER_ORNATE_ARMOR "xar " +#define D2S_ITEMDATA_IDENTIFIER_SACRED_ARMOR "uar " +#define D2S_ITEMDATA_IDENTIFIER_LIGHT_PLATE "ltp " +#define D2S_ITEMDATA_IDENTIFIER_MAGE_PLATE "xtp " +#define D2S_ITEMDATA_IDENTIFIER_ARCHON_PLATE "utp " +#define D2S_ITEMDATA_IDENTIFIER_BUCKLER "buc " +#define D2S_ITEMDATA_IDENTIFIER_DEFENDER "xuc " +#define D2S_ITEMDATA_IDENTIFIER_HEATER "uuc " +#define D2S_ITEMDATA_IDENTIFIER_SMALL_SHIELD "sml " +#define D2S_ITEMDATA_IDENTIFIER_ROUND_SHIELD "xml " +#define D2S_ITEMDATA_IDENTIFIER_LUNA "uml " +#define D2S_ITEMDATA_IDENTIFIER_LARGE_SHIELD "lrg " +#define D2S_ITEMDATA_IDENTIFIER_SCUTUM "xrg " +#define D2S_ITEMDATA_IDENTIFIER_HYPERION "urg " +#define D2S_ITEMDATA_IDENTIFIER_KITE_SHIELD "kit " +#define D2S_ITEMDATA_IDENTIFIER_DRAGON_SHIELD "xit " +#define D2S_ITEMDATA_IDENTIFIER_MONARCH "uit " +#define D2S_ITEMDATA_IDENTIFIER_TOWER_SHIELD "tow " +#define D2S_ITEMDATA_IDENTIFIER_PAVISE "xow " +#define D2S_ITEMDATA_IDENTIFIER_AEGIS "uow " +#define D2S_ITEMDATA_IDENTIFIER_GOTHIC_SHIELD "gts " +#define D2S_ITEMDATA_IDENTIFIER_ANCIENT_SHIELD "xts " +#define D2S_ITEMDATA_IDENTIFIER_WARD "uts " +#define D2S_ITEMDATA_IDENTIFIER_BONE_SHIELD "bsh " +#define D2S_ITEMDATA_IDENTIFIER_GRIM_SHIELD "xsh " +#define D2S_ITEMDATA_IDENTIFIER_TROLL_NEST "ush " +#define D2S_ITEMDATA_IDENTIFIER_SPIKED_SHIELD "spk " +#define D2S_ITEMDATA_IDENTIFIER_BARBED_SHIELD "xpk " +#define D2S_ITEMDATA_IDENTIFIER_BLADE_BARRIER "upk " +#define D2S_ITEMDATA_IDENTIFIER_LEATHER_GLOVES "lgl " +#define D2S_ITEMDATA_IDENTIFIER_DEMONHIDE_GLOVE "xlg " +#define D2S_ITEMDATA_IDENTIFIER_BRAMBLE_MITTS "ulg " +#define D2S_ITEMDATA_IDENTIFIER_HEAVY_GLOVES "vgl " +#define D2S_ITEMDATA_IDENTIFIER_SHARKSKIN_GLOVE "xvg " +#define D2S_ITEMDATA_IDENTIFIER_VAMPIREBONE_GLOVES "uvg " +#define D2S_ITEMDATA_IDENTIFIER_CHAIN_GLOVES "mgl " +#define D2S_ITEMDATA_IDENTIFIER_HEAVY_BRACERS "xmg " +#define D2S_ITEMDATA_IDENTIFIER_VAMBRACES "umg " +#define D2S_ITEMDATA_IDENTIFIER_LIGHT_GAUNTLETS "tgl " +#define D2S_ITEMDATA_IDENTIFIER_BATTLE_GAUNTLET "xtg " +#define D2S_ITEMDATA_IDENTIFIER_CRUSADER_GAUNTLETS "utg " +#define D2S_ITEMDATA_IDENTIFIER_GAUNTLETS "hgl " +#define D2S_ITEMDATA_IDENTIFIER_WAR_GAUNTLETS "xhg " +#define D2S_ITEMDATA_IDENTIFIER_OGRE_GAUNTLETS "uhg " +#define D2S_ITEMDATA_IDENTIFIER_BOOTS "lbt " +#define D2S_ITEMDATA_IDENTIFIER_DEMONHIDE_BOOTS "xlb " +#define D2S_ITEMDATA_IDENTIFIER_WYRMHIDE_BOOTS "ulb " +#define D2S_ITEMDATA_IDENTIFIER_HEAVY_BOOTS "vbt " +#define D2S_ITEMDATA_IDENTIFIER_SHARKSKIN_BOOTS "xvb " +#define D2S_ITEMDATA_IDENTIFIER_SCARABSHELL_BOOTS "uvb " +#define D2S_ITEMDATA_IDENTIFIER_CHAIN_BOOTS "mbt " +#define D2S_ITEMDATA_IDENTIFIER_MESH_BOOTS "xmb " +#define D2S_ITEMDATA_IDENTIFIER_BONEWEAVE_BOOTS "umb " +#define D2S_ITEMDATA_IDENTIFIER_LIGHT_PLATE "tbt " +#define D2S_ITEMDATA_IDENTIFIER_BATTLE_BOOTS "xtb " +#define D2S_ITEMDATA_IDENTIFIER_MIRRORED_BOOTS "utb " +#define D2S_ITEMDATA_IDENTIFIER_GREAVES "hbt " +#define D2S_ITEMDATA_IDENTIFIER_WAR_BOOTS "xhb " +#define D2S_ITEMDATA_IDENTIFIER_MYRMIDON_GREAVE "uhb " +#define D2S_ITEMDATA_IDENTIFIER_SASH "lbl " +#define D2S_ITEMDATA_IDENTIFIER_DEMONHIDE_SASH "zlb " +#define D2S_ITEMDATA_IDENTIFIER_SPIDERWEB_SASH "ulc " +#define D2S_ITEMDATA_IDENTIFIER_LIGHT_BELT "vbl " +#define D2S_ITEMDATA_IDENTIFIER_SHARKSKIN_BELT "zvb " +#define D2S_ITEMDATA_IDENTIFIER_VAMPIREFANG_BELT "uvc " +#define D2S_ITEMDATA_IDENTIFIER_BELT "mbl " +#define D2S_ITEMDATA_IDENTIFIER_MESH_BELT "zmb " +#define D2S_ITEMDATA_IDENTIFIER_MITHRIL_COIL "umc " +#define D2S_ITEMDATA_IDENTIFIER_HEAVY_BELT "tbl " +#define D2S_ITEMDATA_IDENTIFIER_BATTLE_BELT "ztb " +#define D2S_ITEMDATA_IDENTIFIER_TROLL_BELT "utc " +#define D2S_ITEMDATA_IDENTIFIER_PLATED_BELT "hbl " +#define D2S_ITEMDATA_IDENTIFIER_WAR_BELT "zhb " +#define D2S_ITEMDATA_IDENTIFIER_COLOSSUS_GIRDLE "uhc " +#define D2S_ITEMDATA_IDENTIFIER_WOLF_HEAD "dr1 " +#define D2S_ITEMDATA_IDENTIFIER_ALPHA_HELM "dr6 " +#define D2S_ITEMDATA_IDENTIFIER_BLOOD_SPIRIT "drb " +#define D2S_ITEMDATA_IDENTIFIER_HAWK_HELM "dr2 " +#define D2S_ITEMDATA_IDENTIFIER_GRIFFON_HEADDRESS "dr7 " +#define D2S_ITEMDATA_IDENTIFIER_SUN_SPIRIT "drc " +#define D2S_ITEMDATA_IDENTIFIER_ANTLERS "dr3 " +#define D2S_ITEMDATA_IDENTIFIER_HUNTERS_GUISE "dr8 " +#define D2S_ITEMDATA_IDENTIFIER_EARTH_SPIRIT "drd " +#define D2S_ITEMDATA_IDENTIFIER_FALCON_MASK "dr4 " +#define D2S_ITEMDATA_IDENTIFIER_SACRED_FEATHERS "dr9 " +#define D2S_ITEMDATA_IDENTIFIER_SKY_SPIRIT "dre " +#define D2S_ITEMDATA_IDENTIFIER_SPIRIT_MASK "dr5 " +#define D2S_ITEMDATA_IDENTIFIER_TOTEMIC_MASK "dra " +#define D2S_ITEMDATA_IDENTIFIER_DREAM_SPIRIT "drf " +#define D2S_ITEMDATA_IDENTIFIER_JAWBONE_CAP "ba1 " +#define D2S_ITEMDATA_IDENTIFIER_JAWBONE_VISOR "ba6 " +#define D2S_ITEMDATA_IDENTIFIER_CARNAGE_HELM "bab " +#define D2S_ITEMDATA_IDENTIFIER_FANGED_HELM "ba2 " +#define D2S_ITEMDATA_IDENTIFIER_LION_HELM "ba7 " +#define D2S_ITEMDATA_IDENTIFIER_FURY_VISOR "bac " +#define D2S_ITEMDATA_IDENTIFIER_HORNED_HELM "ba3 " +#define D2S_ITEMDATA_IDENTIFIER_RAGE_MASK "ba8 " +#define D2S_ITEMDATA_IDENTIFIER_DESTROYER_HELM "bad " +#define D2S_ITEMDATA_IDENTIFIER_ASSUALT_HELMET "ba4 " +#define D2S_ITEMDATA_IDENTIFIER_SAVAGE_HELMET "ba9 " +#define D2S_ITEMDATA_IDENTIFIER_CONQUEROR_CROWN "bae " +#define D2S_ITEMDATA_IDENTIFIER_AVENGER_GUARD "ba5 " +#define D2S_ITEMDATA_IDENTIFIER_SLAYER_GUARD "baa " +#define D2S_ITEMDATA_IDENTIFIER_GUARDIAN_CROWN "baf " +#define D2S_ITEMDATA_IDENTIFIER_TARGE "pa1 " +#define D2S_ITEMDATA_IDENTIFIER_AKARAN_TARGE "pa6 " +#define D2S_ITEMDATA_IDENTIFIER_SACRED_TARGE "pab " +#define D2S_ITEMDATA_IDENTIFIER_RONDACHE "pa2 " +#define D2S_ITEMDATA_IDENTIFIER_AKARAN_RONDACHE "pa7 " +#define D2S_ITEMDATA_IDENTIFIER_SACRED_RONDACHE "pac " +#define D2S_ITEMDATA_IDENTIFIER_HERALDIC_SHIELD "pa3 " +#define D2S_ITEMDATA_IDENTIFIER_PROTECTOR_SHLD "pa8 " +#define D2S_ITEMDATA_IDENTIFIER_KURAST_SHIELD "pad " +#define D2S_ITEMDATA_IDENTIFIER_AERIN_SHIELD "pa4 " +#define D2S_ITEMDATA_IDENTIFIER_GUILDED_SHIELD "pa9 " +#define D2S_ITEMDATA_IDENTIFIER_ZAKARUM_SHIELD "pae " +#define D2S_ITEMDATA_IDENTIFIER_CROWN_SHIELD "pa5 " +#define D2S_ITEMDATA_IDENTIFIER_ROYAL_SHIELD "paa " +#define D2S_ITEMDATA_IDENTIFIER_VORTEX_SHIELD "paf " +#define D2S_ITEMDATA_IDENTIFIER_PRESERVED_HEAD "ne1 " +#define D2S_ITEMDATA_IDENTIFIER_MUMMIFIED_TRPHY "ne6 " +#define D2S_ITEMDATA_IDENTIFIER_MINION_SKULL "neb " +#define D2S_ITEMDATA_IDENTIFIER_ZOMBIE_HEAD "ne2 " +#define D2S_ITEMDATA_IDENTIFIER_FETISH_TROPHY "ne7 " +#define D2S_ITEMDATA_IDENTIFIER_HELLSPAWN_SKULL "nec " +#define D2S_ITEMDATA_IDENTIFIER_UNRAVELLER_HEAD "ne3 " +#define D2S_ITEMDATA_IDENTIFIER_SEXTON_TROPHY "ne8 " +#define D2S_ITEMDATA_IDENTIFIER_OVERSEER_SKULL "ned " +#define D2S_ITEMDATA_IDENTIFIER_GARGOYLE_HEAD "ne4 " +#define D2S_ITEMDATA_IDENTIFIER_CANTOR_TROPHY "ne9 " +#define D2S_ITEMDATA_IDENTIFIER_SUCCUBUS_SKULL "nee " +#define D2S_ITEMDATA_IDENTIFIER_DEMON_HEAD "ne5 " +#define D2S_ITEMDATA_IDENTIFIER_HEIROPHANT_TRPHY "nea " +#define D2S_ITEMDATA_IDENTIFIER_BLOODLORD_SKULL "nef " +#define D2S_ITEMDATA_IDENTIFIER_HAND_AXE "hax " +#define D2S_ITEMDATA_IDENTIFIER_HATCHET "9ha " +#define D2S_ITEMDATA_IDENTIFIER_TOMAHAWK "7ha " +#define D2S_ITEMDATA_IDENTIFIER_AXE "axe " +#define D2S_ITEMDATA_IDENTIFIER_CLEAVER "9ax " +#define D2S_ITEMDATA_IDENTIFIER_SMALL_CRESCENT "7ax " +#define D2S_ITEMDATA_IDENTIFIER_DOUBLE_AXE "2ax " +#define D2S_ITEMDATA_IDENTIFIER_TWIN_AXE "92a " +#define D2S_ITEMDATA_IDENTIFIER_ETTIN_AXE "72a " +#define D2S_ITEMDATA_IDENTIFIER_MILITARY_PICK "mpi " +#define D2S_ITEMDATA_IDENTIFIER_CROWBILL "9mp " +#define D2S_ITEMDATA_IDENTIFIER_WAR_SPIKE "7mp " +#define D2S_ITEMDATA_IDENTIFIER_WAR_AXE "wax " +#define D2S_ITEMDATA_IDENTIFIER_NAGA "9wa " +#define D2S_ITEMDATA_IDENTIFIER_BERSERKER_AXE "7wa " +#define D2S_ITEMDATA_IDENTIFIER_LARGE_AXE "lax " +#define D2S_ITEMDATA_IDENTIFIER_MILITARY_AXE "9la " +#define D2S_ITEMDATA_IDENTIFIER_FERAL_AXE "7la " +#define D2S_ITEMDATA_IDENTIFIER_BROAD_AXE "bax " +#define D2S_ITEMDATA_IDENTIFIER_BEARDED_AXE "9ba " +#define D2S_ITEMDATA_IDENTIFIER_SILVER_EDGED_AX "7ba " +#define D2S_ITEMDATA_IDENTIFIER_BATTLE_AXE "btx " +#define D2S_ITEMDATA_IDENTIFIER_TABAR "9bt " +#define D2S_ITEMDATA_IDENTIFIER_DECAPITATOR "7bt " +#define D2S_ITEMDATA_IDENTIFIER_GREAT_AXE "gax " +#define D2S_ITEMDATA_IDENTIFIER_GOTHIC_AXE "9ga " +#define D2S_ITEMDATA_IDENTIFIER_CHAMPION_AXE "7ga " +#define D2S_ITEMDATA_IDENTIFIER_GIANT_AXE "gix " +#define D2S_ITEMDATA_IDENTIFIER_ANCIENT_AXE "9gi " +#define D2S_ITEMDATA_IDENTIFIER_GLORIOUS_AXE "7gi " +#define D2S_ITEMDATA_IDENTIFIER_CLUB "clb " +#define D2S_ITEMDATA_IDENTIFIER_CUDGEL "9cl " +#define D2S_ITEMDATA_IDENTIFIER_TRUNCHEON "7cl " +#define D2S_ITEMDATA_IDENTIFIER_SPIKED_CLUB "spc " +#define D2S_ITEMDATA_IDENTIFIER_BARBED_CLUB "9sp " +#define D2S_ITEMDATA_IDENTIFIER_TYRANT_CLUB "7sp " +#define D2S_ITEMDATA_IDENTIFIER_MACE "mac " +#define D2S_ITEMDATA_IDENTIFIER_FLANGED_MACE "9ma " +#define D2S_ITEMDATA_IDENTIFIER_REINFORCED_MACE "7ma " +#define D2S_ITEMDATA_IDENTIFIER_MORNING_STAR "mst " +#define D2S_ITEMDATA_IDENTIFIER_JAGGED_STAR "9mt " +#define D2S_ITEMDATA_IDENTIFIER_DEVIL_STAR "7mf " +#define D2S_ITEMDATA_IDENTIFIER_FLAIL "fla " +#define D2S_ITEMDATA_IDENTIFIER_KNOUT "9fl " +#define D2S_ITEMDATA_IDENTIFIER_SCOURGE "7fl " +#define D2S_ITEMDATA_IDENTIFIER_WAR_HAMMER "whm " +#define D2S_ITEMDATA_IDENTIFIER_BATTLE_HAMMER "9wh " +#define D2S_ITEMDATA_IDENTIFIER_LEGENDARY_MALLET "7wh " +#define D2S_ITEMDATA_IDENTIFIER_MAUL "mau " +#define D2S_ITEMDATA_IDENTIFIER_WAR_CLUB "9m9 " +#define D2S_ITEMDATA_IDENTIFIER_OGRE_MAUL "7m7 " +#define D2S_ITEMDATA_IDENTIFIER_GREAT_MAUL "gma " +#define D2S_ITEMDATA_IDENTIFIER_MARTEL_DE_FER "9gm " +#define D2S_ITEMDATA_IDENTIFIER_THUNDER_MAUL "7gm " +#define D2S_ITEMDATA_IDENTIFIER_SHORT_SWORD "ssd " +#define D2S_ITEMDATA_IDENTIFIER_GLADIUS "9ss " +#define D2S_ITEMDATA_IDENTIFIER_FALCATA "7ss " +#define D2S_ITEMDATA_IDENTIFIER_SCIMITAR "scm " +#define D2S_ITEMDATA_IDENTIFIER_CUTLASS "9sm " +#define D2S_ITEMDATA_IDENTIFIER_ATAGHAN "7sm " +#define D2S_ITEMDATA_IDENTIFIER_SABER "sbr " +#define D2S_ITEMDATA_IDENTIFIER_SHAMSHIR "9sb " +#define D2S_ITEMDATA_IDENTIFIER_ELEGANT_BLADE "7sb " +#define D2S_ITEMDATA_IDENTIFIER_FALCHION "flc " +#define D2S_ITEMDATA_IDENTIFIER_TULWAR "9fc " +#define D2S_ITEMDATA_IDENTIFIER_HYDRA_EDGE "7fc " +#define D2S_ITEMDATA_IDENTIFIER_CRYSTAL_SWORD "crs " +#define D2S_ITEMDATA_IDENTIFIER_DIMENSIONAL_BLADE "9cr " +#define D2S_ITEMDATA_IDENTIFIER_PHASE_BLADE "7cr " +#define D2S_ITEMDATA_IDENTIFIER_BROAD_SWORD "bsd " +#define D2S_ITEMDATA_IDENTIFIER_BATTLE_SWORD "9bs " +#define D2S_ITEMDATA_IDENTIFIER_CONQUEST_SWORD "7bs " +#define D2S_ITEMDATA_IDENTIFIER_LONG_SWORD "lsd " +#define D2S_ITEMDATA_IDENTIFIER_RUNE_SWORD "9ls " +#define D2S_ITEMDATA_IDENTIFIER_CRYPTIC_SWORD "7ls " +#define D2S_ITEMDATA_IDENTIFIER_WAR_SWORD "wsd " +#define D2S_ITEMDATA_IDENTIFIER_ANCIENT_SWORD "9wd " +#define D2S_ITEMDATA_IDENTIFIER_MYTHICAL_SWORD "7wd " +#define D2S_ITEMDATA_IDENTIFIER_TWOHANDED_SWORD "2hs " +#define D2S_ITEMDATA_IDENTIFIER_ESPADON "92h " +#define D2S_ITEMDATA_IDENTIFIER_LEGEND_SWORD "72h " +#define D2S_ITEMDATA_IDENTIFIER_CLAYMORE "clm " +#define D2S_ITEMDATA_IDENTIFIER_DACIAN_FALX "9cm " +#define D2S_ITEMDATA_IDENTIFIER_HIGHLAND_BLADE "7cm " +#define D2S_ITEMDATA_IDENTIFIER_GIANT_SWORD "gis " +#define D2S_ITEMDATA_IDENTIFIER_TUSK_SWORD "9gs " +#define D2S_ITEMDATA_IDENTIFIER_BALROG_BLADE "7gs " +#define D2S_ITEMDATA_IDENTIFIER_BASTARD_SWORD "bsw " +#define D2S_ITEMDATA_IDENTIFIER_GOTHIC_SWORD "9b9 " +#define D2S_ITEMDATA_IDENTIFIER_CHAMPION_SWORD "7b7 " +#define D2S_ITEMDATA_IDENTIFIER_FLAMBERGE "flb " +#define D2S_ITEMDATA_IDENTIFIER_ZWEIHANDER "9fb " +#define D2S_ITEMDATA_IDENTIFIER_COLOSSAL_SWORD "7fb " +#define D2S_ITEMDATA_IDENTIFIER_GREAT_SWORD "gsd " +#define D2S_ITEMDATA_IDENTIFIER_EXECUTIONER_SWORD "9gd " +#define D2S_ITEMDATA_IDENTIFIER_COLOSSUS_BLADE "7gd " +#define D2S_ITEMDATA_IDENTIFIER_DAGGER "dgr " +#define D2S_ITEMDATA_IDENTIFIER_POIGNARD "9dg " +#define D2S_ITEMDATA_IDENTIFIER_BONE_KNIFE "7dg " +#define D2S_ITEMDATA_IDENTIFIER_DIRK "dir " +#define D2S_ITEMDATA_IDENTIFIER_RONDEL "9di " +#define D2S_ITEMDATA_IDENTIFIER_MITHRAL_POINT "7di " +#define D2S_ITEMDATA_IDENTIFIER_KRISS "kri " +#define D2S_ITEMDATA_IDENTIFIER_CINQUEDEAS "9kr " +#define D2S_ITEMDATA_IDENTIFIER_FANGED_KNIFE "7kr " +#define D2S_ITEMDATA_IDENTIFIER_BLADE "bld " +#define D2S_ITEMDATA_IDENTIFIER_STILLETO "9bl " +#define D2S_ITEMDATA_IDENTIFIER_LEGEND_SPIKE "7bl " +#define D2S_ITEMDATA_IDENTIFIER_THROWING_KNIFE "tkf " +#define D2S_ITEMDATA_IDENTIFIER_BATTLE_DART "9tk " +#define D2S_ITEMDATA_IDENTIFIER_FLYING_KNIFE "7tk " +#define D2S_ITEMDATA_IDENTIFIER_THROWING_AXE "tax " +#define D2S_ITEMDATA_IDENTIFIER_FRANCISCA "9ta " +#define D2S_ITEMDATA_IDENTIFIER_FLYING_AXE "7ta " +#define D2S_ITEMDATA_IDENTIFIER_BALANCED_KNIFE "bkf " +#define D2S_ITEMDATA_IDENTIFIER_WAR_DART "9bk " +#define D2S_ITEMDATA_IDENTIFIER_WINGED_KNIFE "7bk " +#define D2S_ITEMDATA_IDENTIFIER_BALANCED_AXE "bal " +#define D2S_ITEMDATA_IDENTIFIER_HURLBAT "9b8 " +#define D2S_ITEMDATA_IDENTIFIER_WINGED_AXE "7b8 " +#define D2S_ITEMDATA_IDENTIFIER_JAVELIN "jav " +#define D2S_ITEMDATA_IDENTIFIER_WAR_JAVELIN "9ja " +#define D2S_ITEMDATA_IDENTIFIER_HYPERION_JAVELIN "7ja " +#define D2S_ITEMDATA_IDENTIFIER_PILUM "pil " +#define D2S_ITEMDATA_IDENTIFIER_GREAT_PILUM "9pi " +#define D2S_ITEMDATA_IDENTIFIER_STYGIAN_PILUM "7pi " +#define D2S_ITEMDATA_IDENTIFIER_SHORT_SPEAR "ssp " +#define D2S_ITEMDATA_IDENTIFIER_SIMBILAN "9s9 " +#define D2S_ITEMDATA_IDENTIFIER_BALROG_SPEAR "7s7 " +#define D2S_ITEMDATA_IDENTIFIER_GLAIVE "glv " +#define D2S_ITEMDATA_IDENTIFIER_SPICULUM "9gl " +#define D2S_ITEMDATA_IDENTIFIER_GHOST_GLAIVE "7gl " +#define D2S_ITEMDATA_IDENTIFIER_THROWING_SPEAR "tsp " +#define D2S_ITEMDATA_IDENTIFIER_HARPOON "9ts " +#define D2S_ITEMDATA_IDENTIFIER_WINGED_HARPOON "7ts " +#define D2S_ITEMDATA_IDENTIFIER_SPEAR "spr " +#define D2S_ITEMDATA_IDENTIFIER_WAR_SPEAR "9sr " +#define D2S_ITEMDATA_IDENTIFIER_HYPERION_SPEAR "7sr " +#define D2S_ITEMDATA_IDENTIFIER_TRIDENT "tri " +#define D2S_ITEMDATA_IDENTIFIER_FUSCINA "9tr " +#define D2S_ITEMDATA_IDENTIFIER_STYGIAN_PIKE "7tr " +#define D2S_ITEMDATA_IDENTIFIER_BRANDISTOCK "brn " +#define D2S_ITEMDATA_IDENTIFIER_WAR_FORK "9br " +#define D2S_ITEMDATA_IDENTIFIER_MANCATCHER "7br " +#define D2S_ITEMDATA_IDENTIFIER_SPETUM "spt " +#define D2S_ITEMDATA_IDENTIFIER_YARI "9st " +#define D2S_ITEMDATA_IDENTIFIER_GHOST_SPEAR "7st " +#define D2S_ITEMDATA_IDENTIFIER_PIKE "pik " +#define D2S_ITEMDATA_IDENTIFIER_LANCE "9p9 " +#define D2S_ITEMDATA_IDENTIFIER_WAR_PIKE "7p7 " +#define D2S_ITEMDATA_IDENTIFIER_BARDICHE "bar " +#define D2S_ITEMDATA_IDENTIFIER_LOCHABER_AXE "9b7 " +#define D2S_ITEMDATA_IDENTIFIER_OGRE_AXE "7o7 " +#define D2S_ITEMDATA_IDENTIFIER_VOULGE "vou " +#define D2S_ITEMDATA_IDENTIFIER_BILL "9vo " +#define D2S_ITEMDATA_IDENTIFIER_COLOSSUS_VOULGE "7vo " +#define D2S_ITEMDATA_IDENTIFIER_SCYTHE "scy " +#define D2S_ITEMDATA_IDENTIFIER_BATTLE_SCYTHE "9s8 " +#define D2S_ITEMDATA_IDENTIFIER_THRESHER "7s8 " +#define D2S_ITEMDATA_IDENTIFIER_POLEAXE "pax " +#define D2S_ITEMDATA_IDENTIFIER_PARTIZAN "9pa " +#define D2S_ITEMDATA_IDENTIFIER_CRYPTIC_AXE "7pa " +#define D2S_ITEMDATA_IDENTIFIER_HALBERD "hal " +#define D2S_ITEMDATA_IDENTIFIER_BEC_DE_CORBIN "9h9 " +#define D2S_ITEMDATA_IDENTIFIER_GREAT_POLEAXE "7h7 " +#define D2S_ITEMDATA_IDENTIFIER_WAR_SCYTHE "wsc " +#define D2S_ITEMDATA_IDENTIFIER_GRIM_SCYTHE "9wc " +#define D2S_ITEMDATA_IDENTIFIER_GIANT_THRESHER "7wc " +#define D2S_ITEMDATA_IDENTIFIER_SHORT_BOW "sbw " +#define D2S_ITEMDATA_IDENTIFIER_EDGE_BOW "8sb " +#define D2S_ITEMDATA_IDENTIFIER_SPIDER_BOW "6sb " +#define D2S_ITEMDATA_IDENTIFIER_HUNTERS_BOW "hbw " +#define D2S_ITEMDATA_IDENTIFIER_RAZOR_BOW "8hb " +#define D2S_ITEMDATA_IDENTIFIER_BLADE_BOW "6hb " +#define D2S_ITEMDATA_IDENTIFIER_LONG_BOW "lbw " +#define D2S_ITEMDATA_IDENTIFIER_CEDAR_BOW "8lb " +#define D2S_ITEMDATA_IDENTIFIER_SHADOW_BOW "6lb " +#define D2S_ITEMDATA_IDENTIFIER_COMPOSITE_BOW "cbw " +#define D2S_ITEMDATA_IDENTIFIER_DOUBLE_BOW "8cb " +#define D2S_ITEMDATA_IDENTIFIER_GREAT_BOW "6cb " +#define D2S_ITEMDATA_IDENTIFIER_SHORT_BATTLE_BOW "sbb " +#define D2S_ITEMDATA_IDENTIFIER_SHORT_SIEGE_BOW "8s8 " +#define D2S_ITEMDATA_IDENTIFIER_DIAMOND_BOW "6s7 " +#define D2S_ITEMDATA_IDENTIFIER_LONG_BATTLE_BOW "lbb " +#define D2S_ITEMDATA_IDENTIFIER_LONG_SIEGE_BOW "8l8 " +#define D2S_ITEMDATA_IDENTIFIER_CRUSADER_BOW "6l7 " +#define D2S_ITEMDATA_IDENTIFIER_SHORT_WAR_BOW "swb " +#define D2S_ITEMDATA_IDENTIFIER_RUNE_BOW "8sw " +#define D2S_ITEMDATA_IDENTIFIER_WARD_BOW "6sw " +#define D2S_ITEMDATA_IDENTIFIER_LONG_WAR_BOW "lwb " +#define D2S_ITEMDATA_IDENTIFIER_GOTHIC_BOW "8lw " +#define D2S_ITEMDATA_IDENTIFIER_HYDRA_BOW "6lw " +#define D2S_ITEMDATA_IDENTIFIER_LIGHT_CROSSBOW "lxb " +#define D2S_ITEMDATA_IDENTIFIER_ARBALEST "8lx " +#define D2S_ITEMDATA_IDENTIFIER_PELLET_BOW "6lx " +#define D2S_ITEMDATA_IDENTIFIER_CROSSBOW "mxb " +#define D2S_ITEMDATA_IDENTIFIER_SIEGE_CROSSBOW "8mx " +#define D2S_ITEMDATA_IDENTIFIER_GORGON_CROSSBOW "6mx " +#define D2S_ITEMDATA_IDENTIFIER_HEAVY_CROSSBOW "hxb " +#define D2S_ITEMDATA_IDENTIFIER_BALLISTA "8hx " +#define D2S_ITEMDATA_IDENTIFIER_COLOSSUS_CROSSBOW "6hx " +#define D2S_ITEMDATA_IDENTIFIER_REPEATING_CROSSBOW "rxb " +#define D2S_ITEMDATA_IDENTIFIER_CHU_KO_NU "8rx " +#define D2S_ITEMDATA_IDENTIFIER_DEMON_CROSSBOW "6rx " +#define D2S_ITEMDATA_IDENTIFIER_SHORT_STAFF "sst " +#define D2S_ITEMDATA_IDENTIFIER_JO_STAFF "8ss " +#define D2S_ITEMDATA_IDENTIFIER_WALKING_STICK "6ss " +#define D2S_ITEMDATA_IDENTIFIER_LONG_STAFF "lst " +#define D2S_ITEMDATA_IDENTIFIER_QUARTERSTAFF "8ls " +#define D2S_ITEMDATA_IDENTIFIER_STALAGMITE "6ls " +#define D2S_ITEMDATA_IDENTIFIER_GNARLED_STAFF "gst " +#define D2S_ITEMDATA_IDENTIFIER_CEDAR_STAFF "8cs " +#define D2S_ITEMDATA_IDENTIFIER_ELDER_STAFF "6cs " +#define D2S_ITEMDATA_IDENTIFIER_BATTLE_STAFF "bst " +#define D2S_ITEMDATA_IDENTIFIER_GOTHIC_STAFF "8bs " +#define D2S_ITEMDATA_IDENTIFIER_SHILLELAGH "6bs " +#define D2S_ITEMDATA_IDENTIFIER_WAR_STAFF "wst " +#define D2S_ITEMDATA_IDENTIFIER_RUNE_STAFF "8ws " +#define D2S_ITEMDATA_IDENTIFIER_ARCHON_STAFF "6ws " +#define D2S_ITEMDATA_IDENTIFIER_WAND "wnd " +#define D2S_ITEMDATA_IDENTIFIER_BURNT_WAND "9wn " +#define D2S_ITEMDATA_IDENTIFIER_POLISHED_WAND "7wn " +#define D2S_ITEMDATA_IDENTIFIER_YEW_WAND "ywn " +#define D2S_ITEMDATA_IDENTIFIER_PETRIFIED_WAND "9yw " +#define D2S_ITEMDATA_IDENTIFIER_GHOST_WAND "7yw " +#define D2S_ITEMDATA_IDENTIFIER_BONE_WAND "bwn " +#define D2S_ITEMDATA_IDENTIFIER_TOMB_WAND "9bw " +#define D2S_ITEMDATA_IDENTIFIER_LICH_WAND "7bw " +#define D2S_ITEMDATA_IDENTIFIER_GRIM_WAND "gwn " +#define D2S_ITEMDATA_IDENTIFIER_GRAVE_WAND "9gw " +#define D2S_ITEMDATA_IDENTIFIER_UNEARTHED_WAND "7gw " +#define D2S_ITEMDATA_IDENTIFIER_SCEPTRE "scp " +#define D2S_ITEMDATA_IDENTIFIER_RUNE_SCEPTRE "9sc " +#define D2S_ITEMDATA_IDENTIFIER_MIGHTY_SCEPTRE "7sc " +#define D2S_ITEMDATA_IDENTIFIER_GRAND_SCEPTRE "gsc " +#define D2S_ITEMDATA_IDENTIFIER_HOLY_WATER_SPRINKLER "9qs " +#define D2S_ITEMDATA_IDENTIFIER_SERAPH_ROD "7qs " +#define D2S_ITEMDATA_IDENTIFIER_WAR_SCEPTRE "wsp " +#define D2S_ITEMDATA_IDENTIFIER_DIVINE_SCEPTRE "9ws " +#define D2S_ITEMDATA_IDENTIFIER_CADUCEUS "7ws " +#define D2S_ITEMDATA_IDENTIFIER_KATAR "ktr " +#define D2S_ITEMDATA_IDENTIFIER_QUHAB "9ar " +#define D2S_ITEMDATA_IDENTIFIER_SUWAYYAH "7ar " +#define D2S_ITEMDATA_IDENTIFIER_WRIST_BLADE "wrb " +#define D2S_ITEMDATA_IDENTIFIER_WRIST_SPIKE "9wb " +#define D2S_ITEMDATA_IDENTIFIER_WRIST_SWORD "7wb " +#define D2S_ITEMDATA_IDENTIFIER_HATCHET_HANDS "axf " +#define D2S_ITEMDATA_IDENTIFIER_FASCIA "9xf " +#define D2S_ITEMDATA_IDENTIFIER_WAR_FIST "7xf " +#define D2S_ITEMDATA_IDENTIFIER_CESTUS "ces " +#define D2S_ITEMDATA_IDENTIFIER_HAND_SCYTHE "9cs " +#define D2S_ITEMDATA_IDENTIFIER_BATTLE_CESTUS "7cs " +#define D2S_ITEMDATA_IDENTIFIER_CLAWS "clw " +#define D2S_ITEMDATA_IDENTIFIER_GREATER_CLAWS "9lw " +#define D2S_ITEMDATA_IDENTIFIER_FERAL_CLAWS "7lw " +#define D2S_ITEMDATA_IDENTIFIER_BLADE_TALONS "btl " +#define D2S_ITEMDATA_IDENTIFIER_GREATER_TALONS "9hw " +#define D2S_ITEMDATA_IDENTIFIER_RUNIC_TALONS "7hw " +#define D2S_ITEMDATA_IDENTIFIER_SCISSORS_KATAR "skr " +#define D2S_ITEMDATA_IDENTIFIER_SCISSORS_QUHAB "9qr " +#define D2S_ITEMDATA_IDENTIFIER_SCISSORS_SUWAYYAH "7qr " +#define D2S_ITEMDATA_IDENTIFIER_EAGLE_ORB "ob1 " +#define D2S_ITEMDATA_IDENTIFIER_GLOWING_ORB "ob6 " +#define D2S_ITEMDATA_IDENTIFIER_HEAVENLY_STONE "obb " +#define D2S_ITEMDATA_IDENTIFIER_SACRED_GLOBE "ob2 " +#define D2S_ITEMDATA_IDENTIFIER_CRYSTALLINE_GLB "ob7 " +#define D2S_ITEMDATA_IDENTIFIER_ELDRITCH_ORB "obc " +#define D2S_ITEMDATA_IDENTIFIER_SMOKED_SPHERE "ob3 " +#define D2S_ITEMDATA_IDENTIFIER_CLOUDY_SPHERE "ob8 " +#define D2S_ITEMDATA_IDENTIFIER_DEMON_HEART "obd " +#define D2S_ITEMDATA_IDENTIFIER_CLASPED_ORB "ob4 " +#define D2S_ITEMDATA_IDENTIFIER_SPARKLING_BALL "ob9 " +#define D2S_ITEMDATA_IDENTIFIER_VORTEX_ORB "obe " +#define D2S_ITEMDATA_IDENTIFIER_DRAGON_STONE "ob5 " +#define D2S_ITEMDATA_IDENTIFIER_SWIRLING_CRYSTAL "oba " +#define D2S_ITEMDATA_IDENTIFIER_DIMENSIONAL_SHARD "obf " +#define D2S_ITEMDATA_IDENTIFIER_STAG_BOW "am1 " +#define D2S_ITEMDATA_IDENTIFIER_ASHWOOD_BOW "am6 " +#define D2S_ITEMDATA_IDENTIFIER_MATRIARCHAL_BOW "amb " +#define D2S_ITEMDATA_IDENTIFIER_REFLEX_BOW "am2 " +#define D2S_ITEMDATA_IDENTIFIER_CEREMONIAL_BOW "am7 " +#define D2S_ITEMDATA_IDENTIFIER_GRAND_MATRON_BOW "amc " +#define D2S_ITEMDATA_IDENTIFIER_MAIDEN_SPEAR "am3 " +#define D2S_ITEMDATA_IDENTIFIER_CEREMONIAL_SPEAR "am8 " +#define D2S_ITEMDATA_IDENTIFIER_MATRIARCHAL_SPEAR "amd " +#define D2S_ITEMDATA_IDENTIFIER_MAIDEN_PIKE "am4 " +#define D2S_ITEMDATA_IDENTIFIER_CEREMONIAL_PIKE "am9 " +#define D2S_ITEMDATA_IDENTIFIER_MATRIARCHAL_PIKE "ame " +#define D2S_ITEMDATA_IDENTIFIER_MAIDEN_JAVELIN "am5 " +#define D2S_ITEMDATA_IDENTIFIER_CEREMONIAL_JAVELIN "ama " +#define D2S_ITEMDATA_IDENTIFIER_MATRIARCHAL_JAVELIN "amf " +#define D2S_ITEMDATA_IDENTIFIER_CIRCLET "ci0 " +#define D2S_ITEMDATA_IDENTIFIER_CORONET "ci1 " +#define D2S_ITEMDATA_IDENTIFIER_TIARA "ci2 " +#define D2S_ITEMDATA_IDENTIFIER_DIADEM "ci3 " +#define D2S_ITEMDATA_IDENTIFIER_RANCID_GAS_POTION "gps " +#define D2S_ITEMDATA_IDENTIFIER_OIL_POTION "ops " +#define D2S_ITEMDATA_IDENTIFIER_CHOKING_GAS_POTION "gpm " +#define D2S_ITEMDATA_IDENTIFIER_EXPLODING_POTION "opm " +#define D2S_ITEMDATA_IDENTIFIER_STRANGLING_GAS_POTION "gpl " +#define D2S_ITEMDATA_IDENTIFIER_FULMINATING_POTION "opl " +#define D2S_ITEMDATA_IDENTIFIER_WIRTS_LEG "leg " +#define D2S_ITEMDATA_IDENTIFIER_HORADRIC_MALUS "hdm " +#define D2S_ITEMDATA_IDENTIFIER_SCROLL_OF_INIFUSS1 "bks " +#define D2S_ITEMDATA_IDENTIFIER_SCROLL_OF_INIFUSS2 "bkd " +#define D2S_ITEMDATA_IDENTIFIER_BOOK_OF_SKILL "ass " +#define D2S_ITEMDATA_IDENTIFIER_HORADRIC_CUBE "box " +#define D2S_ITEMDATA_IDENTIFIER_HORADRIC_SCROLL "tr1 " +#define D2S_ITEMDATA_IDENTIFIER_STAFF_OF_KINGS "msf " +#define D2S_ITEMDATA_IDENTIFIER_VIPER_AMULET "vip " +#define D2S_ITEMDATA_IDENTIFIER_HORADRIC_STAFF "hst " +#define D2S_ITEMDATA_IDENTIFIER_POTION_OF_LIFE "xyz " +#define D2S_ITEMDATA_IDENTIFIER_JADE_FIGURINE "j34 " +#define D2S_ITEMDATA_IDENTIFIER_GOLDEN_BIRD "g34 " +#define D2S_ITEMDATA_IDENTIFIER_LAM_ESENS_TOME "bbb " +#define D2S_ITEMDATA_IDENTIFIER_GIDBINN "g33 " +#define D2S_ITEMDATA_IDENTIFIER_KHALIMS_FLAIL "qf1 " +#define D2S_ITEMDATA_IDENTIFIER_KHALIMS_WILL "qf2 " +#define D2S_ITEMDATA_IDENTIFIER_KHALIMS_EYE "qey " +#define D2S_ITEMDATA_IDENTIFIER_KHALIMS_HEART "qhr " +#define D2S_ITEMDATA_IDENTIFIER_KHALIMS_BRAIN "qbr " +#define D2S_ITEMDATA_IDENTIFIER_MEPHISTOS_SOULSTONE "mss " +#define D2S_ITEMDATA_IDENTIFIER_HELLFORGE_HAMMER "hfh " +#define D2S_ITEMDATA_IDENTIFIER_MALAH_POTION "ice " +#define D2S_ITEMDATA_IDENTIFIER_SCROLL_OF_RESISTANCE "tr2 " +#define D2S_ITEMDATA_IDENTIFIER_CHIPPED_AMETHYST "gcv " +#define D2S_ITEMDATA_IDENTIFIER_CHIPPED_DIAMOND "gcw " +#define D2S_ITEMDATA_IDENTIFIER_CHIPPED_EMERALD "gcg " +#define D2S_ITEMDATA_IDENTIFIER_CHIPPED_RUBY "gcr " +#define D2S_ITEMDATA_IDENTIFIER_CHIPPED_SAPHIRE "gcb " +#define D2S_ITEMDATA_IDENTIFIER_CHIPPED_SKULL "skc " +#define D2S_ITEMDATA_IDENTIFIER_CHIPPED_TOPAZ "gcy " +#define D2S_ITEMDATA_IDENTIFIER_FLAWED_AMETHYST "gfv " +#define D2S_ITEMDATA_IDENTIFIER_FLAWED_DIAMOND "gfw " +#define D2S_ITEMDATA_IDENTIFIER_FLAWED_EMERALD "gfg " +#define D2S_ITEMDATA_IDENTIFIER_FLAWED_RUBY "gfr " +#define D2S_ITEMDATA_IDENTIFIER_FLAWED_SAPHIRE "gfb " +#define D2S_ITEMDATA_IDENTIFIER_FLAWED_SKULL "skf " +#define D2S_ITEMDATA_IDENTIFIER_FLAWED_TOPAZ "gfy " +#define D2S_ITEMDATA_IDENTIFIER_AMETHYST "gsv " +#define D2S_ITEMDATA_IDENTIFIER_DIAMOND "gsw " +#define D2S_ITEMDATA_IDENTIFIER_EMERALD "gsg " +#define D2S_ITEMDATA_IDENTIFIER_RUBY "gsr " +#define D2S_ITEMDATA_IDENTIFIER_SAPHIRE "gsb " +#define D2S_ITEMDATA_IDENTIFIER_SKULL "sku " +#define D2S_ITEMDATA_IDENTIFIER_TOPAZ "gsy " +#define D2S_ITEMDATA_IDENTIFIER_FLAWLESS_AMETHYST "gzv " +#define D2S_ITEMDATA_IDENTIFIER_FLAWLESS_DIAMOND "glw " +#define D2S_ITEMDATA_IDENTIFIER_FLAWLESS_EMERALD "glg " +#define D2S_ITEMDATA_IDENTIFIER_FLAWLESS_RUBY "glr " +#define D2S_ITEMDATA_IDENTIFIER_FLAWLESS_SAPHIRE "glb " +#define D2S_ITEMDATA_IDENTIFIER_FLAWLESS_SKULL "skl " +#define D2S_ITEMDATA_IDENTIFIER_FLAWLESS_TOPAZ "gly " +#define D2S_ITEMDATA_IDENTIFIER_PERFECT_DIAMOND "gpw " +#define D2S_ITEMDATA_IDENTIFIER_PERFECT_AMETHYST "gpv " +#define D2S_ITEMDATA_IDENTIFIER_PERFECT_SAPPHIRE "gpb " +#define D2S_ITEMDATA_IDENTIFIER_PERFECT_TOPAZ "gpy " +#define D2S_ITEMDATA_IDENTIFIER_PERFECT_RUBY "gpr " +#define D2S_ITEMDATA_IDENTIFIER_PERFECT_SKULL "skz " +#define D2S_ITEMDATA_IDENTIFIER_PERFECT_EMERALD "gpg " +#define D2S_ITEMDATA_IDENTIFIER_EL_RUNE "r01 " +#define D2S_ITEMDATA_IDENTIFIER_ELD_RUNE "r02 " +#define D2S_ITEMDATA_IDENTIFIER_TIR_RUNE "r03 " +#define D2S_ITEMDATA_IDENTIFIER_NEF_RUNE "r04 " +#define D2S_ITEMDATA_IDENTIFIER_ETH_RUNE "r05 " +#define D2S_ITEMDATA_IDENTIFIER_ITH_RUNE "r06 " +#define D2S_ITEMDATA_IDENTIFIER_TAL_RUNE "r07 " +#define D2S_ITEMDATA_IDENTIFIER_RAL_RUNE "r08 " +#define D2S_ITEMDATA_IDENTIFIER_ORT_RUNE "r09 " +#define D2S_ITEMDATA_IDENTIFIER_THUL_RUNE "r10 " +#define D2S_ITEMDATA_IDENTIFIER_AMN_RUNE "r11 " +#define D2S_ITEMDATA_IDENTIFIER_SOL_RUNE "r12 " +#define D2S_ITEMDATA_IDENTIFIER_SHAEL_RUNE "r13 " +#define D2S_ITEMDATA_IDENTIFIER_DOL_RUNE "r14 " +#define D2S_ITEMDATA_IDENTIFIER_HEL_RUNE "r15 " +#define D2S_ITEMDATA_IDENTIFIER_IO_RUNE "r16 " +#define D2S_ITEMDATA_IDENTIFIER_LUM_RUNE "r17 " +#define D2S_ITEMDATA_IDENTIFIER_KO_RUNE "r18 " +#define D2S_ITEMDATA_IDENTIFIER_FAL_RUNE "r19 " +#define D2S_ITEMDATA_IDENTIFIER_LEM_RUNE "r20 " +#define D2S_ITEMDATA_IDENTIFIER_PUL_RUNE "r21 " +#define D2S_ITEMDATA_IDENTIFIER_UM_RUNE "r22 " +#define D2S_ITEMDATA_IDENTIFIER_MAL_RUNE "r23 " +#define D2S_ITEMDATA_IDENTIFIER_IST_RUNE "r24 " +#define D2S_ITEMDATA_IDENTIFIER_GUL_RUNE "r25 " +#define D2S_ITEMDATA_IDENTIFIER_VEX_RUNE "r26 " +#define D2S_ITEMDATA_IDENTIFIER_OHM_RUNE "r27 " +#define D2S_ITEMDATA_IDENTIFIER_LO_RUNE "r28 " +#define D2S_ITEMDATA_IDENTIFIER_SUR_RUNE "r29 " +#define D2S_ITEMDATA_IDENTIFIER_BER_RUNE "r30 " +#define D2S_ITEMDATA_IDENTIFIER_JAH_RUNE "r31 " +#define D2S_ITEMDATA_IDENTIFIER_CHAM_RUNE "r32 " +#define D2S_ITEMDATA_IDENTIFIER_ZOD_RUNE "r33 " +#define D2S_ITEMDATA_IDENTIFIER_ANTIDOTE_POTION "yps " +#define D2S_ITEMDATA_IDENTIFIER_STAMINA_POTION "vps " +#define D2S_ITEMDATA_IDENTIFIER_THAWING_POTION "wms " +#define D2S_ITEMDATA_IDENTIFIER_MINOR_HEALING_POTION "hp1 " +#define D2S_ITEMDATA_IDENTIFIER_MINOR_MANA_POTION "mp1 " +#define D2S_ITEMDATA_IDENTIFIER_LIGHT_HEALING_POTION "hp2 " +#define D2S_ITEMDATA_IDENTIFIER_LIGHT_MANA_POTION "mp2 " +#define D2S_ITEMDATA_IDENTIFIER_HEALING_POTION "hp3 " +#define D2S_ITEMDATA_IDENTIFIER_MANA_POTION "mp3 " +#define D2S_ITEMDATA_IDENTIFIER_GREATER_HEALING_POTION "hp4 " +#define D2S_ITEMDATA_IDENTIFIER_GREATER_MANA_POTION "mp4 " +#define D2S_ITEMDATA_IDENTIFIER_SUPER_HEALING_POTION "hp5 " +#define D2S_ITEMDATA_IDENTIFIER_SUPER_MANA_POTION "mp5 " +#define D2S_ITEMDATA_IDENTIFIER_REJUVENATION_POTION "rvs " +#define D2S_ITEMDATA_IDENTIFIER_FULL_REJUVENATION_POTION "rvl " +#define D2S_ITEMDATA_IDENTIFIER_CHARM_SMALL "cm1 " +#define D2S_ITEMDATA_IDENTIFIER_CHARM_LARGE "cm2 " +#define D2S_ITEMDATA_IDENTIFIER_CHARM_GRAND "cm3 " +#define D2S_ITEMDATA_IDENTIFIER_IDENTIFY_SCROLL "isc " +#define D2S_ITEMDATA_IDENTIFIER_TOWN_PORTAL_SCROLL "tsc " +#define D2S_ITEMDATA_IDENTIFIER_TOME_OF_TOWN_PORTAL "tbk " +#define D2S_ITEMDATA_IDENTIFIER_TOME_OF_IDENTIFY "ibk " +#define D2S_ITEMDATA_IDENTIFIER_ARROWS "aqv " +#define D2S_ITEMDATA_IDENTIFIER_BOLTS "cqv " +#define D2S_ITEMDATA_IDENTIFIER_JEWEL "jew " +#define D2S_ITEMDATA_IDENTIFIER_KEY "key " +#define D2S_ITEMDATA_IDENTIFIER_AMULET "amu " +#define D2S_ITEMDATA_IDENTIFIER_GOLD "gld " +#define D2S_ITEMDATA_IDENTIFIER_RING "rin " +#define D2S_ITEMDATA_IDENTIFIER_EAR "ear " + +// Unused +#define D2S_ITEMDATA_IDENTIFIER_TORCH "tch " +#define D2S_ITEMDATA_IDENTIFIER_HEART "hrt " +#define D2S_ITEMDATA_IDENTIFIER_BRAIN "brz " +#define D2S_ITEMDATA_IDENTIFIER_JAWBONE "jaw " +#define D2S_ITEMDATA_IDENTIFIER_EYE "eyz " +#define D2S_ITEMDATA_IDENTIFIER_HORN "hrn " +#define D2S_ITEMDATA_IDENTIFIER_HERB "hrb " +#define D2S_ITEMDATA_IDENTIFIER_TAIL "tal " +#define D2S_ITEMDATA_IDENTIFIER_FLAG "flg " +#define D2S_ITEMDATA_IDENTIFIER_FANG "fng " +#define D2S_ITEMDATA_IDENTIFIER_QUILL "qll " +#define D2S_ITEMDATA_IDENTIFIER_SOUL "sol " +#define D2S_ITEMDATA_IDENTIFIER_SCALP "scz " +#define D2S_ITEMDATA_IDENTIFIER_SPLEEN "spe " +#define D2S_ITEMDATA_IDENTIFIER_BLACK_TOWER_KEY "luv " +#define D2S_ITEMDATA_IDENTIFIER_ELIXIR "elx " +#define D2S_ITEMDATA_IDENTIFIER_SCROLL_OF_KNOWLEDGE "0sc " + #endif \ No newline at end of file diff --git a/docs/d2s_save_item_format_1.13d.txt b/docs/d2s_save_item_format_1.13d.txt index edd7e63..f9549c5 100644 --- a/docs/d2s_save_item_format_1.13d.txt +++ b/docs/d2s_save_item_format_1.13d.txt @@ -191,7 +191,7 @@ the future. All sizes are in bits unless otherwise specified. │ │ │old data from the last time the item was stored. I.e., it │ │ │ │may be non-zero, but the value is unused. │ ├────────┼───────┼────────────────────────────────────────────────────────────┤ -│72 │1 │unknown │ +│72 │1 │Set Name Has Suffix (?) │ ├────────┼───────┼────────────────────────────────────────────────────────────┤ │ │ │Actually, bit 74 seems to always be 0, but since bits 73 and│ │ │ │75 are related I just lump them all together. If the item is│ @@ -670,7 +670,7 @@ personalized. │7 │0 (this indicates the end of the name) │ └───────────────┴─────────────────────────────────────────────────────────────┘ -Unknown Field +Unknown Field MAYBE WROOOOONG All items have this field between the personalization (if it exists) and the item-specific data: diff --git a/docs/design b/docs/design index 97864e1..675b13a 100644 --- a/docs/design +++ b/docs/design @@ -27,6 +27,17 @@ User should be able to: - get waypoint active - set waypoint active + items + --------- + - add/remove sockets + - add/remove personalisation + - add/remove ethereal + - add/remove indestructible + - change durability + - change item level + - spawn unique # get normal and unique and compare + - spawn set # get normal and set and compare + - import/export -- libgit2 0.22.2