1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Adventure map shipyard nwo has configurable boat type

This commit is contained in:
Ivan Savenko
2023-06-08 00:04:13 +03:00
parent 487f441f47
commit 4d947be287
11 changed files with 109 additions and 24 deletions

View File

@@ -1292,9 +1292,9 @@ CGObjectInstance * CMapLoaderH3M::readQuestGuard(const int3 & mapPosition)
return guard;
}
CGObjectInstance * CMapLoaderH3M::readShipyard(const int3 & mapPosition)
CGObjectInstance * CMapLoaderH3M::readShipyard(const int3 & mapPosition, std::shared_ptr<const ObjectTemplate> objectTemplate)
{
auto * object = new CGShipyard();
auto * object = readGeneric(mapPosition, objectTemplate);
setOwnerAndValidate(mapPosition, object, reader->readPlayer32());
return object;
}
@@ -1448,7 +1448,7 @@ CGObjectInstance * CMapLoaderH3M::readObject(std::shared_ptr<const ObjectTemplat
return readQuestGuard(mapPosition);
case Obj::SHIPYARD:
return readShipyard(mapPosition);
return readShipyard(mapPosition, objectTemplate);
case Obj::HERO_PLACEHOLDER:
return readHeroPlaceholder(mapPosition);