benilla-re systems structs docs

QuestCacheGetRecord

function · dbcache · orchestration

Address
0x562a40 · 534 bytes, up to 0x562c55
Signature
void * __thiscall (void *this, uint32_t key, uint64_t *owner, void *callback, void *data, bool dedupe)
Meaning
Returns a quest record by id, or keeps a callback and sends the cache query on a miss
Confidence
verified, proof two
Finding
dbcache/overview#asking-for-a-record

Finding: Asking for a record in dbcache: overview

A lookup takes a key, a pointer to the caller's 64-bit id, a callback, its data and a flag. A zero key returns null. A node that is valid returns its record, with nothing touched. Otherwise, with no callback it returns null and sends nothing. With one, a node is made if absent, the callback is added unless the flag is set and an equal one (same function and data) is there, and for a new node the query is sent: the cache's opcode, the key and, when the owner flag +0x38 is set, the caller's id. A pending node leaves the query to the first caller. Eleven lookups are copies of one body; the table gives their node offsets.

lookupcacheowner flagkey copyvalid bytecallback list
creature 0x556aa00xc0e3541+0x4c+0x50+0x54
game object 0x5585600xc0e3181+0x94+0x98+0x9c
item name 0x559fe00xc0e2dc1+0x1c+0x20+0x24
item 0x55ba300xc0e2a01+0x1ec+0x1f0+0x1f4
NPC text 0x55d5300xc0e2641+0x158+0x15c+0x160
guild 0x560e300xc0e1ec0+0x310+0x314+0x318
quest 0x562a400xc0e1b00+0x18f4+0x18f8+0x18fc
page text 0x5647300xc0e1741+0x41c+0x420+0x424
pet name 0x5662400xc0e1381+0x70+0x74+0x78
petition 0x567d600xc0e0fc1+0x13e0+0x13e4+0x13e8
item text 0x5699800xc0e0c01+0x1f58+0x1f5c+0x1f60

The derivation is in the doc.

Callers 42

Callees 8

Calls and jumps by a bare address, from tables/calls.tsv.