mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
Do not process pack if it was blocked by a queryReply
Regression from earlier PR
This commit is contained in:
@@ -456,26 +456,28 @@ void CGameHandler::handleReceivedPack(CPackForServer * pack)
|
||||
{
|
||||
sendPackageResponse(false);
|
||||
}
|
||||
|
||||
bool result;
|
||||
try
|
||||
{
|
||||
ApplyGhNetPackVisitor applier(*this);
|
||||
pack->visit(applier);
|
||||
result = applier.getResult();
|
||||
}
|
||||
catch(ExceptionNotAllowedAction &)
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
|
||||
if(result)
|
||||
logGlobal->trace("Message %s successfully applied!", typeid(*pack).name());
|
||||
else
|
||||
complain((boost::format("Got false in applying %s... that request must have been fishy!")
|
||||
% typeid(*pack).name()).str());
|
||||
{
|
||||
bool result;
|
||||
try
|
||||
{
|
||||
ApplyGhNetPackVisitor applier(*this);
|
||||
pack->visit(applier);
|
||||
result = applier.getResult();
|
||||
}
|
||||
catch(ExceptionNotAllowedAction &)
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
|
||||
sendPackageResponse(true);
|
||||
if(result)
|
||||
logGlobal->trace("Message %s successfully applied!", typeid(*pack).name());
|
||||
else
|
||||
complain((boost::format("Got false in applying %s... that request must have been fishy!")
|
||||
% typeid(*pack).name()).str());
|
||||
|
||||
sendPackageResponse(true);
|
||||
}
|
||||
vstd::clear_pointer(pack);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user