mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
- Unban hero if related Prison is destroyed during map generation
- Move prison counter to PrisonHeroPlacer
This commit is contained in:
@ -650,10 +650,17 @@ void CMap::banWaterHeroes()
|
||||
void CMap::banHero(const HeroTypeID & id)
|
||||
{
|
||||
if (!vstd::contains(allowedHeroes, id))
|
||||
logGlobal->warn("Attempt to ban hero %d, who is already not allowed", id.encode(id));
|
||||
logGlobal->warn("Attempt to ban hero %s, who is already not allowed", id.encode(id));
|
||||
allowedHeroes.erase(id);
|
||||
}
|
||||
|
||||
void CMap::unbanHero(const HeroTypeID & id)
|
||||
{
|
||||
if (vstd::contains(allowedHeroes, id))
|
||||
logGlobal->warn("Attempt to unban hero %s, who is already allowed", id.encode(id));
|
||||
allowedHeroes.insert(id);
|
||||
}
|
||||
|
||||
void CMap::initTerrain()
|
||||
{
|
||||
terrain.resize(boost::extents[levels()][width][height]);
|
||||
|
Reference in New Issue
Block a user