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

code review

This commit is contained in:
Laserlicht
2024-10-01 16:32:28 +02:00
parent 31f87cb6ed
commit 9c6bd20159
5 changed files with 18 additions and 14 deletions

View File

@@ -944,9 +944,9 @@ void SetResearchedSpells::applyGs(CGameState *gs)
CGTownInstance *town = gs->getTown(tid);
town->spells[level] = spells;
town->spellResearchActionsPerDay[gs->getDate(Date::DAY)]++;
town->spellResearchCounterDay++;
if(accepted)
town->spellResearchCounter++;
town->spellResearchAcceptedCounter++;
}
void SetMana::applyGs(CGameState *gs)
@@ -1941,7 +1941,10 @@ void NewTurn::applyGs(CGameState *gs)
creatureSet.applyGs(gs);
for(CGTownInstance* t : gs->map->towns)
{
t->built = 0;
t->spellResearchCounterDay = 0;
}
if(newRumor)
gs->currentRumor = *newRumor;