Przeglądaj źródła

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

godric3 8 lat temu
rodzic
commit
f03a0b1151
1 zmienionych plików z 12 dodań i 0 usunięć
  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