1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Moved NewTurn pack generation to NewTurnProcessor

This commit is contained in:
Ivan Savenko
2024-08-26 13:49:50 +00:00
parent 10a9d777c7
commit ce1e0b8875
9 changed files with 188 additions and 156 deletions

View File

@@ -361,6 +361,14 @@ void ApplyClientNetPackVisitor::visitHeroVisit(HeroVisit & pack)
void ApplyClientNetPackVisitor::visitNewTurn(NewTurn & pack)
{
cl.invalidatePaths();
if (pack.newWeekNotification)
{
const auto & newWeek = *pack.newWeekNotification;
std::string str = newWeek.text.toString();
callAllInterfaces(cl, &CGameInterface::showInfoDialog, newWeek.type, str, newWeek.components,(soundBase::soundID)newWeek.soundID);
}
}
void ApplyClientNetPackVisitor::visitGiveBonus(GiveBonus & pack)