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

rework netpacks to avoid double typeinfo

This commit is contained in:
Andrii Danylchenko
2023-02-12 09:23:39 +02:00
parent 8855829527
commit 9f55666931
23 changed files with 3046 additions and 1581 deletions

View File

@@ -18,6 +18,7 @@
#include "CServerHandler.h"
#include "gui/CGuiHandler.h"
#include "../lib/NetPacks.h"
#include "ClientNetPackVisitors.h"
#include "../lib/CConfigHandler.h"
#include "../lib/CGameState.h"
#include "../lib/CPlayerState.h"
@@ -427,7 +428,9 @@ void ClientCommandManager::giveTurn(const PlayerColor &colorIdentifier)
YourTurn yt;
yt.player = colorIdentifier;
yt.daysWithoutCastle = CSH->client->getPlayerState(colorIdentifier)->daysWithoutCastle;
yt.applyCl(CSH->client);
ApplyClientNetPackVisitor visitor(*CSH->client, *CSH->client->gameState());
yt.visit(visitor);
}
void ClientCommandManager::printInfoAboutInterfaceObject(const CIntObject *obj, int level)