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

namespace uking::query {

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

CheckItemShopSelectBuy::~CheckItemShopSelectBuy() = default;

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

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

void CheckItemShopSelectBuy::loadParams() {}

}  // namespace uking::query