mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Don't assume unresolved containers contain no visible items
This commit is contained in:
parent
962ef91e25
commit
d826962eaa
1 changed files with 6 additions and 1 deletions
|
@ -237,7 +237,12 @@ namespace MWClass
|
||||||
bool Container::hasToolTip(const MWWorld::ConstPtr& ptr) const
|
bool Container::hasToolTip(const MWWorld::ConstPtr& ptr) const
|
||||||
{
|
{
|
||||||
if (const MWWorld::CustomData* data = ptr.getRefData().getCustomData())
|
if (const MWWorld::CustomData* data = ptr.getRefData().getCustomData())
|
||||||
return !canBeHarvested(ptr) || data->asContainerCustomData().mStore.hasVisibleItems();
|
{
|
||||||
|
if (!canBeHarvested(ptr))
|
||||||
|
return true;
|
||||||
|
const MWWorld::ContainerStore& store = data->asContainerCustomData().mStore;
|
||||||
|
return !store.isResolved() || store.hasVisibleItems();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue