benilla-re systems structs docs

Script::GetQuestItemInfo

function · ui · primitive

Address
0x501f80 · 271 bytes, up to 0x50208e
Signature
int __fastcall (lua_State *L)
Meaning
Returns the name, icon, count, quality and usability of a quest dialog item
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/questpanel#counting-and-describing-items

Finding: Counting and describing items in ui: quest panel state and the quest dialog verbs

GetNumQuestRewards() and GetNumQuestChoices() count the leading records whose item id is nonzero, and GetNumQuestItems() counts the leading records whose required display id (not the item id) is nonzero, so a required item with display id 0 ends the count. GetQuestItemInfo(type, index) takes "reward", "choice" or "required" and a 1-based index and returns the name, the icon path, the count, the quality and 1 when the player can use the item, else nil; a missing or wrongly typed argument, an unknown type and an index of 8 or more raise Invalid quest item in GetQuestItemInfo("type", index) (0x501f98, 0x501fac, 0x502000). The index test is ja 6 after the decrement (0x501719), so index 7 is accepted and reads past the sixth record.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 10

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