Explorar o código

Remove(reduce durations) of bonuses for tavern heroes

Evgeniy Meshcheryakov %!s(int64=2) %!d(string=hai) anos
pai
achega
47f5dd14fa
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      lib/gameState/TavernHeroesPool.cpp

+ 4 - 0
lib/gameState/TavernHeroesPool.cpp

@@ -117,6 +117,10 @@ void TavernHeroesPool::onNewDay()
 		if(!hero.second)
 			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
 		if (vstd::contains(unusedHeroes, hero.first))
 			continue;