mirror of
https://github.com/OpenMW/openmw.git
synced 2025-07-10 08:41:35 +00: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
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue