diff --git a/apps/openmw/mwclass/armor.cpp b/apps/openmw/mwclass/armor.cpp index f842528d34..97f9211d9a 100644 --- a/apps/openmw/mwclass/armor.cpp +++ b/apps/openmw/mwclass/armor.cpp @@ -380,7 +380,8 @@ namespace MWClass bool Armor::canSell (const MWWorld::Ptr& item, int npcServices) const { - return npcServices & ESM::NPC::Armor; + return (npcServices & ESM::NPC::Armor) + || ((npcServices & ESM::NPC::MagicItems) && !getEnchantment(item).empty()); } float Armor::getWeight(const MWWorld::Ptr &ptr) const diff --git a/apps/openmw/mwclass/book.cpp b/apps/openmw/mwclass/book.cpp index 5e9b86af0a..51d47e7216 100644 --- a/apps/openmw/mwclass/book.cpp +++ b/apps/openmw/mwclass/book.cpp @@ -202,7 +202,8 @@ namespace MWClass bool Book::canSell (const MWWorld::Ptr& item, int npcServices) const { - return npcServices & ESM::NPC::Books; + return (npcServices & ESM::NPC::Books) + || ((npcServices & ESM::NPC::MagicItems) && !getEnchantment(item).empty()); } float Book::getWeight(const MWWorld::Ptr &ptr) const diff --git a/apps/openmw/mwclass/clothing.cpp b/apps/openmw/mwclass/clothing.cpp index 3e27b7584a..0098783505 100644 --- a/apps/openmw/mwclass/clothing.cpp +++ b/apps/openmw/mwclass/clothing.cpp @@ -292,7 +292,8 @@ namespace MWClass bool Clothing::canSell (const MWWorld::Ptr& item, int npcServices) const { - return npcServices & ESM::NPC::Clothing; + return (npcServices & ESM::NPC::Clothing) + || ((npcServices & ESM::NPC::MagicItems) && !getEnchantment(item).empty()); } float Clothing::getWeight(const MWWorld::Ptr &ptr) const diff --git a/apps/openmw/mwclass/weapon.cpp b/apps/openmw/mwclass/weapon.cpp index 6f75095ff7..f958302cf3 100644 --- a/apps/openmw/mwclass/weapon.cpp +++ b/apps/openmw/mwclass/weapon.cpp @@ -434,7 +434,8 @@ namespace MWClass bool Weapon::canSell (const MWWorld::Ptr& item, int npcServices) const { - return npcServices & ESM::NPC::Weapon; + return (npcServices & ESM::NPC::Weapon) + || ((npcServices & ESM::NPC::MagicItems) && !getEnchantment(item).empty()); } float Weapon::getWeight(const MWWorld::Ptr &ptr) const