diff options
Diffstat (limited to 'src/Game/AI/Query/queryCheckSellResult.cpp')
| -rw-r--r-- | src/Game/AI/Query/queryCheckSellResult.cpp | 13 |
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) {} |
