REDIVIVUS

Proposals / #1227

Mac NPC_BeginInteraction: uint32_t __cdecl (pGame, pPlayer, pNpcUnit, pAi, nQuestActionType)

checked · by KierTaylor · submitted 2026-11-05

Mac 0x001d90d2 is "undefined (void)", convention unknown. Five cdecl stack args, no ECX/EDX on entry, plain RET 0x001d930a: [EBP+8] game and [EBP+0xc] player passed to GetInteractedNpc (0x0027aa17, (D2GameStrc* pGame, D2UnitStrc* pUnit)) at 0x001d90f3; [EBP+0x10] the NPC unit (NULL-checked at 0x001d9100); [EBP+0x14] the AI block (dereferenced at 0x001d90e1/0x001d9202); byte [EBP+0x18] (MOVZX at 0x001d92d8) the quest action. Same five values as Windows twin 0x00572c10 uint32_t (pGame, D2MonsterAiStrc* pAi, uint8_t questActionType, D2UnitStrc* pPlayer, D2UnitStrc* pNpcUnit), in Mac stack order; the byte gets an n prefix as the checker requires.

Changes 1, applied together

  1. Set prototype mac 0x001d90d2

    signatureundefined NPC_BeginInteraction(void)→uint32_t NPC_BeginInteraction(D2GameStrc * pGame, D2UnitStrc * pPlayer, D2UnitStrc * pNpcUnit, D2MonsterAiStrc * pAi, uint8_t nQuestActionType)
    conventionunknown→__cdecl