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