summaryrefslogtreecommitdiff
path: root/src/Game/AI/Query/queryCheckSellResult.cpp
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2021-07-01 19:28:09 -0700
committertheo3 <arisstephenson2@gmail.com>2021-07-01 21:05:10 -0700
commit60dd80779a92120c74e7bda9e1ccf2695e2c7c19 (patch)
tree4d76dc03072740a41634893a9062d6a7e4626f68 /src/Game/AI/Query/queryCheckSellResult.cpp
parent112c1f987d3831df97f46c0f9e4ae977fba59484 (diff)
match some ai::Query
Diffstat (limited to 'src/Game/AI/Query/queryCheckSellResult.cpp')
-rw-r--r--src/Game/AI/Query/queryCheckSellResult.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Game/AI/Query/queryCheckSellResult.cpp b/src/Game/AI/Query/queryCheckSellResult.cpp
index db9a2718..b68dd89a 100644
--- a/src/Game/AI/Query/queryCheckSellResult.cpp
+++ b/src/Game/AI/Query/queryCheckSellResult.cpp
@@ -1,5 +1,6 @@
#include "Game/AI/Query/queryCheckSellResult.h"
#include <evfl/Query.h>
+#include "KingSystem/GameData/gdtCommonFlagsUtils.h"
namespace uking::query {
@@ -7,9 +8,17 @@ CheckSellResult::CheckSellResult(const InitArg& arg) : ksys::act::ai::Query(arg)
CheckSellResult::~CheckSellResult() = default;
-// FIXME: implement
int CheckSellResult::doQuery() {
- return -1;
+ if (ksys::gdt::getFlag_Shop_IsDecide()) {
+ s32 flag = ksys::gdt::getFlag_Shop_CurrentItemState();
+ if (flag == 0)
+ return 0;
+ if (flag == 0xD)
+ return 1;
+ if (flag == 0xE)
+ return 2;
+ }
+ return 3;
}
void CheckSellResult::loadParams(const evfl::QueryArg& arg) {}