From f03a0b1151d20de53bc8093d15f1c73e2f4ca32a Mon Sep 17 00:00:00 2001 From: godric3 Date: Thu, 5 Oct 2017 17:13:49 +0200 Subject: [PATCH] fix #2731, now no morale, and no luck texts show properly --- client/widgets/MiscWidgets.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/widgets/MiscWidgets.cpp b/client/widgets/MiscWidgets.cpp index 775d196ce..5a522ca6d 100644 --- a/client/widgets/MiscWidgets.cpp +++ b/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