mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Added PackageReceived message to show when server starts pack processing
This commit is contained in:
@@ -481,14 +481,23 @@ void CGameHandler::handleReceivedPack(std::shared_ptr<CConnection> connection, C
|
||||
//prepare struct informing that action was applied
|
||||
auto sendPackageResponse = [&](bool successfullyApplied)
|
||||
{
|
||||
PackageApplied applied;
|
||||
applied.player = pack.player;
|
||||
applied.result = successfullyApplied;
|
||||
applied.packType = CTypeList::getInstance().getTypeID(&pack);
|
||||
applied.requestID = pack.requestID;
|
||||
PackageApplied applied(
|
||||
pack.player,
|
||||
pack.requestID,
|
||||
CTypeList::getInstance().getTypeID(&pack),
|
||||
successfullyApplied
|
||||
);
|
||||
connection->sendPack(applied);
|
||||
};
|
||||
|
||||
PackageReceived received(
|
||||
pack.player,
|
||||
pack.requestID,
|
||||
CTypeList::getInstance().getTypeID(&pack)
|
||||
);
|
||||
connection->sendPack(received);
|
||||
|
||||
|
||||
if(isBlockedByQueries(&pack, pack.player))
|
||||
{
|
||||
sendPackageResponse(false);
|
||||
|
||||
Reference in New Issue
Block a user