diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 46fea9593..88b454279 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -2960,6 +2960,8 @@ void CDBCtrlSheet::swapSheet(CDBCtrlSheet *other) swapDBProps(getItemRMClassTypePtr(), other->getItemRMClassTypePtr()); swapDBProps(getItemRMFaberStatTypePtr(), other->getItemRMFaberStatTypePtr()); swapDBProps(getItemPrerequisitValidPtr(), other->getItemPrerequisitValidPtr()); + swapDBProps(getItemSerialPtr(), other->getItemSerialPtr()); + swapDBProps(getItemCreateTimePtr(), other->getItemCreateTimePtr()); } } @@ -3539,6 +3541,10 @@ void CDBCtrlSheet::copyAspect(CDBCtrlSheet *dest) dest->setItemRMFaberStatType(getItemRMFaberStatType()); // copy prerequisit valid flag dest->setItemPrerequisitValid(getItemPrerequisitValid()); + // copy item serial + dest->setItemSerial(getItemSerial()); + // copy item create time + dest->setItemCreateTime(getItemCreateTime()); } // if brick, sphrase or sphraseId if(isSBrick() || isSPhrase() || isSPhraseId()) diff --git a/code/ryzom/client/src/item_group_manager.cpp b/code/ryzom/client/src/item_group_manager.cpp index bd94f4231..3cc45f5f9 100644 --- a/code/ryzom/client/src/item_group_manager.cpp +++ b/code/ryzom/client/src/item_group_manager.cpp @@ -73,6 +73,21 @@ bool CItemGroup::contains(CDBCtrlSheet *other, SLOT_EQUIPMENT::TSlotEquipment &s void CItemGroup::addItem(sint32 createTime, sint32 serial, SLOT_EQUIPMENT::TSlotEquipment slot) { + //Don't add an item if it already exists, this could cause issue + // It's happening either if we are creating a group with a 2 hands items (and the item is found both in handR and handL) + // Or if an user incorrectly edit his group file + for(int i=0; i::max()); - - Items.push_back(item); + if(item.createTime != 0) + { + addItem(item.createTime, item.serial, item.slot); + } + // Old load : keep for compatibility / migration reasons + else + { + Items.push_back(item); + } } if (strcmp((char*)curNode->name, "remove") == 0) {