1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Do not propose banned skills in witch huts

This commit is contained in:
Ivan Savenko
2023-04-10 14:01:27 +03:00
parent d6a3c0e666
commit 87647cd02a

View File

@@ -1403,7 +1403,7 @@ void CGWitchHut::initObj(CRandomGenerator & rand)
defaultAllowed[SecondarySkill::LEADERSHIP] = false;
for(int i = 0; i < defaultAllowed.size(); i++)
if (defaultAllowed[i])
if (defaultAllowed[i] && cb->isAllowed(2, i))
allowedAbilities.insert(i);
}
ability = *RandomGeneratorUtil::nextItem(allowedAbilities, rand);