См. определение в файле ActionDetachFromTarget.c строка 78
Перекрестные ссылки ActionTarget, FindSlotIdToDetach(), g_Game и InventorySlots::INVALID.