PDA

View Full Version : fix for item missing when trading


tsowl
05-09-2009, 09:02 AM
If your inventory overflow when trading, and items go to cursor, they will disappear except the last one.

zone/inventory.cpp
bool Client::PutItemInInventory(sint16 slot_id, const ItemInst& inst, bool client_update)
{
mlog(INVENTORY__SLOTS, "Putting item %s (%d) into slot %d", inst.GetItem()->Name, inst.GetItem()->ID, slot_id);
- m_inv.PutItem(slot_id, inst);
+ if (slot_id==SLOT_CURSOR) {
+ return PushItemOnCursor(inst,client_update);
+ }
+ else
+ m_inv.PutItem(slot_id, inst);