1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Workaround for new artifacts r-click descriptions, they will be displayed in same way as OH3 artifacts.

This commit is contained in:
DjWarmonger 2013-01-24 08:01:43 +00:00
parent 080e037c54
commit dad5771a09

View File

@ -4388,7 +4388,13 @@ void CArtPlace::setArtifact(const CArtifactInstance *art)
{
image->enable();
image->setFrame(locked ? GameConstants::ID_LOCK : art->artType->iconIndex);
text = ourArt->artType->Description();
std::string artDesc = ourArt->artType->Description();
if (vstd::contains (artDesc, '{'))
text = artDesc;
else
text = '{' + ourArt->artType->Name() + "}\n\n" + artDesc; //workaround for new artifacts with single name, turns it to H3-style
if(art->artType->id == 1) //spell scroll
{
// we expect scroll description to be like this: This scroll contains the [spell name] spell which is added into your spell book for as long as you carry the scroll.