From a28cc37501c729930bb935cc305696e413a75c4e Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Tue, 5 Dec 2017 10:24:58 +0400 Subject: [PATCH] Do not sell ingredients from organic containers --- apps/openmw/mwworld/worldimp.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 9c7fba9fa..2d38f1518 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2446,6 +2446,11 @@ namespace MWWorld if (ptr.getRefData().isDeleted()) return true; + // we should not sell ingrediends from owned organic containers + MWWorld::LiveCellRef* ref = ptr.get(); + if (ref && (ref->mBase->mFlags & ESM::Container::Organic)) + return true; + if (Misc::StringUtils::ciEqual(ptr.getCellRef().getOwner(), mOwner.getCellRef().getRefId())) mOut.push_back(ptr);