Code:
bool Item::hasMarketAttributes() const
{
if (attributes == nullptr) {
return true;
}
for (const auto& attr : attributes->getList()) {
if (attr.type == ITEM_ATTRIBUTE_CHARGES) {
uint16_t charges = static_cast<uint16_t>(attr.value.integer);
if (charges != items[id].charges) {
return false;
}
} else if (attr.type == ITEM_ATTRIBUTE_DURATION) {
uint32_t duration = static_cast<uint32_t>(attr.value.integer);
if (duration != getDefaultDuration()) {
return false;
}
} else {
return false;
}
}
if (items[id].imbuingSlots > 0) {
for (uint8_t slot = 0; slot < items[id].imbuingSlots; slot++) {
Item* item = const_cast<Item*>(this);
uint32_t info = item->getImbuement(slot);
if (info >> 8 != 0) {
return false;
}
}
}
return true;
}
I have a problem with items that are having their attributes cleaned up by Imbuement.
the market does not recognize them after they are without the attributes