瀏覽代碼

Possible fix for #923

AlexVinS 10 年之前
父節點
當前提交
6cf82ceab5
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      lib/CCreatureSet.cpp
  2. 1 1
      lib/NetPacksLib.cpp

+ 1 - 1
lib/CCreatureSet.cpp

@@ -712,7 +712,7 @@ void CCommanderInstance::setAlive (bool Alive)
 	alive = Alive;
 	if (!alive)
 	{
-		getBonusList().remove_if (Bonus::UntilCommanderKilled);
+		popBonuses(Bonus::UntilCommanderKilled);
 	}
 }
 

+ 1 - 1
lib/NetPacksLib.cpp

@@ -1175,7 +1175,7 @@ void BattleResult::applyGs( CGameState *gs )
 	{
 		if(auto h = gs->curB->battleGetFightingHero(i))
 		{
-			h->getBonusList().remove_if(Bonus::OneBattle); 	//remove any "until next battle" bonuses
+			h->popBonuses(Bonus::OneBattle); 	//remove any "until next battle" bonuses
 			if (h->commander && h->commander->alive)
 			{
 				for (auto art : h->commander->artifactsWorn) //increment bonuses for commander artifacts