public override bool CanBeDeliver(LogicLevel level) { int placedBuildingCount = level.GetObjectCount(this.m_buildingData, this.m_buildingData.GetVillageType()); int townHallLevel = this.m_buildingData.GetVillageType() == 1 ? level.GetHomeOwnerAvatar().GetVillage2TownHallLevel() : level.GetHomeOwnerAvatar().GetTownHallLevel(); int unlockedBuildingCount = LogicDataTables.GetTownHallLevel(townHallLevel).GetUnlockedBuildingCount(this.m_buildingData); if (placedBuildingCount >= unlockedBuildingCount || this.m_buildingCount != 0) { return(this.m_buildingCount == placedBuildingCount + 1); } return(true); }
public override bool CanBeDeliver(LogicLevel level) { return(level.GetObjectCount(this.m_decoData, this.m_decoData.GetVillageType()) < this.m_decoData.GetMaxCount()); }