benilla-re systems structs docs

Script::SetPreferredInfo

function · glue · primitive

Address
0x46f2c0 · 110 bytes, up to 0x46f32d
Signature
int __fastcall (lua_State *L)
Meaning
Maps a category ordinal and reads two type flags into the realm suggestion
Confidence
verified, proof one
Name from
the community database (idb)
Finding
glue/realms#the-realm-suggestion

Finding: The realm suggestion in glue: the realm list

SetPreferredInfo(category, pvp, rp) maps the ordinal (0x46edf0), reads pvp and rp as integers, and calls 0x46ea20. That stores the index in 0x837e98 (above the count, 0), the category's id in 0x837e9c, and pvp and rp in 0xb41fa8 and 0xb41fac, unread. Skipping realms with flag 0x01, it suggests:

  1. the category's first realm whose type's first Cfg_Configs row has the asked pvp and rp (a type with no row counts as 0 and 0);
  2. else the category's first realm;
  3. else the first realm matching as in 1 in any category.

A suggestion signals SUGGEST_REALM (18) with "%d%d", the index plus 1 and the position plus 1; none signals OPEN_REALM_LIST (9). A pvp or rp of 2 matches nothing.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 7

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