Browse Source

Cherry-picked essential fix from #631. This fixes https://bugs.vcmi.eu/view.php?id=3074.

AlexVinS 5 years ago
parent
commit
55b54024a8
1 changed files with 3 additions and 2 deletions
  1. 3 2
      client/windows/CHeroWindow.cpp

+ 3 - 2
client/windows/CHeroWindow.cpp

@@ -52,10 +52,11 @@ const TBonusListPtr CHeroWithMaybePickedArtifact::getAllBonuses(const CSelector
 	else
 		bonusesFromPickedUpArtifact = TBonusListPtr(new BonusList());
 
-	for(auto b : *bonusesFromPickedUpArtifact)
-		*heroBonuses -= b;
 	for(auto b : *heroBonuses)
 		out->push_back(b);
+
+	for(auto b : *bonusesFromPickedUpArtifact)
+		*out -= b;
 	return out;
 }