I believe the part you're looking for is at the end of the function slotOnClick.

This seems to be were the item being dragged is being set to the slot in the inventory. So you need to check if the sword is placed in a specific slot.

I need to leave for work right now so I'll help more tomorrow.

EDIT: In your if statement where you are doing the strcmp instead of doing inv_slots[0].floating_icon try inv_slots[0]->floating_icon

Last edited by xbox; 01/02/14 05:17.