// collect objects from slot before clearing and transforming
for (final RPObject objectInSlot : slot) {
objects.add(objectInSlot);
}
// clear the slot
slot.clear();
SpellTransformer transformer = new SpellTransformer();
//transform rpobjects in slot to spell
for(RPObject o : objects) {
Spell s = (Spell) transformer.transform(o);
//only add to slot if transforming was successful