浏览代码

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

DjWarmonger 12 年之前
父节点
当前提交
dad5771a09
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      client/GUIClasses.cpp

+ 7 - 1
client/GUIClasses.cpp

@@ -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.