1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

- Move Hero / Prison distribution to separate modificator

- Protect rolling and banning hero with mutex
This commit is contained in:
Tomasz Zieliński
2023-12-11 07:37:23 +01:00
parent 48f0da1fdc
commit 8fe6a103cd
9 changed files with 131 additions and 12 deletions

View File

@ -649,6 +649,8 @@ 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));
allowedHeroes.erase(id);
}