mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Merge pull request #1130 from IvanSavenko/banned_skills_fix
Fixes #1096 - do not propose banned skills on levelup
This commit is contained in:
@@ -4177,7 +4177,7 @@ bool CGameHandler::buySecSkill(const IMarket *m, const CGHeroInstance *h, Second
|
||||
if (!h->canLearnSkill())
|
||||
COMPLAIN_RET("Hero can't learn any more skills");
|
||||
|
||||
if (h->type->heroClass->secSkillProbability.at(skill)==0)//can't learn this skill (like necromancy for most of non-necros)
|
||||
if (!h->canLearnSkill(skill))
|
||||
COMPLAIN_RET("The hero can't learn this skill!");
|
||||
|
||||
if (!vstd::contains(m->availableItemsIds(EMarketMode::RESOURCE_SKILL), skill))
|
||||
|
||||
Reference in New Issue
Block a user