Expand description

Implementation of the DBC (DataBaseClient) file format for World of Warcraft 1.12, 2.4.3.8606, and 3.3.5.12340. This is auto generated from .xml files in the github repository.

DBC files are inside the MPQ files that are included with the client. This library does not deal with MPQ files. You will have to extract the DBC files from the MPQ using another tool.

Usage

The vanilla_tables, tbc_tables, and wrath_tables modules contain submodules with table definitions. Each table always has two types (using vanilla_tables::item_class as an example):

  1. The table: ItemClass. Which implements DbcTable.
  2. The table row: ItemClassRow. Which is accessed through DbcTable::rows.

Tables that have a primary key additionally have a type suffixed with Key (ItemClassKey), and the table (ItemClass) implements the Indexable trait.

Gender and SizeClass are in the crate root because they are used in multiple tables and have been de-duplicated in order to reduce the amount of types in the crate.

Installation

Add the following to your Cargo.toml:

[dependencies]
wow_dbc = { version = "0.2", features = ["vanilla", "tbc", "wrath"] }

Or add it with cargo edit:

cargo add wow_dbc --features "vanilla tbc wrath"

Features

By default no features are enabled. The following features are valid:

  • vanilla, for 1.12 client data.
  • tbc, for 2.4.3.8606 client data.
  • wrath, for 3.3.5.12340 client data.

To add only a specific version, remove the unneeded ones from the features list above.

Tests

Published builds do not have any tests for individual tables, but these can be built by changing BUILD_TESTS in rxml/src/main.rs of the repository. These require the original DBC files from the client which can not be republished. The DBC files must be placed in the root of the repository.

Modules

Structs

DBCs from the English version of the game will only have English version strings, while other localizations will have other languages.
Error for values outside of allowed enumerators.
DBCs from the English version of the game will only have English version strings, while other localizations will have other languages.

Enums

Main error enum. Returned from crate::DbcTable::read.
Errors from reading the header of the DBC file.

Traits

Main trait for the crate. Implemented by all tables in vanilla_tables.
Implemented by tables that have a primary key.