1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-29 21:56:54 +02:00

Fix town portal query when it calls level up query

This commit is contained in:
Adriankhl 2023-03-20 16:08:18 +01:00
parent 23fa7c4a9b
commit 8d549bf030
2 changed files with 8 additions and 0 deletions

View File

@ -535,6 +535,11 @@ void CGenericQuery::onExposure(QueryPtr topQuery)
}
void CGenericQuery::setReply(const JsonNode & reply)
{
this->reply = reply;
}
void CGenericQuery::onRemoval(PlayerColor color)
{
callback(reply);
}

View File

@ -11,6 +11,7 @@
#include "../lib/GameConstants.h"
#include "../lib/int3.h"
#include "../lib/NetPacks.h"
#include "JsonNode.h"
VCMI_LIB_NAMESPACE_BEGIN
@ -198,8 +199,10 @@ public:
bool endsByPlayerAnswer() const override;
void onExposure(QueryPtr topQuery) override;
void setReply(const JsonNode & reply) override;
void onRemoval(PlayerColor color) override;
private:
std::function<void(const JsonNode &)> callback;
JsonNode reply;
};
class Queries