diff --git a/lib/MetaString.cpp b/lib/MetaString.cpp index 3da43f519..8fdb6d3a0 100644 --- a/lib/MetaString.cpp +++ b/lib/MetaString.cpp @@ -51,8 +51,11 @@ void MetaString::appendRawString(const std::string & value) void MetaString::appendTextID(const std::string & value) { - message.push_back(EMessage::APPEND_TEXTID_STRING); - stringsTextID.push_back(value); + if (!value.empty()) + { + message.push_back(EMessage::APPEND_TEXTID_STRING); + stringsTextID.push_back(value); + } } void MetaString::appendNumber(int64_t value) diff --git a/lib/mapObjects/CGTownInstance.cpp b/lib/mapObjects/CGTownInstance.cpp index 9813c4a58..ab3fe7cd7 100644 --- a/lib/mapObjects/CGTownInstance.cpp +++ b/lib/mapObjects/CGTownInstance.cpp @@ -947,6 +947,11 @@ std::string CGTownInstance::getNameTranslated() const return VLC->generaltexth->translate(nameTextId); } +std::string CGTownInstance::getNameTextID() const +{ + return nameTextId; +} + void CGTownInstance::setNameTextId( const std::string & newName ) { nameTextId = newName; diff --git a/lib/mapObjects/CGTownInstance.h b/lib/mapObjects/CGTownInstance.h index ceca1e89c..0bc2976ba 100644 --- a/lib/mapObjects/CGTownInstance.h +++ b/lib/mapObjects/CGTownInstance.h @@ -137,6 +137,7 @@ public: const CArmedInstance *getUpperArmy() const; //garrisoned hero if present or the town itself std::string getNameTranslated() const; + std::string getNameTextID() const; void setNameTextId(const std::string & newName); ////////////////////////////////////////////////////////////////////////// diff --git a/lib/mapObjects/CQuest.h b/lib/mapObjects/CQuest.h index 644059aa6..cb3046a22 100644 --- a/lib/mapObjects/CQuest.h +++ b/lib/mapObjects/CQuest.h @@ -45,7 +45,9 @@ public: std::string heroName; //backup of hero name HeroTypeID heroPortrait; - MetaString firstVisitText, nextVisitText, completedText; + MetaString firstVisitText; + MetaString nextVisitText; + MetaString completedText; bool isCustomFirst; bool isCustomNext; bool isCustomComplete;