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:
parent
23fa7c4a9b
commit
8d549bf030
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user