Skip to content

Fully implement NPCs#514

Merged
ikkentim merged 7 commits into
mainfrom
copilot/fully-implement-npcs
May 10, 2026
Merged

Fully implement NPCs#514
ikkentim merged 7 commits into
mainfrom
copilot/fully-implement-npcs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

  • Update INPC.cs with all missing methods from open.mp API
  • Update INPCComponent.cs with all missing methods from open.mp API
  • Update INPCEventHandler.cs with all missing events from NPCEventHandler
  • Update api.cpp with all new C++ proxy functions and event handlers
  • Update NpcSystem.cs to handle all new events in the ECS system
  • Update Npc.cs ECS component with all new methods
  • Update INpcService.cs interface with new service methods
  • Update NpcService.cs implementation with new service methods
  • Fix proxy-api.hpp: extend _EXPAND_PARAM/_EXPAND_ARG/_EXPAND_INIT macros from 14 to 25 args, and fix pre-existing self-referential bugs in _EXPAND_PARAM10_EXPAND_PARAM14 (they called themselves instead of N-1)
  • Build and validate changes (solution builds with 0 errors, 0 warnings)

Copilot AI linked an issue May 4, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Implement all NPC functionalities in .Core library and ECS Fully implement NPCs May 4, 2026
Copilot AI requested a review from ikkentim May 4, 2026 12:51
@ikkentim
Copy link
Copy Markdown
Owner

ikkentim commented May 4, 2026

@copilot build failure; ptal

Errors

D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(424,42): error : unknown type name 'onNPCFinishMove'; did you mean 'onNPCFinishMove_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(402,1): message : 'onNPCFinishMove_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(53,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(424,59): error : unknown type name 'onNPCCreate'; did you mean 'onNPCCreate_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(403,1): message : 'onNPCCreate_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(60,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(424,72): error : unknown type name 'onNPCDestroy'; did you mean 'onNPCDestroy_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(404,1): message : 'onNPCDestroy_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(67,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(424,86): error : unknown type name 'onNPCSpawn'; did you mean 'onNPCSpawn_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(405,1): message : 'onNPCSpawn_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(74,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(424,98): error : unknown type name 'onNPCRespawn'; did you mean 'onNPCRespawn_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(406,1): message : 'onNPCRespawn_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(81,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(425,25): error : unknown type name 'onNPCWeaponStateChange'; did you mean 'onNPCWeaponStateChange_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(407,1): message : 'onNPCWeaponStateChange_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(88,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(425,49): error : unknown type name 'onNPCTakeDamage'; did you mean 'onNPCTakeDamage_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(408,1): message : 'onNPCTakeDamage_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(95,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(425,66): error : unknown type name 'onNPCGiveDamage'; did you mean 'onNPCGiveDamage_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(409,1): message : 'onNPCGiveDamage_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(102,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(425,83): error : unknown type name 'onNPCDeath'; did you mean 'onNPCDeath_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(410,1): message : 'onNPCDeath_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(109,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(426,25): error : unknown type name 'onNPCShotMissed'; did you mean 'onNPCShotMissed_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(411,1): message : 'onNPCShotMissed_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(116,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(426,42): error : unknown type name 'onNPCShotPlayer'; did you mean 'onNPCShotPlayer_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(412,1): message : 'onNPCShotPlayer_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(123,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(426,59): error : unknown type name 'onNPCShotNPC'; did you mean 'onNPCShotNPC_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(413,1): message : 'onNPCShotNPC_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(130,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(426,73): error : unknown type name 'onNPCShotVehicle'; did you mean 'onNPCShotVehicle_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(414,1): message : 'onNPCShotVehicle_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(137,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(426,91): error : unknown type name 'onNPCShotObject'; did you mean 'onNPCShotObject_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(415,1): message : 'onNPCShotObject_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(144,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(427,25): error : unknown type name 'onNPCShotPlayerObject'; did you mean 'onNPCShotPlayerObject_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(416,1): message : 'onNPCShotPlayerObject_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(151,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(427,48): error : unknown type name 'onNPCPlaybackStart'; did you mean 'onNPCPlaybackStart_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(417,1): message : 'onNPCPlaybackStart_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(158,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(427,68): error : unknown type name 'onNPCPlaybackEnd'; did you mean 'onNPCPlaybackEnd_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(418,1): message : 'onNPCPlaybackEnd_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(165,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(427,86): error : unknown type name 'onNPCFinishNodePoint'; did you mean 'onNPCFinishNodePoint_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(419,1): message : 'onNPCFinishNodePoint_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(172,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(428,25): error : unknown type name 'onNPCFinishNode'; did you mean 'onNPCFinishNode_fn'? [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(203,48): message : expanded from macro 'PROXY_EVENT_HANDLER_END' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(85,105): message : expanded from macro '_EXPAND_ARG' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\api.cpp(420,1): message : 'onNPCFinishNode_fn' declared here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
D:\a\SampSharp\SampSharp\src\sampsharp-component\proxies\../proxy-api.hpp(218,40): message : expanded from macro 'PROXY_EVENT_HANDLER_EVENT' [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
<scratch space>(179,1): message : expanded from here [D:\a\SampSharp\SampSharp\build\cmake\component\SampSharp.vcxproj]
  fatal error: too many errors emitted, stopping now [-ferror-limit=]

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 4, 2026

@copilot build failure; ptal

...

Fixed in 15d0da4. The _EXPAND_PARAM_N / _EXPAND_ARG_N / _EXPAND_INIT_N selector macros in proxy-api.hpp only supported up to 14 variadic arguments, but the NPC event handler now has 22 events. Extended all three families to 25 slots and also corrected the pre-existing self-referential bugs in _EXPAND_PARAM10_EXPAND_PARAM14 (they recursed into themselves instead of N-1).

@ikkentim ikkentim marked this pull request as ready for review May 4, 2026 15:34
@ikkentim
Copy link
Copy Markdown
Owner

ikkentim commented May 7, 2026

Requires manual testing

ikkentim added 3 commits May 10, 2026 23:02
…nt-npcs

* origin/main:
  Fix unmanaged→managed event marshalling order and return conversion in source generator (#525)
  Refactor: Convert player classes to ECS components (#513)
  Implement rich command processor (#523)
  Configure artifact retention: 14 days for PRs, 90 days for push (#522)
  docs: Remove 'open.mp only' restriction from IsGhostModeEnabled (#520)
  fix: Windows build scripts fail correctly on build errors (#518)
  Fix 'cdecl' attribute ignored warnings in Linux x86_64 builds (#516)
@ikkentim ikkentim merged commit fb84b94 into main May 10, 2026
3 checks passed
@ikkentim ikkentim deleted the copilot/fully-implement-npcs branch May 10, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fully implement NPCs

2 participants