diff --git a/lib/constants/EntityIdentifiers.h b/lib/constants/EntityIdentifiers.h index e69bfff0d..63b3f4373 100644 --- a/lib/constants/EntityIdentifiers.h +++ b/lib/constants/EntityIdentifiers.h @@ -418,12 +418,12 @@ class DLL_LINKAGE BuildingID : public IdentifierWithEnum::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); diff --git a/lib/mapObjects/CGTownInstance.cpp b/lib/mapObjects/CGTownInstance.cpp index ac887cbc9..f7b5081f5 100644 --- a/lib/mapObjects/CGTownInstance.cpp +++ b/lib/mapObjects/CGTownInstance.cpp @@ -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 diff --git a/lib/serializer/JsonSerializeFormat.h b/lib/serializer/JsonSerializeFormat.h index 93dc2caa9..cb4a6c248 100644 --- a/lib/serializer/JsonSerializeFormat.h +++ b/lib/serializer/JsonSerializeFormat.h @@ -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)