diff options
| author | Léo Lam <leo@leolam.fr> | 2021-03-26 14:45:42 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2021-03-26 14:46:07 +0100 |
| commit | 2cbe98381ef88f206196690f221d20f8a6b0eab4 (patch) | |
| tree | 6df67164b5be11abd0003251b1d87f576e82c207 /src/Game/AI/Query/queryCheckDieCnt.cpp | |
| parent | 6888632132239baba584c2dc4a51d8946e748f5e (diff) | |
query: Implement CheckDieCnt
Diffstat (limited to 'src/Game/AI/Query/queryCheckDieCnt.cpp')
| -rw-r--r-- | src/Game/AI/Query/queryCheckDieCnt.cpp | 14 |
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) { |
