benilla-re systems structs docs

CompareLfgEntries

function · ui · orchestration

Address
0x4e8b20 · 180 bytes, up to 0x4e8bd3
Meaning
Orders two LfgDungeons ids: existing rows, then rows fitting the player's level, then by name
Confidence
verified, proof one
Finding
ui/lfg#the-type-lists
Test
ui::sortcmp_4e8b20

Finding: The type lists in ui: looking for group

The table LfgDungeons (store 0xc0db2c, 14 fields, 56-byte rows) is grouped by its type word at +0x30: the start-up function 0x4e7c70 copies each row's id into the dynamic array of its type, six lists of 12 bytes at 0xbc6f90. Type 3 is the quest list, 20 slots filled from the quest log. 0x4e89c0 recounts the lists for the player: a row counts when the player's level lies in [MinLevel, MaxLevel] (+0x28, +0x2c) and its side word (+0x34) is negative or equals the player's side, 0 for a faction template with flag 0x4, 1 for flag 0x2, else -1. The counts go to the six words at 0xbc6f18, each list is sorted by 0x4e8b20, and UPDATE_LFG_TYPES is signalled.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 1

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