1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-28 03:57:02 +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
commit ef0eb8e930
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;