summaryrefslogtreecommitdiff
path: root/src/Game/AI/Query/queryCheckHorseCustomizeSelect.cpp
blob: 37ac8f43eb380236110e14f7e3bc8e8b62167fb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "Game/AI/Query/queryCheckHorseCustomizeSelect.h"
#include <evfl/Query.h>
#include "KingSystem/GameData/gdtCommonFlagsUtils.h"

namespace uking::query {

CheckHorseCustomizeSelect::CheckHorseCustomizeSelect(const InitArg& arg)
    : ksys::act::ai::Query(arg) {}

CheckHorseCustomizeSelect::~CheckHorseCustomizeSelect() = default;

int CheckHorseCustomizeSelect::doQuery() {
    if (ksys::gdt::getFlag_Shop_IsDecide()) {
        s32 state = ksys::gdt::getFlag_Shop_CurrentItemState();
        if (state == 0)
            return 0;
        if (state == 0xF)
            return 1;
    }
    return 2;
}

void CheckHorseCustomizeSelect::loadParams(const evfl::QueryArg& arg) {}

void CheckHorseCustomizeSelect::loadParams() {}

}  // namespace uking::query