diff --git a/lib/mapObjects/CGDwelling.cpp b/lib/mapObjects/CGDwelling.cpp index 058139e39..023abd77e 100644 --- a/lib/mapObjects/CGDwelling.cpp +++ b/lib/mapObjects/CGDwelling.cpp @@ -346,15 +346,19 @@ void CGDwelling::newTurn(CRandomGenerator & rand) const std::vector CGDwelling::getPopupComponents(PlayerColor player) const { - if (getOwner() != player) - return {}; + bool visitedByOwner = getOwner() == player; std::vector result; if (ID == Obj::CREATURE_GENERATOR1 && !creatures.empty()) { for (auto const & creature : creatures.front().second) - result.emplace_back(ComponentType::CREATURE, creature, creatures.front().first); + { + if (visitedByOwner) + result.emplace_back(ComponentType::CREATURE, creature, creatures.front().first); + else + result.emplace_back(ComponentType::CREATURE, creature); + } } if (ID == Obj::CREATURE_GENERATOR4) @@ -362,7 +366,12 @@ std::vector CGDwelling::getPopupComponents(PlayerColor player) const for (auto const & creatureLevel : creatures) { if (!creatureLevel.second.empty()) - result.emplace_back(ComponentType::CREATURE, creatureLevel.second.back(), creatureLevel.first); + { + if (visitedByOwner) + result.emplace_back(ComponentType::CREATURE, creatureLevel.second.back(), creatureLevel.first); + else + result.emplace_back(ComponentType::CREATURE, creatureLevel.second.back()); + } } } return result;