query: Implement CheckFlag

This commit is contained in:
Léo Lam
2021-03-26 14:48:23 +01:00
parent 2cbe98381e
commit b72b160b43
3 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -1,5 +1,6 @@
#include "Game/AI/Query/queryCheckFlag.h"
#include <evfl/query.h>
#include "KingSystem/GameData/gdtManager.h"
namespace uking::query {
@@ -7,9 +8,10 @@ CheckFlag::CheckFlag(const InitArg& arg) : ksys::act::ai::Query(arg) {}
CheckFlag::~CheckFlag() = default;
// FIXME: implement
int CheckFlag::doQuery() {
return -1;
bool value = false;
ksys::gdt::Manager::instance()->getParamBypassPerm().get().getBool(&value, mFlagName);
return value;
}
void CheckFlag::loadParams(const evfl::QueryArg& arg) {