mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix regressions
This commit is contained in:
parent
52050d0ef1
commit
59b2cbe4d2
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user