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:
@@ -1403,7 +1403,7 @@ void CGWitchHut::initObj(CRandomGenerator & rand)
|
|||||||
defaultAllowed[SecondarySkill::LEADERSHIP] = false;
|
defaultAllowed[SecondarySkill::LEADERSHIP] = false;
|
||||||
|
|
||||||
for(int i = 0; i < defaultAllowed.size(); i++)
|
for(int i = 0; i < defaultAllowed.size(); i++)
|
||||||
if (defaultAllowed[i])
|
if (defaultAllowed[i] && cb->isAllowed(2, i))
|
||||||
allowedAbilities.insert(i);
|
allowedAbilities.insert(i);
|
||||||
}
|
}
|
||||||
ability = *RandomGeneratorUtil::nextItem(allowedAbilities, rand);
|
ability = *RandomGeneratorUtil::nextItem(allowedAbilities, rand);
|
||||||
|
Reference in New Issue
Block a user