mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Fix issues reported by Sonar, review fixes
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace AIPathfinding
|
||||
|
||||
void QuestAction::execute(AIGateway * ai, const CGHeroInstance * hero) const
|
||||
{
|
||||
ai->moveHeroToTile(questInfo.getObject(cb)->visitablePos(), hero);
|
||||
ai->moveHeroToTile(questInfo.getObject(ai->myCb.get())->visitablePos(), hero);
|
||||
}
|
||||
|
||||
std::string QuestAction::toString() const
|
||||
|
||||
Reference in New Issue
Block a user