From 8eb4f14ff031836eb6160c05fe334838d4760c06 Mon Sep 17 00:00:00 2001 From: Arseniy Shestakov Date: Thu, 24 Dec 2015 22:35:32 +0300 Subject: [PATCH] MoraleLuckBox: handle BLOCK_LUCK bonus. Fix issue 2130 --- client/widgets/MiscWidgets.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/client/widgets/MiscWidgets.cpp b/client/widgets/MiscWidgets.cpp index 5d0036b67..83ba3bacf 100644 --- a/client/widgets/MiscWidgets.cpp +++ b/client/widgets/MiscWidgets.cpp @@ -380,7 +380,16 @@ void MoraleLuckBox::set(const IBonusBearer *node) if (morale && node && (node->hasBonusOfType(Bonus::UNDEAD) || node->hasBonusOfType(Bonus::BLOCK_MORALE) || node->hasBonusOfType(Bonus::NON_LIVING))) - text += CGI->generaltexth->arraytxt[113]; //unaffected by morale + { + text += CGI->generaltexth->arraytxt[113]; //unaffected by morale + bonusValue = 0; + } + else if(!morale && node && node->hasBonusOfType(Bonus::BLOCK_LUCK)) + { + // TODO: there is no text like "Unaffected by luck" so probably we need own text + text += CGI->generaltexth->arraytxt[noneTxtId]; + bonusValue = 0; + } else if(modifierList->empty()) text += CGI->generaltexth->arraytxt[noneTxtId];//no modifiers else