Spawn class

You can try remember class of item by simply calling item->GetClass() then use this class for spawning.