REDIVIVUS

Proposals / #1258

Mac DAMAGE_RemoveObjectAtSameCoords: void __fastcall (D2UnitStrc* pUnit ECX, int32_t nClassId EDX)

checked · by KierTaylor · submitted 2026-11-06

The Mac prologue keeps ECX in EDI (pUnit: its room's unit list is walked and its coords are compared) and saves EDX to [EBP-0x24] (nClassId, compared with each object's class id at +4). There are no stack-arg reads; it removes the matching type-2 object and ends in a plain RET with no return. The caller SERVER_KillMonster 0x0027eaf6 loads ECX=ESI (the monster) and EDX=0x23b (an object class id). The Windows twin 0x0057cc30 has the same roles (nClassId stack, pUnit EBX).

Changes 1, applied together

  1. Set prototype mac 0x0027eb03

    signatureundefined DAMAGE_RemoveObjectAtSameCoords(void)→void DAMAGE_RemoveObjectAtSameCoords(D2UnitStrc* pUnit, int32_t nClassId)
    conventionunknown→__fastcall