1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Fix wrong condition

This commit is contained in:
Dydzio 2023-09-14 12:54:07 +02:00
parent 56c969be4f
commit e79c707cf7

View File

@ -468,8 +468,8 @@ void CGameHandler::levelUpCommander(const CCommanderInstance * c)
int i = 100;
for (auto specialSkill : VLC->creh->skillRequirements)
{
if (c->secondarySkills.at(specialSkill.second.first) == ECommander::MAX_SKILL_LEVEL - 1
&& c->secondarySkills.at(specialSkill.second.second) == ECommander::MAX_SKILL_LEVEL - 1
if (c->secondarySkills.at(specialSkill.second.first) >= ECommander::MAX_SKILL_LEVEL - 1
&& c->secondarySkills.at(specialSkill.second.second) >= ECommander::MAX_SKILL_LEVEL - 1
&& !vstd::contains (c->specialSkills, i))
clu.skills.push_back (i);
++i;