Explorar o código

Do not show whether Witch Hut is visited by hero, if was not visited by player yet, fixes #2604 (#304)

Piotr %!s(int64=8) %!d(string=hai) anos
pai
achega
9d5d291e6b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/mapObjects/MiscObjects.cpp

+ 1 - 1
lib/mapObjects/MiscObjects.cpp

@@ -1477,7 +1477,7 @@ std::string CGWitchHut::getHoverText(PlayerColor player) const
 std::string CGWitchHut::getHoverText(const CGHeroInstance * hero) const
 std::string CGWitchHut::getHoverText(const CGHeroInstance * hero) const
 {
 {
 	std::string hoverName = getHoverText(hero->tempOwner);
 	std::string hoverName = getHoverText(hero->tempOwner);
-	if(hero->getSecSkillLevel(SecondarySkill(ability))) //hero knows that ability
+	if(wasVisited(hero->tempOwner) && hero->getSecSkillLevel(SecondarySkill(ability))) //hero knows that ability
 		hoverName += "\n\n" + VLC->generaltexth->allTexts[357]; // (Already learned)
 		hoverName += "\n\n" + VLC->generaltexth->allTexts[357]; // (Already learned)
 	return hoverName;
 	return hoverName;
 }
 }