1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Check if hero knows spell even without wisdom

This commit is contained in:
Piotr Wójcik
2016-09-13 22:28:21 +02:00
parent 1e60ba6516
commit c5e4eaf9c1

View File

@@ -1607,14 +1607,14 @@ void CGShrine::onHeroVisit( const CGHeroInstance * h ) const
{ {
iw.text.addTxt(MetaString::ADVOB_TXT,131); 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 else if(vstd::contains(h->spells,spell))//hero already knows the spell
{ {
iw.text.addTxt(MetaString::ADVOB_TXT,174); 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 else //give spell
{ {
std::set<SpellID> spells; std::set<SpellID> spells;