1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Fix issues reported by Sonar, review fixes

This commit is contained in:
Ivan Savenko
2025-04-21 18:41:01 +03:00
parent f3a57f754c
commit 4e8e85e3e4
26 changed files with 94 additions and 107 deletions

View File

@@ -1220,7 +1220,7 @@ public:
}
else if(bi.id >= BuildingID::MAGES_GUILD_1 && bi.id <= BuildingID::MAGES_GUILD_5)
{
evaluationContext.skillReward += 2 * buildThis.town->spellsAtLevel(bi.id.getMagesGuildLevel(), false);
evaluationContext.skillReward += 2 * bi.id.getMagesGuildLevel();
if (!alreadyOwn && evaluationContext.evaluator.ai->cb->canBuildStructure(buildThis.town, highestMageGuildPossible) != EBuildingState::FORBIDDEN)
{
for (auto hero : evaluationContext.evaluator.ai->cb->getHeroesInfo())