mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
fix #2731, now no morale, and no luck texts show properly
This commit is contained in:
parent
e3f0126e41
commit
f03a0b1151
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user