benilla-re systems structs docs

Script::GetXPExhaustion

function · ui · primitive

Address
0x48d3f0 · 189 bytes, up to 0x48d4ac
Signature
int __fastcall (lua_State *L)
Meaning
Returns the rested experience pool times the first row's factor, or nil
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/rested#experience-bonus
Test
ui::luabind_48d3f0_xp_exhaustion

Finding: Experience bonus in ui: rested experience functions

GetXPExhaustion() returns the rested pool times the factor of the row with id 1, as a number. The pool is the unsigned dword PLAYER_REST_STATE_EXPERIENCE at +0xf6c of the player block. With no row for id 1 the call faults: fmul [edx+8] (0x48d484) reads the row without a null test. The result is nil for an absent player and for every rest state byte except 1; a rested player with an empty pool gets 0. The factor is the table's, not a constant, and does not depend on the current state's row. When the unit field array's GUID differs from the active player's the pool counts as 0.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 4

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