1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Fix crash on miniHillFort popup window

This commit is contained in:
MichalZr6
2024-11-15 00:58:35 +01:00
parent 7e2cad158a
commit ab1f1d6d99
3 changed files with 9 additions and 3 deletions

View File

@@ -393,11 +393,16 @@ void MetaString::replaceName(const FactionID & id)
replaceTextID(id.toEntity(VLC)->getNameTextID());
}
void MetaString::replaceName(const MapObjectID& id)
void MetaString::replaceName(const MapObjectID & id)
{
replaceTextID(VLC->objtypeh->getObjectName(id, 0));
}
void MetaString::replaceName(const MapObjectID & id, const MapObjectSubID & subId)
{
replaceTextID(VLC->objtypeh->getObjectName(id, subId));
}
void MetaString::replaceName(const PlayerColor & id)
{
replaceTextID(TextIdentifier("vcmi.capitalColors", id.getNum()).get());