diff --git a/Laptop/IMP Confirm.cpp b/Laptop/IMP Confirm.cpp index 8f871ebc..41bd2250 100644 --- a/Laptop/IMP Confirm.cpp +++ b/Laptop/IMP Confirm.cpp @@ -722,7 +722,9 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId, STR fileName ) } // write out the profile itself - if (!FileWrite(hFile, &gMercProfiles[ iProfileId ], sizeof( MERCPROFILESTRUCT ), &uiBytesWritten)) + // WDS - Clean up inventory handling + gMercProfiles[ iProfileId ].CopyNewInventoryToOld(); + if (!FileWrite(hFile, &gMercProfiles[ iProfileId ], SIZEOF_MERCPROFILESTRUCT_POD, &uiBytesWritten)) { if (hFile) FileClose(hFile); @@ -794,11 +796,13 @@ BOOLEAN LoadImpCharacter( STR nickName ) LaptopSaveInfo.iIMPIndex = iProfileId; // read in the profile - if (!FileRead(hFile, &gMercProfiles[ iProfileId ] ,sizeof( MERCPROFILESTRUCT ), &uiBytesRead)) + // WDS - Clean up inventory handling + if (!FileRead(hFile, &gMercProfiles[ iProfileId ] , SIZEOF_MERCPROFILESTRUCT_POD, &uiBytesRead)) { DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL); return FALSE; } + gMercProfiles[ iProfileId ].CopyOldInventoryToNew(); // close file FileClose(hFile);