1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix regressions

This commit is contained in:
Ivan Savenko 2023-11-08 19:49:42 +02:00
parent 52050d0ef1
commit 59b2cbe4d2
3 changed files with 4 additions and 4 deletions

View File

@ -418,12 +418,12 @@ class DLL_LINKAGE BuildingID : public IdentifierWithEnum<BuildingID, BuildingIDB
public:
using IdentifierWithEnum<BuildingID, BuildingIDBase>::IdentifierWithEnum;
static BuildingID HALL_LEVEL(uint level)
static BuildingID HALL_LEVEL(unsigned int level)
{
assert(level < 4);
return BuildingID(Type::VILLAGE_HALL + level);
}
static BuildingID FORT_LEVEL(uint level)
static BuildingID FORT_LEVEL(unsigned int level)
{
assert(level < 3);
return BuildingID(Type::TOWN_HALL + level);

View File

@ -1208,7 +1208,7 @@ void CGTownInstance::serializeJsonOptions(JsonSerializeFormat & handler)
FactionID CGTownInstance::getFaction() const
{
return town->faction->getId();
return FactionID(subID.getNum());
}
TerrainId CGTownInstance::getNativeTerrain() const

View File

@ -213,7 +213,7 @@ public:
for (auto entry : value)
valueInt.insert(entry.getNum());
serializeLIC(fieldName, decoder, encoder, standard, value);
serializeLIC(fieldName, decoder, encoder, standardInt, valueInt);
value.clear();
for (auto entry : valueInt)