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:
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
|
||||
//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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user