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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user