1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Correctly iterate over allowed spells set (was vector originally)

This commit is contained in:
Ivan Savenko
2024-06-17 20:58:04 +00:00
parent 6a0768aae6
commit 76bb32536f
2 changed files with 5 additions and 10 deletions

View File

@ -368,12 +368,7 @@ ui32 RmgMap::getTotalZoneCount() const
bool RmgMap::isAllowedSpell(const SpellID & sid) const
{
assert(sid.getNum() >= 0);
if (sid.getNum() < mapInstance->allowedSpells.size())
{
return mapInstance->allowedSpells.count(sid);
}
else
return false;
return mapInstance->allowedSpells.count(sid);
}
void RmgMap::dump(bool zoneId) const