Function: void Client::RepairInventory()
This is a very simple fix for NORENT items not being deleted in the RepairInventory() function. Previously, if a NORENT item was found, whatever was on the cursor slot would be deleted instead. Also, maybe we should add in a column to character tables for a timestamp of last time a character is saved, that way NORENT items wont be deleted each time someone zones. I think I will actually start on that myself, will release code for it once I'm done. Anyways.... here is the NORENT fix for ya...
Starts on ~ln 6824
Currently:
Code:
else {
//Item exists, make sure it is ok
if((item->IsGM() || !item->nosave) && admin < 10) {
pp.inventory[0] = 0xFFFF;
memset(&pp.invitemproperties[0],0,sizeof(ItemProperties_Struct));
if(item->IsBag()) {
Change to:
Code:
else {
//Item exists, make sure it is ok
if((item->IsGM() || !item->nosave) && admin < 10) {
pp.inventory[slotid] = 0xFFFF;
memset(&pp.invitemproperties[slotid],0,sizeof(ItemProperties_Struct));
if(item->IsBag()) {
[/code]