瀏覽代碼

fix #2731, now no morale, and no luck texts show properly

godric3 8 年之前
父節點
當前提交
f03a0b1151
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      client/widgets/MiscWidgets.cpp

+ 12 - 0
client/widgets/MiscWidgets.cpp

@@ -389,6 +389,18 @@ void MoraleLuckBox::set(const IBonusBearer *node)
 		text += CGI->generaltexth->arraytxt[noneTxtId];
 		bonusValue = 0;
 	}
+	else if(morale && node && node->hasBonusOfType(Bonus::NO_MORALE))
+	{
+		auto noMorale = node->getBonus(Selector::type(Bonus::NO_MORALE));
+		text += "\n" + noMorale->Description();
+		bonusValue = 0;
+	}
+	else if (!morale && node && node->hasBonusOfType(Bonus::NO_LUCK))
+	{
+		auto noLuck = node->getBonus(Selector::type(Bonus::NO_LUCK));
+		text += "\n" + noLuck->Description();
+		bonusValue = 0;
+	}
 	else if(modifierList->empty())
 		text += CGI->generaltexth->arraytxt[noneTxtId];//no modifiers
 	else