|
@@ -107,7 +107,7 @@ void Rewardable::Reward::loadComponents(std::vector<Component> & comps, const CG
|
|
|
auto skillID = entry.first;
|
|
|
int levelsGained = entry.second;
|
|
|
int currentLevel = h ? h->getSecSkillLevel(skillID) : 0;
|
|
|
- int finalLevel = std::min(static_cast<int>(MasteryLevel::EXPERT), currentLevel + levelsGained);
|
|
|
+ int finalLevel = std::clamp<int>(currentLevel + levelsGained, MasteryLevel::BASIC, MasteryLevel::EXPERT);
|
|
|
comps.emplace_back(ComponentType::SEC_SKILL, entry.first, finalLevel);
|
|
|
}
|
|
|
|