1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

First part of object instance API cleanup

- removed passability() method in favour of passableFor(PlayerColor)
- moved operator < code to map handler
- updated class documentation
This commit is contained in:
Ivan Savenko
2014-06-24 02:26:36 +03:00
parent c7dc4c05b8
commit 5ebc0e8614
13 changed files with 151 additions and 157 deletions

View File

@@ -853,10 +853,7 @@ void CGBorderGate::onHeroVisit( const CGHeroInstance * h ) const //TODO: passabi
}
}
ui8 CGBorderGate::getPassableness() const
bool CGBorderGate::passableFor(PlayerColor color) const
{
ui8 ret = 0;
for (int i = 0; i < PlayerColor::PLAYER_LIMIT_I; i++)
ret |= wasMyColorVisited(PlayerColor(i))<<i;
return ret;
return wasMyColorVisited(color);
}