REDIVIVUS

Proposals / #1084

Type quest helpers' integer parameters as the quest data their callers pass

checked · by dtchitt · submitted 2026-11-03

Ten quest helper parameters are typed int32_t, so the source reads *(int*)(pA5Q5Data + 0x40) and casts at every caller. Each holds the struct its callers pass, and every offset its body reads is a field of that struct at the width used. Q35_ResetAncientsArena reads 0x20 to 0x50 of D2QuestDataA5Q5Strc (anAncientMonsterGUID to nAltarGUID). Q05_SpawnCountessDeathEffect reads 0x68, 0x88, 0x110 to 0x119 of D2QuestDataA1Q5Strc. Q26_CheckIzualProximity reads pIzualUnit (0x14) of D2QuestDataA4Q1Strc. The D2QuestDataStrc ones read pGame (0x4), 0x9 and pQuestSpecificData (0x18). Q31_SetCompleteForPartyMember's ECX is the game: it reads nDifficulty (0x6d). Q04_UpdateCainNpcAnimState's ECX is named pCainUnit but holds the quest data; the tool won't rename a chosen name, so that is left to review.

Changes 10, applied together

  1. Retype variable win 0x005954f0 Stack[0x8]

    typeint32_t→D2QuestDataA1Q5Strc *
  2. Retype variable win 0x0058c000 Stack[0x8]

    typeint32_t→D2QuestDataStrc *
  3. Retype variable win 0x0058c000 ESI

    typeint32_t→D2QuestDataA5Q5Strc *
  4. Retype variable win 0x0059b710 ECX

    typeint32_t→D2QuestDataStrc *
  5. Retype variable win 0x00594060 ECX

    typeint32_t→D2QuestDataStrc *
  6. Retype variable win 0x00592090 ECX

    typeint32_t→D2QuestDataStrc *
  7. Retype variable win 0x0058a2a0 EDI

    typeint32_t→D2QuestDataStrc *
  8. Retype variable win 0x005b43d0 Stack[0x4]

    typeint32_t→D2QuestDataA4Q1Strc *
  9. Retype variable win 0x005871c0 ECX

    typeint32_t→SGAMEDATA *
  10. Retype variable win 0x0059ac80 ECX

    typeint32_t→D2QuestDataStrc *