Don't assume unresolved containers contain no visible items

This commit is contained in:
Evil Eye 2025-04-06 11:02:31 +02:00
parent 962ef91e25
commit d826962eaa

View file

@ -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;
}