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

Merge pull request #2791 from Nordsoft91/fix-2790

Fix for random dwellings
This commit is contained in:
Ivan Savenko
2023-09-12 12:38:55 +03:00
committed by GitHub
3 changed files with 18 additions and 5 deletions

View File

@@ -1273,8 +1273,8 @@ CGObjectInstance * CMapLoaderH3M::readDwellingRandom(const int3 & mapPosition, s
//216 and 218
if(auto * lvlSpec = dynamic_cast<CCreGenLeveledInfo *>(spec))
{
lvlSpec->minLevel = std::max(reader->readUInt8(), static_cast<ui8>(1));
lvlSpec->maxLevel = std::min(reader->readUInt8(), static_cast<ui8>(7));
lvlSpec->minLevel = std::max(reader->readUInt8(), static_cast<ui8>(0)) + 1;
lvlSpec->maxLevel = std::min(reader->readUInt8(), static_cast<ui8>(6)) + 1;
}
object->info = spec;
return object;