mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Fix town portal query when it calls level up query
This commit is contained in:
@@ -535,6 +535,11 @@ void CGenericQuery::onExposure(QueryPtr topQuery)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CGenericQuery::setReply(const JsonNode & reply)
|
void CGenericQuery::setReply(const JsonNode & reply)
|
||||||
|
{
|
||||||
|
this->reply = reply;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGenericQuery::onRemoval(PlayerColor color)
|
||||||
{
|
{
|
||||||
callback(reply);
|
callback(reply);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "../lib/GameConstants.h"
|
#include "../lib/GameConstants.h"
|
||||||
#include "../lib/int3.h"
|
#include "../lib/int3.h"
|
||||||
#include "../lib/NetPacks.h"
|
#include "../lib/NetPacks.h"
|
||||||
|
#include "JsonNode.h"
|
||||||
|
|
||||||
VCMI_LIB_NAMESPACE_BEGIN
|
VCMI_LIB_NAMESPACE_BEGIN
|
||||||
|
|
||||||
@@ -198,8 +199,10 @@ public:
|
|||||||
bool endsByPlayerAnswer() const override;
|
bool endsByPlayerAnswer() const override;
|
||||||
void onExposure(QueryPtr topQuery) override;
|
void onExposure(QueryPtr topQuery) override;
|
||||||
void setReply(const JsonNode & reply) override;
|
void setReply(const JsonNode & reply) override;
|
||||||
|
void onRemoval(PlayerColor color) override;
|
||||||
private:
|
private:
|
||||||
std::function<void(const JsonNode &)> callback;
|
std::function<void(const JsonNode &)> callback;
|
||||||
|
JsonNode reply;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Queries
|
class Queries
|
||||||
|
|||||||
Reference in New Issue
Block a user