summaryrefslogtreecommitdiff
path: root/src/Game/AI/Query/queryCheckItemShopPorchVacancy.cpp
blob: 7160393756348aff6a5ae3e29fb95e1551129191 (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
28
#include "Game/AI/Query/queryCheckItemShopPorchVacancy.h"
#include <evfl/Query.h>
#include "KingSystem/GameData/gdtManager.h"

namespace uking::query {

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

CheckItemShopPorchVacancy::~CheckItemShopPorchVacancy() = default;

int CheckItemShopPorchVacancy::doQuery() {
    auto* gdm = ksys::gdt::Manager::instance();
    if (gdm != nullptr) {
        int item_state = -1;
        if (gdm->getParam().get().getS32(&item_state, "Shop_CurrentItemState") &&
            (item_state == 7)) {
            return 0;
        }
    }
    return 1;
}

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

void CheckItemShopPorchVacancy::loadParams() {}

}  // namespace uking::query