You can make a new SendListInventory function (copy the existing one) and remove all Creature* usage from it and if needed, replace with Item*.
In some situations as a Creature may be required you must pass NULL or make a workaround or comment out the code.
After doing that you can just use the existing item gossip patch to send the list inventory packet.
Then you will try to buy an item it doesnt work.
For buying to work you need to edit the item buy handler to work with item too. (basically to work without the creature again)
Search opcodes.cpp for "buy" and you will find the handler that handles buying.
Then you also need to make buyback work in the same way.