Fix parcel slot duplication for evolving item augments

This commit is contained in:
Bemvaras
2025-06-23 09:34:59 -06:00
committed by Barathos
parent fb0747fe02
commit 10840753b0
+8 -1
View File
@@ -339,11 +339,16 @@ bool Client::DoEvolveCheckProgression(EQ::ItemInstance &inst)
) { ) {
auto const augs = inst.GetAugmentIDs(); auto const augs = inst.GetAugmentIDs();
std::vector<CharacterParcelsRepository::CharacterParcels> parcels; std::vector<CharacterParcelsRepository::CharacterParcels> parcels;
int32 next_slot = FindNextFreeParcelSlotUsingMemory();
for (auto const &item_id: augs) { for (auto const &item_id: augs) {
if (!item_id) { if (!item_id) {
continue; continue;
} }
if (next_slot == INVALID_INDEX) {
break;
}
CharacterParcelsRepository::CharacterParcels p{}; CharacterParcelsRepository::CharacterParcels p{};
p.char_id = CharacterID(); p.char_id = CharacterID();
p.from_name = "Evolving Item Sub-System"; p.from_name = "Evolving Item Sub-System";
@@ -351,7 +356,7 @@ bool Client::DoEvolveCheckProgression(EQ::ItemInstance &inst)
"System automatically removed from {} which recently evolved.", "System automatically removed from {} which recently evolved.",
inst.GetItem()->Name inst.GetItem()->Name
); );
p.slot_id = FindNextFreeParcelSlotUsingMemory(); p.slot_id = next_slot;
p.sent_date = time(nullptr); p.sent_date = time(nullptr);
p.item_id = item_id; p.item_id = item_id;
p.quantity = 1; p.quantity = 1;
@@ -368,6 +373,8 @@ bool Client::DoEvolveCheckProgression(EQ::ItemInstance &inst)
} }
parcels.push_back(p); parcels.push_back(p);
m_parcels.emplace(p.slot_id, p);
next_slot = FindNextFreeParcelSlotUsingMemory();
} }
CharacterParcelsRepository::InsertMany(database, parcels); CharacterParcelsRepository::InsertMany(database, parcels);