REDIVIVUS

Proposals / #836

Mac: retype pClient to D2ClientStrc * in seven CLIENTS_* accessors

applied · by Captain-Fwiffo · submitted 2026-11-02, applied 2026-11-02

Ghidra vmac 110 · 9528519

Seven Mac CLIENTS_* accessors take the game client as an int pClient (first stack parameter, __cdecl): CLIENTS_GetSaveChecksum, SetSaveChecksum, SetSaveLoadComplete, GetNext, GetExperienceLoss, PacketDataList_GetHead and GetCharSaveTransactionToken. Each reads or writes one field of that client; two hit named Mac D2ClientStrc fields exactly (GetNext returns +0x4a8 = pNext at 1192, PacketDataList_GetHead returns +0x1b8 = pDispatchList at 440), the others use offsets inside the struct (+0x18c, +0x504, +0x60, +0x3d4/+0x184/+0x188) whose Mac field names differ from the function names, so only the parameter type is claimed, not those field names. No Windows twin (inlined there); Mac names come from the function bodies. Same-width retypes; names kept. Mac callers were not traced.

Changes 7, applied together

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

    typeint→D2ClientStrc *
  2. Retype variable mac 0x001a9e6f Stack[0x4]

    typeint→D2ClientStrc *
  3. Retype variable mac 0x001aa793 Stack[0x4]

    typeint→D2ClientStrc *
  4. Retype variable mac 0x001aa8d4 Stack[0x4]

    typeint→D2ClientStrc *
  5. Retype variable mac 0x001aaa22 Stack[0x4]

    typeint→D2ClientStrc *
  6. Retype variable mac 0x001aab07 Stack[0x4]

    typeint→D2ClientStrc *
  7. Retype variable mac 0x001aab3d Stack[0x4]

    typeint→D2ClientStrc *