1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Refactoring: random spells

This commit is contained in:
DjWarmonger
2015-08-12 16:40:08 +02:00
parent 3863756009
commit 237d3f2624
4 changed files with 17 additions and 8 deletions

View File

@@ -659,6 +659,17 @@ CTileInfo CMapGenerator::getTile(const int3& tile) const
return tiles[tile.x][tile.y][tile.z];
}
bool CMapGenerator::isAllowedSpell(SpellID sid) const
{
assert(sid >= 0);
if (sid < map->allowedSpell.size())
{
return map->allowedSpell[sid];
}
else
return false;
}
void CMapGenerator::setNearestObjectDistance(int3 &tile, float value)
{
checkIsOnMap(tile);