DB/CharBaseInfo

From wowdev
Jump to navigation Jump to search

Defines availability of classes for the different races. Please note that this DBC does not have the typical 4 byte columns only!

Classic

0.5.3.3368

struct CharBaseInfoRec {
  uint8_t m_raceID;
  uint8_t m_classID;
  foreign_key<uint32_t, &ChrProficiencyRec::m_ID> m_proficiency;
};

1.12.1.5875, 2.4.3.8606, 3.3.5a.12340

struct CharBaseInfoRec {
  uint8_t m_raceID;
  uint8_t m_classID;
};

Wrath

3.0.2.8905-3.3.5.12340

Table

Column Field Type Notes
1 ChrRaces iRefID Allow for this race...
2 ChrClasses iRefID this class.


Warlords

6.0.1.18179

Struct

struct CharBaseInfoRec {
  uint8_t padding_0[4];
  uint8_t m_raceID;
  uint8_t m_classID;
  uint8_t padding_1[2];
};

Editing CharBaseInfo.dbc

The easiest way is to open it in a hex editor. No DBC-Editor beside Tallis supports this type of file. This is no longer the case with the current generation of DBC editors.

The structure is particularly easy, as described in DBC. The first 20 bytes are the header and are to be ignored. Most important, the uint32 at 0x4 defines the count of entries. After that, starting at 0x14, the entries start. There for each entry, it will be 4 bytes for a unique id (which can be ignored), then two bytes for the actual data, one for race, one for class, then two bytes to be ignored.

 0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
57 44 42 43 06 00 00 00 02 00 00 00 02 00 00 00
01 00 00 00 01 01 01 02 01 03 02 01 02 03 04 06
00

The italic text stays the same (it is the header). Note that the uint32 at 0x4 would be the count of pairs, each combination line of Race and Class raise the counter by 1. 001xByte[5] begins the first pairing. This file would contain:

Race Class
01   01
01   02
01   03
02   01
02   03
04   06

After all records, there will be an additional 0x00, which is the empty string block of the DBC file.

--Ascathos (talk) 09:38, 4 May 2015 (UTC)