REDIVIVUS

Proposals / #699

Recover the unit and GUID contracts of Mac summon-owner accessors

applied · by Commit-Will · submitted 2026-11-01, applied 2026-11-01

Ghidra vmac 105 · 3bccb89

These helpers access unit->pUnitData+0x40. Their sole caller SKILL_CreateSummon gets the owner from existing D2MonsterCastPetStrc.pPlayer+4. All three calls pass that same unit pointer. The setter receives either0xffffffff or the new monster's full GUID from unit+0xc. Getter returns the stored dword in full EAX; caller immediately passes it as FindUnitFromTable's uint32_t GUID, with unit type1. This proves D2UnitStrc* inputs and uint32_t value/return, rather than integer addresses or an unknown-byte getter. Complete70/65-byte helpers,889-byte caller and116-byte lookup independently verified from original Mac database bytes. Preserve both FUN names, parameter names, cdecl slots and unknown setter return. No new necromancer-only identity, name, shared-field change or runtime benefit inferred. LINKEDIT DATA refs are nonexecutable.

Changes 3, applied together

  1. Retype variable mac 0x0027ace9 Stack[0x4]

    typeint→D2UnitStrc *
  2. Retype variable mac 0x0027ace9 Stack[0x8]

    typeundefined4→uint32_t
  3. Set prototype mac 0x0027ad2f

    signatureundefined FUN_0027ad2f(int pUnit)→uint32_t FUN_0027ad2f(D2UnitStrc * pUnit)
    convention__cdecl