浏览代码

More warnings

Removed unused code
Xilmi 1 年之前
父节点
当前提交
945de7c369
共有 1 个文件被更改,包括 1 次插入18 次删除
  1. 1 18
      AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp

+ 1 - 18
AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp

@@ -55,6 +55,7 @@ Goals::TGoalVec RecruitHeroBehavior::decompose(const Nullkiller * ai) const
 		{
 			auto availableHeroes = ai->cb->getAvailableHeroes(town);
 
+			//TODO: Prioritize non-main-heros too by cost of their units and whether their units fit to the current town
 			for(auto hero : availableHeroes)
 			{
 				auto score = ai->heroManager->evaluateHero(hero);
@@ -65,24 +66,6 @@ Goals::TGoalVec RecruitHeroBehavior::decompose(const Nullkiller * ai) const
 				}
 			}
 
-			int treasureSourcesCount = 0;
-
-			for(auto obj : ai->objectClusterizer->getNearbyObjects())
-			{
-				if((obj->ID == Obj::RESOURCE)
-					|| obj->ID == Obj::TREASURE_CHEST
-					|| obj->ID == Obj::CAMPFIRE
-					|| isWeeklyRevisitable(ai, obj)
-					|| obj->ID ==Obj::ARTIFACT)
-				{
-					auto tile = obj->visitablePos();
-					auto closestTown = ai->dangerHitMap->getClosestTown(tile);
-
-					if(town == closestTown)
-						treasureSourcesCount++;
-				}
-			}
-
 			if(ai->cb->getHeroesInfo().size() < ai->cb->getTownsInfo().size() + 1
 				|| (ai->getFreeResources()[EGameResID::GOLD] > 10000 && !ai->buildAnalyzer->isGoldPressureHigh()))
 			{