Преглед на файлове

Do not show whether Shrine is visited by hero, if was not visited by player yet

Piotr Wójcik преди 9 години
родител
ревизия
52797082aa
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      lib/mapObjects/MiscObjects.cpp

+ 1 - 1
lib/mapObjects/MiscObjects.cpp

@@ -1659,7 +1659,7 @@ std::string CGShrine::getHoverText(PlayerColor player) const
 std::string CGShrine::getHoverText(const CGHeroInstance * hero) const
 {
 	std::string hoverName = getHoverText(hero->tempOwner);
-	if(vstd::contains(hero->spells, spell)) //hero knows that spell
+	if(wasVisited(hero->tempOwner) && vstd::contains(hero->spells, spell)) //know what spell there is and hero knows that spell
 		hoverName += "\n\n" + VLC->generaltexth->allTexts[354]; // (Already learned)
 	return hoverName;
 }