REDIVIVUS

Proposals / #1694

Restore void returns for the two Mac switched-skill setters

checked · by eejitgames · submitted 2026-11-08

Mac 00192dc6 and 00192e28 retain undefined return types. Their complete native bodies match Windows 00623300 and 00623350, whose APIs return void: identical player guards, skill/owner field stores and assert lines 0x14a8/0x14b7. Mac leaves the unit pointer or owner GUID in EAX; corresponding Windows player paths leave the player-data pointer. These residues are not a shared result. Both known Mac calls pass three DWORDs and discard EAX. Change only the two return types to void, preserving inputs, chosen names and Mac cdecl rather than copying Windows RET12.

Changes 2, applied together

  1. Set prototype mac 0x00192dc6

    signatureundefined UNITS_SetSwitchLeftSkill(D2UnitStrc * pUnit, eD2Skills eSkillId, int nOwnerGUID)→void UNITS_SetSwitchLeftSkill(D2UnitStrc * pUnit, eD2Skills eSkillId, int nOwnerGUID)
    convention__cdecl
  2. Set prototype mac 0x00192e28

    signatureundefined UNITS_SetSwitchRightSkill(D2UnitStrc * pUnit, eD2Skills eSkillId, int nOwnerGUID)→void UNITS_SetSwitchRightSkill(D2UnitStrc * pUnit, eD2Skills eSkillId, int nOwnerGUID)
    convention__cdecl