benilla-re systems structs docs

Script::CompleteQuest

function · ui · orchestration

Address
0x501d70 · 8 bytes, up to 0x501d77
Signature
int __fastcall (lua_State *L)
Meaning
Requests the reward of the open progress panel
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/questpanel#completing-and-choosing

Finding: Completing and choosing in ui: quest panel state and the quest dialog verbs

IsQuestCompletable() returns 1 when the request is flagged completable, a player exists and the player carries each of the six required items in the required count, else nil. CompleteQuest() acts only in a progress panel (kind 2) with the latch clear and a player: it sends CMSG_QUESTGIVER_REQUEST_REWARD for the giver and quest, then sets the latch. GetQuestReward([choice]) acts only in a reward panel (kind 3): with the latch clear and a player it checks a 1-based choice against the number of choices, stores the chosen item id, sends CMSG_QUESTGIVER_CHOOSE_REWARD with the 0-based choice (0 for none) and sets the latch.

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.