Ver código fonte

Added dummy message for artifacts that don't have pick-up texts.

DjWarmonger 12 anos atrás
pai
commit
f6acc8c77b
1 arquivos alterados com 10 adições e 1 exclusões
  1. 10 1
      lib/CObjectHandler.cpp

+ 10 - 1
lib/CObjectHandler.cpp

@@ -3818,7 +3818,16 @@ void CGArtifact::onHeroVisit( const CGHeroInstance * h ) const
 				if(message.length())
 					iw.text <<  message;
 				else
-					iw.text << std::pair<ui8, ui32> (MetaString::ART_EVNTS, subID);
+				{
+					if (VLC->arth->artifacts[subID]->EventText().size())
+						iw.text << std::pair<ui8, ui32> (MetaString::ART_EVNTS, subID);
+					else //fix for mod artifacts with no event text
+					{
+						iw.text.addTxt (MetaString::ADVOB_TXT, 183); //% has found treasure
+						iw.text.addReplacement (h->name);
+					}
+
+				}
 			}
 			break;
 		case Obj::SPELL_SCROLL: