mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-21 00:19:29 +02:00
Move visit query to a separate class, remove no longer needed Cast.h
This commit is contained in:
@ -14,7 +14,6 @@
|
||||
|
||||
#include "../CGameHandler.h"
|
||||
|
||||
#include "../../lib/serializer/Cast.h"
|
||||
#include "../../lib/networkPacks/PacksForServer.h"
|
||||
|
||||
std::ostream & operator<<(std::ostream & out, const CQuery & query)
|
||||
@ -116,7 +115,7 @@ void CQuery::setReply(std::optional<int32_t> reply)
|
||||
bool CQuery::blockAllButReply(const CPack * pack) const
|
||||
{
|
||||
//We accept only query replies from correct player
|
||||
if(auto reply = dynamic_ptr_cast<QueryReply>(pack))
|
||||
if(auto reply = dynamic_cast<const QueryReply*>(pack))
|
||||
return !vstd::contains(players, reply->player);
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user