benilla-re systems structs docs

Script::GetNumQuestLogRewards

function · ui · primitive

Address
0x4e09e0 · 137 bytes, up to 0x4e0a68
Signature
int __fastcall (lua_State *L)
Meaning
Returns the number of fixed reward items of the selected quest
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/questlogverbs#reward-lists

Finding: Reward lists in ui: quest log verbs on the selected quest

GetNumQuestLogRewards() counts the nonzero reward ids from the start of the four and GetNumQuestLogChoices() those of the six, each 0 for an uncached template. A quest whose four reward ids are all nonzero reports 0 rewards, because the count is stored only when the scan meets a zero; six choices report 6. GetQuestLogRewardInfo(i) and GetQuestLogChoiceInfo(i) return five values from the cached item record: name, icon path, count, quality (the record's quality when its inventory type is nonzero, else -1) and 1 when the player can use the item, else nil. An index outside the list, a zero id or an uncached item returns nil, nil, 1, 0, nil. Both raise Usage: GetQuestLogRewardInfo(index), the choice function too.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 2

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