func int oCNpc_GetPointer(var C_NPC slf)
{
if (!Hlp_IsValidNpc(slf)) {
MEM_Error (ConcatStrings ("oCNpc_GetPointer: Invalid c_npc: ", IntToString (slf.id)));
return 0;
};
MEM_ReinitParser();
var c_npc hlp; var int ptr;
hlp = Hlp_GetNpc(MEM_HELPER_INST);
MEM_Helper = Hlp_GetNpc (hlp);
Npc_SetTarget(hlp,slf);//self,other
ptr = MEM_Helper.enemy;
return ptr;
};
func void Drop(var c_npc slf)
{
var int target_ptr; var int ocnpc_attacker
target_ptr = oCNpc_GetPointer(slf);
ocnpc_attacker = oCNpc_GetPointer(hero);
const int oCNpc_Drop = 7560880; // oCNpc::DropUnconscious(float oCNpc *) 0x00735EB0
CALL_IntParam (0); //float param
CALL_IntParam (ocnpc_attacker);//hero
CALL__thiscall (target_ptr, oCNpc_Drop);//slf
};