mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-13 11:40:38 +02:00
Fixed Magic resistance display.
This commit is contained in:
parent
c2a0b13332
commit
f523ae5545
@ -839,12 +839,14 @@ void CStackWindow::initBonusesList()
|
|||||||
|
|
||||||
//if it's possible to give any description or image for this kind of bonus
|
//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
|
//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);
|
activeBonuses.push_back(bonusInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
//handle Magic resistance separately :/
|
//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)
|
if (magicResistance)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user