Browse Source

Update BuildingBehavior.cpp

Fixed a warning which, in this case, was actually also a logical error! :o
Xilmi 1 year ago
parent
commit
8cf99616d0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      AI/Nullkiller/Behaviors/BuildingBehavior.cpp

+ 1 - 1
AI/Nullkiller/Behaviors/BuildingBehavior.cpp

@@ -60,7 +60,7 @@ Goals::TGoalVec BuildingBehavior::decompose(const Nullkiller * ai) const
 		}
 		for (auto& buildingInfo : developmentInfo.toBuild)
 		{
-			if (closestThreat <= 1 && developmentInfo.town->fortLevel() < BuildingID::CASTLE && !buildingInfo.notEnoughRes)
+			if (closestThreat <= 1 && developmentInfo.town->fortLevel() < CGTownInstance::EFortLevel::CASTLE && !buildingInfo.notEnoughRes)
 			{
 				if (buildingInfo.id == BuildingID::FORT || buildingInfo.id == BuildingID::CITADEL || buildingInfo.id == BuildingID::CASTLE)
 					tasks.push_back(sptr(BuildThis(buildingInfo, developmentInfo)));