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

server queries is now stored as unique_ptr

This commit is contained in:
Ivan Savenko
2023-07-24 00:10:01 +03:00
parent e8e6c02a4a
commit c217d7717a
6 changed files with 47 additions and 32 deletions

View File

@ -12,6 +12,7 @@
#include "CGameHandler.h"
#include "BattleProcessor.h"
#include "CQuery.h"
#include "HeroPoolProcessor.h"
#include "PlayerMessageProcessor.h"
@ -48,7 +49,7 @@ void ApplyGhNetPackVisitor::visitEndTurn(EndTurn & pack)
}
gh.throwOnWrongPlayer(&pack, pack.player);
if(gh.queries.topQuery(pack.player))
if(gh.queries->topQuery(pack.player))
gh.throwAndComplain(&pack, "Cannot end turn before resolving queries!");
gh.states.setFlag(gs.currentPlayer, &PlayerStatus::makingTurn, false);