[DiscordArchive] how do you find the primary key using just the DBRecord pointer?
[DiscordArchive] how do you find the primary key using just the DBRecord pointer?
Archived author: Azarchius • Posted: 2023-08-06T20:23:34.172000+00:00
Original source
but I don't have that, where would I know what that is?
Archived author: Azarchius • Posted: 2023-08-06T20:23:57.141000+00:00
Original source
is the record ptr significant in relation to some other pointer in order to deduce a record number?
Archived author: Azarchius • Posted: 2023-08-06T20:24:37.666000+00:00
Original source
this function call blizzard uses to find records using the relation returns a pointer directly; from what I can see there _is_ some kind of table that is maybe a record index + relation (16bit)
Archived author: Azarchius • Posted: 2023-08-06T20:24:46.439000+00:00
Original source
but it doesn't seem to match up to the order of the actual records
Archived author: Azarchius • Posted: 2023-08-06T20:25:27.359000+00:00
Original source
but perhaps the order of the index is not the order of the records
Archived author: Azarchius • Posted: 2023-08-06T20:25:42.325000+00:00
Original source
you'd think the order of the index would be in ascending order or something though
Archived author: MaxWilson • Posted: 2023-08-06T20:29:17.353000+00:00
Original source
record index is just the record number in order
Including encrypted sections (with TactID != 0). It is needed to allocate memory for data; index * _header->RecordSize
```DB2Record DB2FileLoaderRegularImpl::GetRecord(uint32 recordNumber) const
{
return DB2Record(*this, recordNumber, nullptr);
}```
Archived author: Azarchius • Posted: 2023-08-06T20:29:46.060000+00:00
Original source
yeah I know how to use the index
Archived author: Azarchius • Posted: 2023-08-06T20:29:48.005000+00:00
Original source
I know what it is
Archived author: Azarchius • Posted: 2023-08-06T20:29:58.262000+00:00
Original source
If I had it I wouldn't have a problem is what I'm saying :p