REDIVIVUS

Proposals / #750

Name the index, state, bit word and stat key parameters of five small helpers

applied · by dtchitt · submitted 2026-11-01, applied 2026-11-02

Ghidra v1805 · 8293ab3

Five one-parameter helpers whose job settles the name. INV_GetCharStatsTxtLine range-checks ECX and scales it by the 0xc4 charstats row, and its callers pass pUnit->nClassId. INV_GetUniqueItemsTxtLine scales ECX by the 0x14c row, and GFXUTIL_SetItemGfxFile passes ITEM_GetItemData_nFileIndex after checking quality 7. STATES_IsStateActive range-checks against the states count, as SKILLDRUID_ApplyTimedAuraBuff's nTxtStatesSize does, then tests that bit. FindFirstFreeBit inverts ECX and runs BSF on it. STATLIST_BinarySearchStatById compares EDI with the first dword of each 8-byte entry, the packed value proposal 601 calls nStatKey. Machine code only, not tested live.

Changes 5, applied together

  1. Rename variable win 0x004833e0 ECX

    namenParam→nClassId
  2. Rename variable win 0x00483470 ECX

    namenParam→nFileIndex
  3. Rename variable win 0x0063a4a0 Stack[0x8]

    namenParam→nStateId
  4. Rename variable win 0x00409220 ECX

    namenParam→dwBits
  5. Rename variable win 0x00624b90 EDI

    namenParam→nStatKey