ソースを参照

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

AlexVinS 5 年 前
コミット
55b54024a8
1 ファイル変更3 行追加2 行削除
  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;
 }