1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-03 14:52:11 +02:00

Update BuildingBehavior.cpp

Fixed a warning which, in this case, was actually also a logical error! :o
This commit is contained in:
Xilmi 2024-08-19 21:21:56 +02:00
parent 2df293f95d
commit 8cf99616d0

View File

@ -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)));