Index |
---|
define D2ITEMTYPE_TOME_TP |
define D2ITEMTYPE_TOME_ID |
enum d2filetype |
enum d2rarity |
enum d2location |
enum d2panel |
enum d2equiplocation |
enum d2lowquality |
enum d2itemreader_parse_state |
enum d2char_section |
CHECK_RESULT d2err d2gamedata_init_default ( d2gamedata * data) |
CHECK_RESULT d2err d2gamedata_init_files ( d2gamedata * data, d2gamedatafiles files) |
CHECK_RESULT d2err d2gamedata_init_bufs ( d2gamedata * data, d2gamedatabufs bufs) |
void d2gamedata_destroy ( d2gamedata * data) |
d2filetype d2filetype_get (const uint8_t * data, size_t size) |
d2filetype d2filetype_of_file (const char * filename) |
CHECK_RESULT d2err d2itemreader_parse_any_file (const char * filename, d2itemlist * itemList, d2gamedata * gameData, size_t * out_bytesRead) |
CHECK_RESULT d2err d2itemreader_parse_any (const uint8_t *const data, size_t dataSizeBytes, d2itemlist * itemList, d2gamedata * gameData, size_t * out_bytesRead) |
CHECK_RESULT d2err d2itemlist_parse (const uint8_t *const data, size_t dataSizeBytes, size_t startByte, d2itemlist * items, d2gamedata * gameData, size_t * out_bytesRead) |
CHECK_RESULT d2err d2itemlist_parse_num (const uint8_t *const data, size_t dataSizeBytes, size_t startByte, d2itemlist * items, uint16_t numItems, d2gamedata * gameData, size_t * out_bytesRead) |
CHECK_RESULT d2err d2itemlist_init ( d2itemlist * list, size_t initialSize) |
void d2itemlist_init_empty ( d2itemlist * list) |
CHECK_RESULT d2err d2itemlist_append ( d2itemlist * list, const d2item *const item) |
CHECK_RESULT d2err d2itemlist_append_copy ( d2itemlist * list, const d2item *const item) |
CHECK_RESULT d2err d2itemlist_append_list_copy ( d2itemlist * dest, const d2itemlist *const src) |
CHECK_RESULT d2err d2itemlist_copy ( d2itemlist * dest, const d2itemlist *const src) |
void d2itemlist_destroy ( d2itemlist * list) |
CHECK_RESULT d2err d2itemproplist_parse (d2bitreader * br, d2itemproplist * list, d2gamedata * gameData) |
CHECK_RESULT d2err d2itemproplist_init ( d2itemproplist * list, size_t initialSize) |
CHECK_RESULT d2err d2itemproplist_append ( d2itemproplist * list, d2itemprop prop) |
CHECK_RESULT d2err d2itemproplist_copy ( d2itemproplist * dest, const d2itemproplist *const src) |
void d2itemproplist_destroy ( d2itemproplist * list) |
CHECK_RESULT d2err d2item_parse_file (const char * filename, d2item * item, d2gamedata * gameData, size_t * out_bytesRead) |
CHECK_RESULT d2err d2item_parse (const uint8_t *const data, size_t dataSizeBytes, size_t startByte, d2item * item, d2gamedata * gameData, size_t * out_bytesRead) |
CHECK_RESULT d2err d2item_parse_single (const uint8_t *const data, size_t dataSizeBytes, size_t startByte, d2item * item, d2gamedata * gameData, size_t * out_bytesRead) |
CHECK_RESULT d2err d2item_copy ( d2item * dest, const d2item *const src) |
void d2item_destroy ( d2item * item) |
CHECK_RESULT d2err d2sharedstash_parse_file (const char * filename, d2sharedstash * stash, d2gamedata * gameData, size_t * out_bytesRead) |
CHECK_RESULT d2err d2sharedstash_parse (const uint8_t *const data, size_t dataSizeBytes, d2sharedstash * stash, d2gamedata * gameData, size_t * out_bytesRead) |
void d2sharedstash_destroy ( d2sharedstash * stash) |
CHECK_RESULT d2err d2personalstash_parse_file (const char * filename, d2personalstash * stash, d2gamedata * gameData, size_t * out_bytesRead) |
CHECK_RESULT d2err d2personalstash_parse (const uint8_t *const data, size_t dataSizeBytes, d2personalstash * stash, d2gamedata * gameData, size_t * out_bytesRead) |
void d2personalstash_destroy ( d2personalstash * stash) |
CHECK_RESULT d2err d2char_parse_file (const char * filename, d2char * character, d2gamedata * gameData, size_t * out_bytesRead) |
CHECK_RESULT d2err d2char_parse (const uint8_t *const data, size_t dataSizeBytes, d2char * character, d2gamedata * gameData, size_t * out_bytesRead) |
void d2char_destroy ( d2char * character) |
CHECK_RESULT d2err d2atmastash_parse_file (const char * filename, d2atmastash * stash, d2gamedata * gameData, size_t * out_bytesRead) |
CHECK_RESULT d2err d2atmastash_parse (const uint8_t *const data, size_t dataSizeBytes, d2atmastash * stash, d2gamedata * gameData, size_t * out_bytesRead) |
void d2atmastash_destroy ( d2atmastash * stash) |
CHECK_RESULT d2err d2itemreader_open_file ( d2itemreader_stream * stream, const char * filepath, d2gamedata * gameData) |
CHECK_RESULT d2err d2itemreader_open_buffer ( d2itemreader_stream * stream, const uint8_t *const data, size_t dataSizeBytes, d2gamedata * gameData) |
void d2itemreader_close ( d2itemreader_stream * stream) |
const uint8_t * d2itemreader_dump_last_item ( d2itemreader_stream * stream, size_t * out_itemSizeBytes) |
size_t d2itemreader_bytepos ( d2itemreader_stream * stream) |
CHECK_RESULT bool d2itemreader_next ( d2itemreader_stream * stream, d2item * item) |
CHECK_RESULT bool d2itemreader_next_but_stop_on ( d2itemreader_stream * stream, d2item * item, d2itemreader_parse_state stopOn) |
bool d2itemreader_seek_parse_state ( d2itemreader_stream * stream, d2itemreader_parse_state state) |
bool d2itemreader_seek_valid_item ( d2itemreader_stream * stream) |
struct d2atmastash |
struct d2atmastash_info |
struct d2char |
struct d2char_info |
struct d2ear |
struct d2gamedata |
struct d2gamedata_itemstat |
struct d2gamedatabufs |
struct d2gamedatafiles |
struct d2item |
struct d2itemlist |
struct d2itemprop |
struct d2itemproplist |
struct d2itemreader_source |
struct d2itemreader_state |
struct d2itemreader_stream |
struct d2personalstash |
struct d2personalstash_info |
struct d2sharedstash |
struct d2sharedstash_info |
struct d2stashpage |
union d2itemreader_stream.info |
define
D2ITEMTYPE_TOME_TP
define
D2ITEMTYPE_TOME_ID
enum
d2filetype
Values | Descriptions |
---|---|
D2FILETYPE_UNKNOWN | Filetype could not be determined or file is malformed. |
D2FILETYPE_D2_CHARACTER | Parsable using d2char_parse() or d2char_parse_file() |
D2FILETYPE_PLUGY_SHARED_STASH | Parsable using d2sharedstash_parse() or d2sharedstash_parse_file() |
D2FILETYPE_PLUGY_PERSONAL_STASH | Parsable using d2personalstash_parse() or d2personalstash_parse_file() |
D2FILETYPE_ATMA_STASH | Parsable using d2atmastash_parse() or d2atmastash_parse_file() |
D2FILETYPE_D2_ITEM | Parsable using d2item_parse() or d2item_parse_file() |
See also: d2filetype_get(), d2filetype_of_file()
enum
d2rarity
Values | Descriptions |
---|---|
D2RARITY_INVALID | |
D2RARITY_LOW_QUALITY | |
D2RARITY_NORMAL | |
D2RARITY_HIGH_QUALITY | AKA Superior. |
D2RARITY_MAGIC | |
D2RARITY_SET | |
D2RARITY_RARE | |
D2RARITY_UNIQUE | |
D2RARITY_CRAFTED | |
D2RARITY_TEMPERED | Was never actually enabled in an official release. |
enum
d2location
Values | Descriptions |
---|---|
D2LOCATION_STORED | |
D2LOCATION_EQUIPPED | |
D2LOCATION_BELT | |
D2LOCATION_GROUND | |
D2LOCATION_CURSOR | |
D2LOCATION_SOCKETED |
enum
d2panel
Values | Descriptions |
---|---|
D2PANEL_NONE | |
D2PANEL_INVENTORY | |
D2PANEL_CUBE | |
D2PANEL_STASH |
enum
d2equiplocation
Values | Descriptions |
---|---|
D2EQUIP_HEAD | |
D2EQUIP_NECK | |
D2EQUIP_TORSO | |
D2EQUIP_HAND_RIGHT | |
D2EQUIP_HAND_LEFT | |
D2EQUIP_FINGER_RIGHT | |
D2EQUIP_FINGER_LEFT | |
D2EQUIP_WAIST | |
D2EQUIP_FEET | |
D2EQUIP_HANDS | |
D2EQUIP_ALT_HAND_RIGHT | |
D2EQUIP_ALT_HAND_LEFT |
NOTE: All equipment locations are based on character orientation on the inventory screen, meaning the right hand is on the left side of the screen (i.e. imagine that the character is oriented as if it is facing towards the screen)
enum
d2lowquality
Values | Descriptions |
---|---|
D2LOWQUALITY_CRUDE | |
D2LOWQUALITY_CRACKED | |
D2LOWQUALITY_DAMAGED | |
D2LOWQUALITY_LOW_QUALITY |
enum
d2itemreader_parse_state
Values | Descriptions |
---|---|
PARSE_STATE_NOTHING_PARSED | |
PARSE_STATE_ITEMLIST_READY | |
PARSE_STATE_ITEM_READY | |
PARSE_STATE_ITEMLIST_DONE | |
PARSE_STATE_PAGE_READY | |
PARSE_STATE_NEEDS_VERIFICATION | |
PARSE_STATE_FINISHED | |
PARSE_STATE_NONE |
enum
d2char_section
Values | Descriptions |
---|---|
D2CHAR_SECTION_MAIN | |
D2CHAR_SECTION_CORPSE | |
D2CHAR_SECTION_MERC |
CHECK_RESULT d2err
d2gamedata_init_default
(
d2gamedata
* data)
Load the default data packaged with d2itemreader (should work for un-modded D2 versions >= 1.10)
D2ERR_OK
on success
IMPORTANT: d2gamedata_destroy() only needs to be called if the init function returns
D2ERR_OK
See also: d2gamedata_init_files(), d2gamedata_init_bufs(), d2gamedata_destroy()
CHECK_RESULT d2err
d2gamedata_init_files
(
d2gamedata
* data,
d2gamedatafiles
files)
Load the data from the file paths given in files
files
Paths to the .txt game data files D2ERR_OK
on success
IMPORTANT: d2gamedata_destroy() only needs to be called if the init function returns
D2ERR_OK
See also: d2gamedata_init_default(), d2gamedata_init_bufs(), d2gamedata_destroy()
CHECK_RESULT d2err
d2gamedata_init_bufs
(
d2gamedata
* data,
d2gamedatabufs
bufs)
Load the data from the buffers given in bufs
files
Buffers to the .txt game data D2ERR_OK
on success
IMPORTANT: d2gamedata_destroy() only needs to be called if the init function returns
D2ERR_OK
See also: d2gamedata_init_files(), d2gamedata_init_default(), d2gamedata_destroy()
void
d2gamedata_destroy
(
d2gamedata
* data)
Cleanup memory used by d2gamedata.
IMPORTANT: d2gamedata_destroy() only needs to be called if the init function returns
D2ERR_OK
See also: d2gamedata_init_default(), d2gamedata_init_files(), d2gamedata_init_bufs()
d2filetype
d2filetype_get
(const uint8_t * data, size_t size)
Attempt to determine the filetype of the given binary data.
d2filetype
d2filetype_of_file
(const char * filename)
Attempt to determine the filetype of the given file path.
CHECK_RESULT d2err
d2itemreader_parse_any_file
(const char * filename,
d2itemlist
* itemList,
d2gamedata
* gameData, size_t * out_bytesRead)
Parse the file in filename
if it is of any parsable format, and store the result in itemList
This is a convenience function for when you are only interested in the items in a file, and don't care about anything else (i.e. when the metadata you get from more specific parsers is irrelevent)
itemList
A pointer to an uninitialized d2itemlist object. If this function returns D2ERR_OK
, then itemList
will need to be cleaned up with d2itemlist_destroy(). If this function returns something other than D2ERR_OK
, then itemList
will remain uninitialized.
out_bytesRead
On D2ERR_OK
, set to the number of bytes read when parsing the file. On error, set to the number of bytes successfully parsed before the error.
D2ERR_OK
on success
CHECK_RESULT d2err
d2itemreader_parse_any
(const uint8_t *const data, size_t dataSizeBytes,
d2itemlist
* itemList,
d2gamedata
* gameData, size_t * out_bytesRead)
CHECK_RESULT d2err
d2itemlist_parse
(const uint8_t *const data, size_t dataSizeBytes, size_t startByte,
d2itemlist
* items,
d2gamedata
* gameData, size_t * out_bytesRead)
Parse the itemlist in data
starting at startByte
, and store the result in items
items
A pointer an uninitialized d2itemlist object (i.e. d2itemlist_init() has NOT been called on it). If this function returns D2ERR_OK
, then items
will need to be cleaned up with d2itemlist_destroy(). If this function returns something other than D2ERR_OK
, then items
will remain uninitialized.
out_bytesRead
On D2ERR_OK
, set to the number of bytes read when parsing the item list. On error, set to the number of bytes successfully parsed before the error.
D2ERR_OK
on success
See also: d2itemlist_destroy(), d2itemlist_parse_num()
CHECK_RESULT d2err
d2itemlist_parse_num
(const uint8_t *const data, size_t dataSizeBytes, size_t startByte,
d2itemlist
* items, uint16_t numItems,
d2gamedata
* gameData, size_t * out_bytesRead)
Parse the itemlist containing exactly numItems
items (not including items in sockets) in data
starting at startByte
, and store the result in items
items
A pointer an uninitialized d2itemlist object (i.e. d2itemlist_init() has NOT been called on it). If this function returns D2ERR_OK
, then items
will need to be cleaned up with d2itemlist_destroy(). If this function returns something other than D2ERR_OK
, then items
will remain uninitialized.
numItems
The number of items to parse, not including items in sockets
out_bytesRead
On D2ERR_OK
, set to the number of bytes read when parsing the item list. On error, set to the number of bytes successfully parsed before the error.
D2ERR_OK
on success
See also: d2itemlist_destroy(), d2itemlist_parse()
CHECK_RESULT d2err
d2itemlist_init
(
d2itemlist
* list, size_t initialSize)
void
d2itemlist_init_empty
(
d2itemlist
* list)
CHECK_RESULT d2err
d2itemlist_append
(
d2itemlist
* list, const
d2item
*const item)
CHECK_RESULT d2err
d2itemlist_append_copy
(
d2itemlist
* list, const
d2item
*const item)
CHECK_RESULT d2err
d2itemlist_append_list_copy
(
d2itemlist
* dest, const
d2itemlist
*const src)
CHECK_RESULT d2err
d2itemlist_copy
(
d2itemlist
* dest, const
d2itemlist
*const src)
void
d2itemlist_destroy
(
d2itemlist
* list)
CHECK_RESULT d2err
d2itemproplist_parse
(d2bitreader * br,
d2itemproplist
* list,
d2gamedata
* gameData)
Parse the item property list using br
, and store the result in list
br
A pointer a d2bitreader struct
list
A pointer an uninitialized d2itemproplist object (i.e. d2itemproplist_init() has NOT been called on it). If this function returns D2ERR_OK
, then list
will need to be cleaned up with d2itemproplist_destroy(). If this function returns something other than D2ERR_OK
, then list
will remain uninitialized.
D2ERR_OK
on success
See also: d2itemproplist_destroy()
CHECK_RESULT d2err
d2itemproplist_init
(
d2itemproplist
* list, size_t initialSize)
CHECK_RESULT d2err
d2itemproplist_append
(
d2itemproplist
* list,
d2itemprop
prop)
CHECK_RESULT d2err
d2itemproplist_copy
(
d2itemproplist
* dest, const
d2itemproplist
*const src)
void
d2itemproplist_destroy
(
d2itemproplist
* list)
CHECK_RESULT d2err
d2item_parse_file
(const char * filename,
d2item
* item,
d2gamedata
* gameData, size_t * out_bytesRead)
Parse the item (+ any socketed items within) in filename
, and store the result in item
item
A pointer an uninitialized d2item object. If this function returns D2ERR_OK
, then item
will need to be cleaned up with d2item_destroy(). If this function returns something other than D2ERR_OK
, then item
will remain uninitialized.
out_bytesRead
On D2ERR_OK
, set to the number of bytes read when parsing the item. On error, set to the number of bytes successfully parsed before the error.
D2ERR_OK
on success
See also: d2item_destroy(), d2item_parse(), d2item_parse_single()
CHECK_RESULT d2err
d2item_parse
(const uint8_t *const data, size_t dataSizeBytes, size_t startByte,
d2item
* item,
d2gamedata
* gameData, size_t * out_bytesRead)
Parse the item (+ any socketed items within) in data
starting at startByte
, and store the result in item
item
A pointer an uninitialized d2item object. If this function returns D2ERR_OK
, then item
will need to be cleaned up with d2item_destroy(). If this function returns something other than D2ERR_OK
, then item
will remain uninitialized.
out_bytesRead
On D2ERR_OK
, set to the number of bytes read when parsing the item. On error, set to the number of bytes successfully parsed before the error.
D2ERR_OK
on success
See also: d2item_destroy(), d2item_parse_file(), d2item_parse_single()
CHECK_RESULT d2err
d2item_parse_single
(const uint8_t *const data, size_t dataSizeBytes, size_t startByte,
d2item
* item,
d2gamedata
* gameData, size_t * out_bytesRead)
Parse the item (but not socketed items within) in data
starting at startByte
, and store the result in item
If the item has items socketed in it, item->socketedItems
will be initialized with size item->numItemsInSockets
, but will be empty.
item
A pointer an uninitialized d2item object. If this function returns D2ERR_OK
, then item
will need to be cleaned up with d2item_destroy(). If this function returns something other than D2ERR_OK
, then item
will remain uninitialized.
out_bytesRead
On D2ERR_OK
, set to the number of bytes read when parsing the item. On error, set to the number of bytes successfully parsed before the error.
D2ERR_OK
on success
See also: d2item_destroy(), d2item_parse_file(), d2item_parse()
CHECK_RESULT d2err
d2item_copy
(
d2item
* dest, const
d2item
*const src)
void
d2item_destroy
(
d2item
* item)
CHECK_RESULT d2err
d2sharedstash_parse_file
(const char * filename,
d2sharedstash
* stash,
d2gamedata
* gameData, size_t * out_bytesRead)
Parse the PlugY shared stash in filename
, and store the result in stash
stash
A pointer to an uninitialized d2sharedstash object. If this function returns D2ERR_OK
, then stash
will need to be cleaned up with d2sharedstash_destroy(). If this function returns something other than D2ERR_OK
, then stash
will remain uninitialized.
out_bytesRead
On D2ERR_OK
, set to the number of bytes read when parsing the stash. On error, set to the number of bytes successfully parsed before the error.
D2ERR_OK
on success
CHECK_RESULT d2err
d2sharedstash_parse
(const uint8_t *const data, size_t dataSizeBytes,
d2sharedstash
* stash,
d2gamedata
* gameData, size_t * out_bytesRead)
void
d2sharedstash_destroy
(
d2sharedstash
* stash)
CHECK_RESULT d2err
d2personalstash_parse_file
(const char * filename,
d2personalstash
* stash,
d2gamedata
* gameData, size_t * out_bytesRead)
Parse the PlugY personal stash in filename
, and store the result in stash
stash
A pointer to an uninitialized d2personalstash object. If this function returns D2ERR_OK
, then stash
will need to be cleaned up with d2personalstash_destroy(). If this function returns something other than D2ERR_OK
, then stash
will remain uninitialized.
out_bytesRead
On D2ERR_OK
, set to the number of bytes read when parsing the stash. On error, set to the number of bytes successfully parsed before the error.
D2ERR_OK
on success
CHECK_RESULT d2err
d2personalstash_parse
(const uint8_t *const data, size_t dataSizeBytes,
d2personalstash
* stash,
d2gamedata
* gameData, size_t * out_bytesRead)
void
d2personalstash_destroy
(
d2personalstash
* stash)
CHECK_RESULT d2err
d2char_parse_file
(const char * filename,
d2char
* character,
d2gamedata
* gameData, size_t * out_bytesRead)
Parse the character in filename
, and store the result in character
character
A pointer to an uninitialized d2char object. If this function returns D2ERR_OK
, then character
will need to be cleaned up with d2char_destroy(). If this function returns something other than D2ERR_OK
, then character
will remain uninitialized.
out_bytesRead
On D2ERR_OK
, set to the number of bytes read when parsing the character. On error, set to the number of bytes successfully parsed before the error.
D2ERR_OK
on success
CHECK_RESULT d2err
d2char_parse
(const uint8_t *const data, size_t dataSizeBytes,
d2char
* character,
d2gamedata
* gameData, size_t * out_bytesRead)
void
d2char_destroy
(
d2char
* character)
CHECK_RESULT d2err
d2atmastash_parse_file
(const char * filename,
d2atmastash
* stash,
d2gamedata
* gameData, size_t * out_bytesRead)
Parse the d2x ATMA stash in filename
, and store the result in stash
stash
A pointer to an uninitialized d2atmastash object. If this function returns D2ERR_OK
, then stash
will need to be cleaned up with d2atmastash_destroy(). If this function returns something other than D2ERR_OK
, then stash
will remain uninitialized.
out_bytesRead
On D2ERR_OK
, set to the number of bytes read when parsing the stash. On error, set to the number of bytes successfully parsed before the error.
D2ERR_OK
on success
CHECK_RESULT d2err
d2atmastash_parse
(const uint8_t *const data, size_t dataSizeBytes,
d2atmastash
* stash,
d2gamedata
* gameData, size_t * out_bytesRead)
void
d2atmastash_destroy
(
d2atmastash
* stash)
CHECK_RESULT d2err
d2itemreader_open_file
(
d2itemreader_stream
* stream, const char * filepath,
d2gamedata
* gameData)
CHECK_RESULT d2err
d2itemreader_open_buffer
(
d2itemreader_stream
* stream, const uint8_t *const data, size_t dataSizeBytes,
d2gamedata
* gameData)
void
d2itemreader_close
(
d2itemreader_stream
* stream)
const uint8_t *
d2itemreader_dump_last_item
(
d2itemreader_stream
* stream, size_t * out_itemSizeBytes)
size_t
d2itemreader_bytepos
(
d2itemreader_stream
* stream)
CHECK_RESULT bool
d2itemreader_next
(
d2itemreader_stream
* stream,
d2item
* item)
Get the next item in the stream
stream
A pointer to an open d2itemreader_stream.
item
If this function returns true
, set to the parsed item. If this function returns false
, *item
remains uninitialized.
true
on success, false
on error or no more items. On error, stream->err != D2ERR_OK
. On no more items, stream->parseState == PARSE_STATE_FINISHED
.
CHECK_RESULT bool
d2itemreader_next_but_stop_on
(
d2itemreader_stream
* stream,
d2item
* item,
d2itemreader_parse_state
stopOn)
Get the next item in the stream
but stop if the stopOn
parse state is hit at any point.
stream
A pointer to an open d2itemreader_stream.
item
If this function returns true
, set to the parsed item. If this function returns false
, *item
remains uninitialized.
stopOn
The parse state to check for.
true
on success; false
on error, no more items, or stopOn
being hit. On error, stream->err != D2ERR_OK
. On no more items, stream->parseState == PARSE_STATE_FINISHED
. On stop, stream->parseState == onStop
.
bool
d2itemreader_seek_parse_state
(
d2itemreader_stream
* stream,
d2itemreader_parse_state
state)
Seek the stream
until the specified state
is hit or an error occurs. Will never seek past PARSE_STATE_ITEM_READY
or PARSE_STATE_FINISHED
states.
stream
A pointer to an open d2itemreader_stream.
state
The parse state to check for.
true
on success, false
on error while seeking (check stream->err for the error)
bool
d2itemreader_seek_valid_item
(
d2itemreader_stream
* stream)
Seek the stream
until it is ready to read a valid item. Similar to d2itemreader_seek_parse_state
but will skip over empty item lists.
stream
A pointer to an open d2itemreader_stream. true
on success, false
on error while seeking (check stream->err for the error)
d2atmastash
ATMA Stash (.d2x)
Members | Descriptions |
---|---|
d2itemlist items |
|
d2atmastash_info info |
d2atmastash_info
Members | Descriptions |
---|---|
uint16_t fileVersion |
|
uint16_t expectedNumItems |
d2char
Character Save File (.d2s)
Members | Descriptions |
---|---|
d2itemlist items |
|
d2itemlist itemsCorpse |
|
d2itemlist itemsMerc |
|
d2char_info info |
d2char_info
Members | Descriptions |
---|---|
bool isExpansion |
|
uint32_t fileVersion |
|
uint32_t mercID |
|
bool isDead |
d2ear
Members | Descriptions |
---|---|
uint8_t classID |
class of the player |
uint8_t level |
level of the player |
char name [D2_MAX_CHAR_NAME_BYTELEN] |
null-terminated player name |
d2gamedata
Members | Descriptions |
---|---|
uint16_t initState |
|
strset_t * armorsSet |
|
strset_t * weaponsSet |
|
strset_t * stackablesSet |
|
d2gamedata_itemstat itemstats [D2DATA_MAX_ITEMSTATCOST_IDS] |
d2gamedata_itemstat
Members | Descriptions |
---|---|
uint16_t id |
|
uint8_t encode |
|
uint16_t saveBits |
|
int16_t saveAdd |
|
uint16_t saveParamBits |
|
uint16_t nextInChain |
|
uint16_t charSaveBits |
d2gamedatabufs
See also: d2gamedata_init_bufs()
Members | Descriptions |
---|---|
char * armorTxt |
|
size_t armorTxtSize |
|
char * weaponsTxt |
|
size_t weaponsTxtSize |
|
char * miscTxt |
|
size_t miscTxtSize |
|
char * itemStatCostTxt |
|
size_t itemStatCostTxtSize |
d2gamedatafiles
See also: d2gamedata_init_files()
Members | Descriptions |
---|---|
const char * armorTxtFilepath |
|
const char * weaponsTxtFilepath |
|
const char * miscTxtFilepath |
|
const char * itemStatCostTxtFilepath |
d2item
Members | Descriptions |
---|---|
bool identified |
|
bool socketed |
|
bool isNew |
|
bool isEar |
|
bool starterItem |
|
bool simpleItem |
|
bool ethereal |
|
bool personalized |
|
bool isRuneword |
Diablo II does not save any info that directly maps an item to a Runes.txt row. Instead, which runeword the item has is determined by the runes socketed in it, and can be checked against Runes.txt's RuneX columns (in order) to determine which row matches the item's runes |
uint8_t version |
0 = pre-1.08, 1 = classic, 100 = expansion, 101 = expansion 1.10+ |
uint8_t locationID |
see the d2location enum |
uint8_t equippedID |
see the d2equiplocation enum |
uint8_t positionX |
the x coordinate of the item |
uint8_t positionY |
the y coordinate of the item |
uint8_t panelID |
the ID of the page the item is on (main inventory, stash, cube, etc). only set if the item's locationID != D2LOCATION_STORED |
d2ear ear |
only initialized if isEar is true. NOTE: Anything below this will be uninitialized when isEar is true |
char code [D2_ITEM_CODE_BYTELEN] |
null-terminated item code, typical string length is 3-4 characters. note: space characters are treated as NUL characters when parsing this string |
uint8_t numItemsInSockets |
Number of items that are socketed within this item. |
d2itemlist socketedItems |
List of items socketed within this item. |
uint32_t id |
random unique ID assigned to this item typically displayed using printf("%08X", id) |
uint8_t level |
item level |
uint8_t rarity |
see the d2rarity enum |
bool multiplePictures |
|
uint8_t pictureID |
|
bool classSpecific |
|
uint16_t automagicID |
only set if classSpecific is true automagicID = the row in automagic.txt, where the first non-header row is ID 0, and no rows are skipped when incrementing ID |
uint8_t lowQualityID |
see d2lowquality enum |
uint8_t superiorID |
related in some way to qualityitems.txt, unsure what the ID <-> row mapping is |
uint16_t magicPrefix |
magicPrefix = the row in MagicPrefix.txt, where the first non-header row is ID 1, and only the "Expansion" row is skipped when incrementing ID (ID 0 is no prefix) |
uint16_t magicSuffix |
magicSuffix = the row in MagicSuffix.txt, where the first non-header row is ID 1, and only the "Expansion" row is skipped when incrementing ID (ID 0 is no suffix) |
uint16_t setID |
setID = the row in SetItems.txt, where the first non-header row is ID 0, and only the "Expansion" row is skipped when incrementing ID |
uint16_t uniqueID |
uniqueID = the row in UniqueItems.txt, where the first non-header row is ID 0, and only the "Expansion" row is skipped when incrementing ID |
uint8_t nameID1 |
rare or crafted prefix nameID1 = the row in RarePrefix.txt, where the first non-header row is (the max ID in RareSuffix.txt)+1, and no rows are skipped when incrementing ID for example, with the default txt files: |
uint8_t nameID2 |
nameID2 = the row in RareSuffix.txt, where the first non-header row is ID 1, and no rows are skipped when incrementing ID (ID 0 is no suffix) |
uint16_t rarePrefixes [D2_MAX_RARE_PREFIXES] |
list of magic prefixes used by this rare/crafted item (see magicPrefix) |
uint8_t numRarePrefixes |
|
uint16_t rareSuffixes [D2_MAX_RARE_SUFFIXES] |
list of magic suffixes used by this rare/crafted item (see magicSuffix) |
uint8_t numRareSuffixes |
|
char personalizedName [D2_MAX_CHAR_NAME_BYTELEN] |
null-terminated name, not including the 's suffix added by the game |
bool timestamp |
|
uint16_t defenseRating |
the armor value; only set if the item code is in Armor.txt |
uint8_t maxDurability |
only set if the item code has durability (i.e. is in Armor.txt or Weapons.txt) but can be 0 for items that don't have durability (i.e. phase blade) |
uint8_t currentDurability |
only set if maxDurability > 0 |
uint16_t quantity |
only set for stackable items (i.e. the stackable column in its .txt is 1) |
uint8_t numSockets |
number of total sockets in the item (regardless of their filled state) |
d2itemproplist magicProperties |
list of magic properties, not including set bonuses, runeword properties, or the properties of any socketed items |
d2itemproplist setBonuses [D2_MAX_SET_PROPERTIES] |
List of per-item set bonuses (i.e. green bonuses, not the overall set bonuses). These are always set even when the bonuses are not active. |
uint8_t setBonusesBits |
Bit field containing the position of valid elements in the setBonuses array. |
d2itemproplist runewordProperties |
list of magic properties added to the item via a runeword (see also isRuneword ) |
d2itemlist
Members | Descriptions |
---|---|
d2item * items |
|
size_t count |
|
size_t _size |
d2itemprop
Members | Descriptions |
---|---|
uint16_t id |
|
int params [D2_ITEMPROP_MAX_PARAMS] |
|
int numParams |
d2itemproplist
Members | Descriptions |
---|---|
d2itemprop * properties |
|
size_t count |
|
size_t _size |
d2itemreader_source
Members | Descriptions |
---|---|
const uint8_t * data |
|
size_t dataSizeBytes |
|
size_t curByte |
|
bool dataNeedsFree |
d2itemreader_state
Members | Descriptions |
---|---|
d2itemreader_parse_state parseState |
|
uint32_t curPage |
|
uint32_t numPages |
|
uint16_t curItem |
|
uint16_t numItems |
|
size_t lastItemSize |
d2itemreader_stream
Members | Descriptions |
---|---|
d2itemreader_source source |
|
d2gamedata * gameData |
|
d2err err |
|
d2filetype filetype |
|
d2itemreader_state state |
|
union d2itemreader_stream::@0 info |
|
d2stashpage curPage |
|
d2char_section curSection |
d2personalstash
PlugY Personal Stash (.d2x)
Members | Descriptions |
---|---|
d2itemlist * itemsByPage |
|
d2stashpage * pages |
|
uint32_t numPages |
|
d2personalstash_info info |
d2personalstash_info
Members | Descriptions |
---|---|
uint16_t fileVersion |
|
uint32_t expectedNumPages |
d2sharedstash
PlugY Shared Stash (.sss)
Members | Descriptions |
---|---|
d2itemlist * itemsByPage |
|
d2stashpage * pages |
|
uint32_t numPages |
|
d2sharedstash_info info |
d2sharedstash_info
Members | Descriptions |
---|---|
uint16_t fileVersion |
|
uint32_t sharedGold |
|
uint32_t expectedNumPages |
d2stashpage
Members | Descriptions |
---|---|
uint32_t pageNum |
|
uint32_t flags |
|
char name [D2_MAX_STASH_PAGE_NAME_BYTELEN] |
Generated by Moxygen