Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
/*
1 Signature String (4-bytes) string, always 'WDBC'
2 Records Integer (4-bytes) number of records in the file
3 Fields Integer (4-bytes) number of fields per record
4 Record Size Integer (4-bytes) Fields*FieldSize (FieldSize is usually 4, but not always)
5 String Block Size Integer (4-bytes) Size of the string block
*/
int nPtr = Memory.ReadInteger(Convert.ToInt32("0xC01AF4", 16));
int nRecords = Memory.ReadInteger(Convert.ToInt32("0xC01AF4", 16) + 4);
int nRows = Memory.ReadInteger(Convert.ToInt32("0xC01AF4", 16) + 8);
int nLastEntry = Memory.ReadInteger(Convert.ToInt32("0xC01AF4", 16) + 12); // Last entry?
// 1625 records for GameObjectDisplayInfo.dbc
Console.WriteLine("nRecords: " + nRecords);
// We foreach through nRecords using "i" as our "id" entry.
for (int i = 0; i < nRecords; i++)
{
// * 4 would the first row? I'm unable to find an actual row count.
int nRow = Memory.ReadInteger(nRows + i * 4);
// 48 is record size as per:
// http://www.hackwow.com/wiki/GameObjectDisplayInfo.dbc
int nField = Memory.ReadInteger(nRow + 48 * 4);
Console.WriteLine("Field: " + Memory.ReadString(nField, 128));
}
nRecords: 1625
Field:
Field:
Field: Scorpid Worker
Field: 0
Field: LumberPile
Field:
Field: Mottled Boar
Field:
Field:
..
Memory.ReadInteger(Convert.ToInt32("0xC01AF4", 16) + 4);
.text:0053A4B7 mov ecx, offset dword_C01AF4 <-
.text:0053A4BC call sub_53FB10
1 to 1 of 1