REDIVIVUS

Proposals / #1012

Recover the Mac skill-level wrapper's signed 32-bit result

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

Ghidra vmac 111 · 3cfe190

Mac0018849e returns literal0 for a null Unit or the unchanged fullEAX numeric level from18608e. That complete helper reads the existing int nLevel field, adds a bonus, clamps with TEST/CMOVNS and uses a signedCMP/JGE; the actual caller forwards all32bits as the level to scalar damage calculations. Recover int32_t while preserving both precise existing inputs, selected function/parameter/local names, stack slots and __cdecl. Complete native lookup/owner/registry routes verify the actual inputs. No table/global/inner-helper contract, ABI reset or behavioral change.

Changes 1, applied together

  1. Set prototype mac 0x0018849e

    signatureundefined SKILLS_GetSkillLevelByEnum(D2UnitStrc * pUnit, eD2Skills nSkillId)→int32_t SKILLS_GetSkillLevelByEnum(D2UnitStrc * pUnit, eD2Skills nSkillId)
    convention__cdecl