1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

allow more than 8 skills

This commit is contained in:
Laserlicht
2025-06-19 19:02:39 +02:00
parent 678408c02c
commit b0f5c4dd7b
8 changed files with 15 additions and 7 deletions

View File

@@ -30,6 +30,7 @@
#include "../CCreatureHandler.h"
#include "../mapping/CMap.h"
#include "../StartInfo.h"
#include "../GameSettings.h"
#include "CGTownInstance.h"
#include "../entities/artifact/ArtifactUtils.h"
#include "../entities/artifact/CArtifact.h"
@@ -175,7 +176,7 @@ int3 CGHeroInstance::convertFromVisitablePos(const int3 & position) const
bool CGHeroInstance::canLearnSkill() const
{
return secSkills.size() < GameConstants::SKILL_PER_HERO;
return secSkills.size() < cb->getSettings().getInteger(EGameSettings::HEROES_SKILL_PER_HERO);
}
bool CGHeroInstance::canLearnSkill(const SecondarySkill & which) const