mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Do not allow to sell items from containers with zero capacity (bug #4268)
This commit is contained in:
parent
a28cc37501
commit
1a58171e86
1 changed files with 2 additions and 3 deletions
|
@ -2446,9 +2446,8 @@ namespace MWWorld
|
||||||
if (ptr.getRefData().isDeleted())
|
if (ptr.getRefData().isDeleted())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// we should not sell ingrediends from owned organic containers
|
// vanilla Morrowind does not allow to sell items from containers with zero capacity
|
||||||
MWWorld::LiveCellRef<ESM::Container>* ref = ptr.get<ESM::Container>();
|
if (ptr.getClass().getCapacity(ptr) <= 0.f)
|
||||||
if (ref && (ref->mBase->mFlags & ESM::Container::Organic))
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (Misc::StringUtils::ciEqual(ptr.getCellRef().getOwner(), mOwner.getCellRef().getRefId()))
|
if (Misc::StringUtils::ciEqual(ptr.getCellRef().getOwner(), mOwner.getCellRef().getRefId()))
|
||||||
|
|
Loading…
Reference in a new issue