1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Simplified building ID logic

- Replaced overcomplicated and broken math on dwelling ID's with fixed
enum
- Fixed broken 2nd upgrades and 8th dwelling
- Removed no longer used enumeration values from building ID's
This commit is contained in:
Ivan Savenko
2024-12-25 19:16:21 +00:00
parent 4e4135cd6d
commit 65fc50d33b
8 changed files with 60 additions and 69 deletions

View File

@@ -267,7 +267,7 @@ TeleporterTilesVector CPathfinderHelper::getCastleGates(const PathNodeInfo & sou
for(const auto & town : getPlayerState(hero->tempOwner)->getTowns())
{
if(town->id != source.nodeObject->id && town->visitingHero == nullptr
&& town->hasBuilt(BuildingID::CASTLE_GATE, ETownType::INFERNO))
&& town->hasBuilt(BuildingSubID::CASTLE_GATE))
{
allowedExits.push_back(town->visitablePos());
}