Ver código fonte

Fixed Magic resistance display.

DJWarmonger 7 anos atrás
pai
commit
f523ae5545
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      client/windows/CCreatureWindow.cpp

+ 4 - 2
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)
 	{