Explorar o código

Check if hero knows spell even without wisdom

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

+ 4 - 4
lib/mapObjects/MiscObjects.cpp

@@ -1607,14 +1607,14 @@ void CGShrine::onHeroVisit( const CGHeroInstance * h ) const
 	{
 		iw.text.addTxt(MetaString::ADVOB_TXT,131);
 	}
-	else if(ID == Obj::SHRINE_OF_MAGIC_THOUGHT  && !h->getSecSkillLevel(SecondarySkill::WISDOM)) //it's third level spell and hero doesn't have wisdom
-	{
-		iw.text.addTxt(MetaString::ADVOB_TXT,130);
-	}
 	else if(vstd::contains(h->spells,spell))//hero already knows the spell
 	{
 		iw.text.addTxt(MetaString::ADVOB_TXT,174);
 	}
+	else if(ID == Obj::SHRINE_OF_MAGIC_THOUGHT  && !h->getSecSkillLevel(SecondarySkill::WISDOM)) //it's third level spell and hero doesn't have wisdom
+	{
+		iw.text.addTxt(MetaString::ADVOB_TXT,130);
+	}
 	else //give spell
 	{
 		std::set<SpellID> spells;