REDIVIVUS

Proposals / #790

Resolve the Mac weapon-GUID getter to its full integer return

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

Ghidra vmac 110 · 9528519

Mac00192f1a UNITS_GetWeaponGUID has an unresolved undefined return. Its complete75-byte body returns full EAX from the existing signed int playerData.nWeaponGUID field at+144. The native setter independently copies an item unit's signed four-byte GUID into that field (or stores0), and the only caller uses the full result as an item GUID for unit lookup. Restore int32_t, matching the existing field widths and the independently verified Windows counterpart, while preserving pUnit, its declared type, one cdecl stack slot, plain RET and all other definitions. No setter prototype, chosen name, shared field or enum is changed. Static metadata correction only; no runtime, build or byte-match gain is claimed.

Changes 1, applied together

  1. Set prototype mac 0x00192f1a

    signatureundefined UNITS_GetWeaponGUID(D2UnitStrc * pUnit)→int32_t UNITS_GetWeaponGUID(D2UnitStrc * pUnit)
    convention__cdecl