1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Merge pull request #4439 from IvanSavenko/event_timing

Trigger map and town events on start of player turn
This commit is contained in:
Ivan Savenko
2024-08-14 19:01:17 +03:00
committed by GitHub
14 changed files with 148 additions and 202 deletions

View File

@ -225,16 +225,6 @@ void UpdateArtHandlerLists::visitTyped(ICPackVisitor & visitor)
visitor.visitUpdateArtHandlerLists(*this);
}
void UpdateMapEvents::visitTyped(ICPackVisitor & visitor)
{
visitor.visitUpdateMapEvents(*this);
}
void UpdateCastleEvents::visitTyped(ICPackVisitor & visitor)
{
visitor.visitUpdateCastleEvents(*this);
}
void ChangeFormation::visitTyped(ICPackVisitor & visitor)
{
visitor.visitChangeFormation(*this);
@ -907,17 +897,6 @@ void UpdateArtHandlerLists::applyGs(CGameState * gs) const
gs->allocatedArtifacts = allocatedArtifacts;
}
void UpdateMapEvents::applyGs(CGameState * gs) const
{
gs->map->events = events;
}
void UpdateCastleEvents::applyGs(CGameState * gs) const
{
auto * t = gs->getTown(town);
t->events = events;
}
void ChangeFormation::applyGs(CGameState * gs) const
{
gs->getHero(hid)->setFormation(formation);