mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-09 07:13:54 +02:00
Merge pull request #5407 from IvanSavenko/cove_fix
[1.6.6] Fix loading of HotA maps with Cove town placed on map
This commit is contained in:
commit
3e87d9e5fa
@ -116,6 +116,15 @@ void MapIdentifiersH3M::remapTemplate(ObjectTemplate & objectTemplate)
|
||||
objectTemplate.subid = mappedType.subID;
|
||||
}
|
||||
|
||||
if (objectTemplate.id == Obj::TOWN || objectTemplate.id == Obj::RANDOM_DWELLING_FACTION)
|
||||
objectTemplate.subid = remap(FactionID(objectTemplate.subid));
|
||||
|
||||
if (objectTemplate.id == Obj::MONSTER)
|
||||
objectTemplate.subid = remap(CreatureID(objectTemplate.subid));
|
||||
|
||||
if (objectTemplate.id == Obj::ARTIFACT)
|
||||
objectTemplate.subid = remap(ArtifactID(objectTemplate.subid));
|
||||
|
||||
if (VLC->objtypeh->knownObjects().count(objectTemplate.id) == 0)
|
||||
{
|
||||
logGlobal->warn("Unknown object found: %d | %d", objectTemplate.id, objectTemplate.subid);
|
||||
@ -131,15 +140,6 @@ void MapIdentifiersH3M::remapTemplate(ObjectTemplate & objectTemplate)
|
||||
objectTemplate.subid = {};
|
||||
}
|
||||
}
|
||||
|
||||
if (objectTemplate.id == Obj::TOWN || objectTemplate.id == Obj::RANDOM_DWELLING_FACTION)
|
||||
objectTemplate.subid = remap(FactionID(objectTemplate.subid));
|
||||
|
||||
if (objectTemplate.id == Obj::MONSTER)
|
||||
objectTemplate.subid = remap(CreatureID(objectTemplate.subid));
|
||||
|
||||
if (objectTemplate.id == Obj::ARTIFACT)
|
||||
objectTemplate.subid = remap(ArtifactID(objectTemplate.subid));
|
||||
}
|
||||
|
||||
BuildingID MapIdentifiersH3M::remapBuilding(std::optional<FactionID> owner, BuildingID input) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user