瀏覽代碼

Remove(reduce durations) of bonuses for tavern heroes

Evgeniy Meshcheryakov 2 年之前
父節點
當前提交
47f5dd14fa
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      lib/gameState/TavernHeroesPool.cpp

+ 4 - 0
lib/gameState/TavernHeroesPool.cpp

@@ -117,6 +117,10 @@ void TavernHeroesPool::onNewDay()
 		if(!hero.second)
 		if(!hero.second)
 			continue;
 			continue;
 
 
+		hero.second->removeBonusesRecursive(Bonus::OneDay);
+		hero.second->reduceBonusDurations(Bonus::NDays);
+		hero.second->reduceBonusDurations(Bonus::OneWeek);
+
 		// do not access heroes who are not present in tavern of any players
 		// do not access heroes who are not present in tavern of any players
 		if (vstd::contains(unusedHeroes, hero.first))
 		if (vstd::contains(unusedHeroes, hero.first))
 			continue;
 			continue;