1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Merge pull request #2772 from wb180/tavernPoolHeroesFix

Remove(reduce durations) of bonuses for tavern heroes
This commit is contained in:
Ivan Savenko
2023-09-07 10:54:44 +03:00
committed by GitHub

View File

@@ -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;