Log in

View Full Version : NORENT Fix


mangoo
06-17-2003, 02:13 PM
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:


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(ItemPrope rties_Struct));

if(item->IsBag()) {


Change to:


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(Item Properties_Struct));

if(item->IsBag()) {
[/code]

Trumpcard
06-17-2003, 05:03 PM
got it.