瀏覽代碼

Fix quest

nordsoft 2 年之前
父節點
當前提交
40af83a55c
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      lib/mapObjects/CQuest.cpp

+ 6 - 3
lib/mapObjects/CQuest.cpp

@@ -632,10 +632,13 @@ void CQuest::addReplacements(MetaString &out, const std::string &base) const
 	switch(missionType)
 	{
 	case MISSION_KILL_CREATURE:
-		out.replaceCreatureName(stackToKill);
-		if (std::count(base.begin(), base.end(), '%') == 2) //say where is placed monster
+		if(stackToKill.type)
 		{
-			out.replaceRawString(VLC->generaltexth->arraytxt[147+stackDirection]);
+			out.replaceCreatureName(stackToKill);
+			if (std::count(base.begin(), base.end(), '%') == 2) //say where is placed monster
+			{
+				out.replaceRawString(VLC->generaltexth->arraytxt[147+stackDirection]);
+			}
 		}
 		break;
 	case MISSION_KILL_HERO: