Mac PARTY_ForEachPartyMember: void return, typed callback (fpExecuteOnUnitFunction*) and void* pArg
Mac 0x00276faf is __cdecl but its return is "undefined" and the callback/arg are untyped (undefined*, undefined4). The body calls [EBP+0x10] indirectly (CALL EBX at 0x00277005) with [ESP]=pGame, [ESP+4]=member player unit (from 0x0027905c), [ESP+8]=[EBP+0x14] (pArg): exactly fpExecuteOnUnitFunction (BOOL __cdecl (D2GameStrc*, D2UnitStrc*, int32_t)), the type IteratePlayerOrMonsterUnits already uses. The callback result is ignored and EAX is not set on the exit paths (0x0027700e), so the function returns void. Callers such as Q21_PartySetGoldenBirdState pass 4 dwords.
Changes 1, applied together
Set prototype
mac 0x00276fafsignatureundefined PARTY_ForEachPartyMember(D2GameStrc * pGame, short nPartyId, undefined * pfnCallback, undefined4 pArg)→void PARTY_ForEachPartyMember(D2GameStrc * pGame, short nPartyId, fpExecuteOnUnitFunction * pfnCallback, void * pArg)convention__cdecl