This is untested, but shouldn't cause any issues:
[putitemtrace.patch - built on rev 2284]
Code:
Index: common/Item.cpp
===================================================================
--- common/Item.cpp (revision 2284)
+++ common/Item.cpp (working copy)
@@ -660,11 +660,15 @@
if (!inst) {
// User is effectively deleting the item
// in the slot, why hold a null ptr in map<>?
+ LogFile->write(EQEMuLog::Error, "(Inventory::PutItem::slot_id = %i, ItemInst = NULL", slot_id);
return slot_id;
}
// Delegate to internal method
- return _PutItem(slot_id, inst.Clone());
+ LogFile->write(EQEMuLog::Error, "Inventory::PutItem::slot_id = %i, ItemInst = !NULL", slot_id);
+ sint16 putitem_return = _PutItem(slot_id, inst.Clone());
+ LogFile->write(EQEMuLog::Error, "Inventory::PutItem::putitem_return = %i", putitem_return);
+ return putitem_return;
}
// Swap items in inventory
@@ -1182,6 +1186,7 @@
if (inst == NULL) {
//Why do we not delete the poped item here????
PopItem(slot_id);
+ LogFile->write(EQEMuLog::Error, "Inventory::_PutItem::slot_id = %i, ItemInst = NULL", slot_id);
return slot_id;
}
@@ -1226,7 +1231,7 @@
LogFile->write(EQEMuLog::Error, "Inventory::_PutItem: Invalid slot_id specified (%i)", slot_id);
safe_delete(inst); // Slot not found, clean up
}
-
+ LogFile->write(EQEMuLog::Error, "Inventory::_PutItem::slot_id = %i, result_return = %i, ItemInst = !NULL", slot_id, result);
return result;
}
Index: common/shareddb.cpp
===================================================================
--- common/shareddb.cpp (revision 2284)
+++ common/shareddb.cpp (working copy)
@@ -703,6 +703,7 @@
LogFile->write(EQEMuLog::Error,
"Warning: Invalid slot_id for item in inventory: name=%s, acctid=%i, item_id=%i, slot_id=%i",
name, account_id, item_id, slot_id);
+ LogFile->write(EQEMuLog::Error, "(SharedDatabase::GetInventory::put_slot_id = %i)", put_slot_id);
}
}
mysql_free_result(result);
Try this, and the next time the issue comes up, post the log again.