1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed Magic resistance display.

This commit is contained in:
DJWarmonger 2017-12-30 12:23:52 +01:00
parent c2a0b13332
commit f523ae5545

View File

@ -839,12 +839,14 @@ void CStackWindow::initBonusesList()
//if it's possible to give any description or image for this kind of bonus
//TODO: figure out why half of bonuses don't have proper description
if ((!bonusInfo.name.empty() || !bonusInfo.imagePath.empty())&& b->type != Bonus::MAGIC_RESISTANCE)
if (b->type == Bonus::MAGIC_RESISTANCE || b->type == Bonus::SECONDARY_SKILL_PREMY && b->subtype == SecondarySkill::RESISTANCE)
continue;
if ((!bonusInfo.name.empty() || !bonusInfo.imagePath.empty()))
activeBonuses.push_back(bonusInfo);
}
//handle Magic resistance separately :/
int magicResistance = info->stackNode->magicResistance();
int magicResistance = info->stackNode->magicResistance();//both MAGIC_RESITANCE and SECONDARY_SKILL_PREMY as one entry
if (magicResistance)
{