|
@@ -85,8 +85,8 @@ int AFactionMember::getPrimSkillLevel(PrimarySkill id) const
|
|
|
static const CSelector selectorAllSkills = Selector::type()(BonusType::PRIMARY_SKILL);
|
|
|
static const std::string keyAllSkills = "type_PRIMARY_SKILL";
|
|
|
auto allSkills = getBonusBearer()->getBonuses(selectorAllSkills, keyAllSkills);
|
|
|
- auto ret = allSkills->valOfBonuses(Selector::subtype()(BonusSubtypeID(id)));
|
|
|
- auto minSkillValue = VLC->engineSettings()->getVector(EGameSettings::HEROES_MINIMAL_PRIMARY_SKILLS)[id.getNum()];
|
|
|
+ int ret = allSkills->valOfBonuses(Selector::subtype()(BonusSubtypeID(id)));
|
|
|
+ int minSkillValue = VLC->engineSettings()->getVectorValue(EGameSettings::HEROES_MINIMAL_PRIMARY_SKILLS, id.getNum());
|
|
|
return std::max(ret, minSkillValue); //otherwise, some artifacts may cause negative skill value effect, sp=0 works in old saves
|
|
|
}
|
|
|
|