Selaa lähdekoodia

Fix visibility of inactive stack experience bonuses in creature window

Ivan Savenko 4 kuukautta sitten
vanhempi
sitoutus
a06855b979
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      client/windows/CCreatureWindow.cpp

+ 4 - 0
client/windows/CCreatureWindow.cpp

@@ -851,6 +851,10 @@ void CStackWindow::initBonusesList()
 	BonusList receivedBonuses = *info->stackNode->getBonuses(CSelector(Bonus::Permanent), Selector::all);
 	BonusList abilities = info->creature->getExportedBonusList();
 
+	// remove all bonuses that are not propagated away
+	// such bonuses should be present in received bonuses, and if not - this means that they are behind inactive limiter, such as inactive stack experience bonuses
+	abilities.remove_if([](const Bonus* b){ return b->propagator == nullptr;});
+
 	const auto & bonusSortingPredicate = [this](const std::shared_ptr<Bonus> & v1, const std::shared_ptr<Bonus> & v2){
 		if (v1->source != v2->source)
 		{