From f523ae5545ae2d597858b2bce094ccf4be422da9 Mon Sep 17 00:00:00 2001 From: DJWarmonger Date: Sat, 30 Dec 2017 12:23:52 +0100 Subject: [PATCH] Fixed Magic resistance display. --- client/windows/CCreatureWindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/windows/CCreatureWindow.cpp b/client/windows/CCreatureWindow.cpp index 585a4b47f..bc0c6a0b2 100644 --- a/client/windows/CCreatureWindow.cpp +++ b/client/windows/CCreatureWindow.cpp @@ -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) {