mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-30 16:20:21 +00:00
Do not sell ingredients from organic containers
This commit is contained in:
parent
29b2308b2c
commit
a28cc37501
@ -2446,6 +2446,11 @@ namespace MWWorld
|
|||||||
if (ptr.getRefData().isDeleted())
|
if (ptr.getRefData().isDeleted())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// we should not sell ingrediends from owned organic containers
|
||||||
|
MWWorld::LiveCellRef<ESM::Container>* ref = ptr.get<ESM::Container>();
|
||||||
|
if (ref && (ref->mBase->mFlags & ESM::Container::Organic))
|
||||||
|
return true;
|
||||||
|
|
||||||
if (Misc::StringUtils::ciEqual(ptr.getCellRef().getOwner(), mOwner.getCellRef().getRefId()))
|
if (Misc::StringUtils::ciEqual(ptr.getCellRef().getOwner(), mOwner.getCellRef().getRefId()))
|
||||||
mOut.push_back(ptr);
|
mOut.push_back(ptr);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user