summaryrefslogtreecommitdiff
path: root/src/Game/AI/Query/queryCheckDieCnt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Game/AI/Query/queryCheckDieCnt.cpp')
-rw-r--r--src/Game/AI/Query/queryCheckDieCnt.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Game/AI/Query/queryCheckDieCnt.cpp b/src/Game/AI/Query/queryCheckDieCnt.cpp
index 82444bd4..865cee1c 100644
--- a/src/Game/AI/Query/queryCheckDieCnt.cpp
+++ b/src/Game/AI/Query/queryCheckDieCnt.cpp
@@ -1,5 +1,6 @@
#include "Game/AI/Query/queryCheckDieCnt.h"
#include <evfl/query.h>
+#include "KingSystem/GameData/gdtManager.h"
namespace uking::query {
@@ -7,9 +8,18 @@ CheckDieCnt::CheckDieCnt(const InitArg& arg) : ksys::act::ai::Query(arg) {}
CheckDieCnt::~CheckDieCnt() = default;
-// FIXME: implement
int CheckDieCnt::doQuery() {
- return -1;
+ auto* gdm = ksys::gdt::Manager::instance();
+ if (!gdm)
+ return 0;
+
+ sead::FixedSafeString<64> flag;
+ flag.format("%s_DeathCount", mActorName.cstr());
+ int count = 0;
+ if (!gdm->getParamBypassPerm().get().getS32(&count, flag))
+ return 0;
+
+ return count > *mCount;
}
void CheckDieCnt::loadParams(const evfl::QueryArg& arg) {