Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions data/status_query.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
query::BranchByDyeColor:
status: pending
status: done
query::BranchByGameOver:
status: pending
query::CanCreateMakeItemList:
Expand All @@ -17,9 +17,9 @@ query::CheckActorAction14_2:
query::CheckAddPorchItem:
status: pending
query::CheckAppPoint:
status: pending
status: done
query::CheckAppShopSelect:
status: pending
status: done
query::CheckAreaTransition:
status: pending
query::CheckBalladOfHeroActiveTiming:
Expand Down Expand Up @@ -47,9 +47,9 @@ query::CheckDownloadItemNum:
query::CheckDuringBloodyMoon:
status: pending
query::CheckDyeShopSelect:
status: pending
status: done
query::CheckE3Mode:
status: pending
status: done
query::CheckEatActor:
status: pending
query::CheckElapsedTimeOfMiniGame:
Expand Down Expand Up @@ -97,13 +97,13 @@ query::CheckHorseTakenOut:
query::CheckIsOpenItemCategory:
status: done
query::CheckItemShopDecide:
status: pending
status: done
query::CheckItemShopPorchVacancy:
status: pending
status: done
query::CheckItemShopSelect:
status: pending
query::CheckItemShopSelectBuy:
status: pending
status: done
query::CheckJustBeforeEventCancel:
status: pending
query::CheckLastDamageAttacker:
Expand All @@ -115,7 +115,7 @@ query::CheckMapArea:
query::CheckMasterSwordState:
status: pending
query::CheckMaterialValue:
status: pending
status: done
query::CheckMiniGameTime:
status: pending
query::CheckMiniGameTimeOver:
Expand All @@ -127,7 +127,7 @@ query::CheckOwnedHorseFamiliarity:
query::CheckPictureBookVacancy:
status: pending
query::CheckPlacedItemSaled:
status: pending
status: done
query::CheckPlayerDeadCause:
status: pending
query::CheckPlayerEquip:
Expand All @@ -149,7 +149,7 @@ query::CheckPlayerTemperatureCondition:
query::CheckPlayerWeaponFired:
status: pending
query::CheckPorchInItem:
status: pending
status: done
query::CheckProConUse:
status: done
query::CheckRainRatio:
Expand All @@ -163,7 +163,7 @@ query::CheckResultOfNPCConflict:
query::CheckRoad:
status: pending
query::CheckRupee:
status: pending
status: done
query::CheckSelectPicture:
status: pending
query::CheckSellResult:
Expand Down Expand Up @@ -235,7 +235,7 @@ query::HasEnoughPayment:
query::HasItemDye:
status: done
query::HasItemDyeSpecifiedColor:
status: pending
status: done
query::HasPorchArrow:
status: done
query::HasPorchItem:
Expand All @@ -245,7 +245,7 @@ query::HasPorchItemByCategory:
query::HasPouchItemByPouchCategory:
status: done
query::HasSetItem:
status: pending
status: done
query::HasSpecificArmorSeries:
status: pending
query::IsAppAlreadyExchanged:
Expand Down Expand Up @@ -301,7 +301,7 @@ query::IsSoldOut:
query::IsSuccessEndLastDemoAction:
status: done
query::IsTerrorDisappeared:
status: pending
status: done
query::IsWaitRevival:
status: pending
query::IsWeaponDrawn:
Expand Down
22 changes: 11 additions & 11 deletions data/uking_functions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -40511,7 +40511,7 @@ Address,Quality,Size,Name
0x0000007100683e48,O,000048,_ZN5uking5query16BranchByDyeColorC1ERKN4ksys3act2ai5Query7InitArgE
0x0000007100683e78,O,000020,_ZN5uking5query16BranchByDyeColorD1Ev
0x0000007100683e8c,O,000052,_ZN5uking5query16BranchByDyeColorD0Ev
0x0000007100683ec0,U,000036,AI_Query_BranchByDyeColor::doQuery
0x0000007100683ec0,O,000036,_ZN5uking5query16BranchByDyeColor7doQueryEv
0x0000007100683ee4,O,000004,_ZN5uking5query16BranchByDyeColor10loadParamsERKN4evfl8QueryArgE
0x0000007100683ee8,O,000004,_ZN5uking5query16BranchByDyeColor10loadParamsEv
0x0000007100683eec,O,000004,_ZN4ksys3act2ai5Query10loadParamsEv
Expand Down Expand Up @@ -40595,13 +40595,13 @@ Address,Quality,Size,Name
0x00000071006870e8,O,000048,_ZN5uking5query13CheckAppPointC1ERKN4ksys3act2ai5Query7InitArgE
0x0000007100687118,O,000020,_ZN5uking5query13CheckAppPointD1Ev
0x000000710068712c,O,000052,_ZN5uking5query13CheckAppPointD0Ev
0x0000007100687160,U,000108,AI_Query_CheckAppPoint::doQuery
0x0000007100687160,O,000108,_ZN5uking5query13CheckAppPoint7doQueryEv
0x00000071006871cc,O,000204,_ZNK5uking5query13CheckAppPoint27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
0x0000007100687298,O,000092,_ZNK5uking5query13CheckAppPoint18getRuntimeTypeInfoEv
0x00000071006872f4,O,000048,_ZN5uking5query18CheckAppShopSelectC1ERKN4ksys3act2ai5Query7InitArgE
0x0000007100687324,O,000020,_ZN5uking5query18CheckAppShopSelectD1Ev
0x0000007100687338,O,000052,_ZN5uking5query18CheckAppShopSelectD0Ev
0x000000710068736c,U,000132,AI_Query_CheckAppShopSelect::doQuery
0x000000710068736c,O,000132,_ZN5uking5query18CheckAppShopSelect7doQueryEv
0x00000071006873f0,O,000204,_ZNK5uking5query18CheckAppShopSelect27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
0x00000071006874bc,O,000092,_ZNK5uking5query18CheckAppShopSelect18getRuntimeTypeInfoEv
0x0000007100687518,O,000056,_ZN5uking5query19CheckAreaTransitionC1ERKN4ksys3act2ai5Query7InitArgE
Expand Down Expand Up @@ -40712,7 +40712,7 @@ Address,Quality,Size,Name
0x0000007100689c90,O,000048,_ZN5uking5query18CheckDyeShopSelectC1ERKN4ksys3act2ai5Query7InitArgE
0x0000007100689cc0,O,000020,_ZN5uking5query18CheckDyeShopSelectD1Ev
0x0000007100689cd4,O,000052,_ZN5uking5query18CheckDyeShopSelectD0Ev
0x0000007100689d08,U,000152,AI_Query_CheckDyeShopSelect::doQuery
0x0000007100689d08,O,000152,_ZN5uking5query18CheckDyeShopSelect7doQueryEv
0x0000007100689da0,O,000204,_ZNK5uking5query18CheckDyeShopSelect27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
0x0000007100689e6c,O,000092,_ZNK5uking5query18CheckDyeShopSelect18getRuntimeTypeInfoEv
0x0000007100689ec8,O,000048,_ZN5uking5query11CheckE3ModeC1ERKN4ksys3act2ai5Query7InitArgE
Expand Down Expand Up @@ -40893,13 +40893,13 @@ Address,Quality,Size,Name
0x000000710068f09c,O,000048,_ZN5uking5query19CheckItemShopDecideC1ERKN4ksys3act2ai5Query7InitArgE
0x000000710068f0cc,O,000020,_ZN5uking5query19CheckItemShopDecideD1Ev
0x000000710068f0e0,O,000052,_ZN5uking5query19CheckItemShopDecideD0Ev
0x000000710068f114,U,000132,AI_Query_CheckItemShopDecide::doQuery
0x000000710068f114,O,000132,_ZN5uking5query19CheckItemShopDecide7doQueryEv
0x000000710068f198,O,000204,_ZNK5uking5query19CheckItemShopDecide27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
0x000000710068f264,O,000092,_ZNK5uking5query19CheckItemShopDecide18getRuntimeTypeInfoEv
0x000000710068f2c0,O,000048,_ZN5uking5query25CheckItemShopPorchVacancyC1ERKN4ksys3act2ai5Query7InitArgE
0x000000710068f2f0,O,000020,_ZN5uking5query25CheckItemShopPorchVacancyD1Ev
0x000000710068f304,O,000052,_ZN5uking5query25CheckItemShopPorchVacancyD0Ev
0x000000710068f338,U,000132,AI_Query_CheckItemShopPorchVacancy::doQuery
0x000000710068f338,O,000132,_ZN5uking5query25CheckItemShopPorchVacancy7doQueryEv
0x000000710068f3bc,O,000204,_ZNK5uking5query25CheckItemShopPorchVacancy27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
0x000000710068f488,O,000092,_ZNK5uking5query25CheckItemShopPorchVacancy18getRuntimeTypeInfoEv
0x000000710068f4e4,O,000048,_ZN5uking5query19CheckItemShopSelectC1ERKN4ksys3act2ai5Query7InitArgE
Expand All @@ -40911,7 +40911,7 @@ Address,Quality,Size,Name
0x000000710068f710,O,000048,_ZN5uking5query22CheckItemShopSelectBuyC1ERKN4ksys3act2ai5Query7InitArgE
0x000000710068f740,O,000020,_ZN5uking5query22CheckItemShopSelectBuyD1Ev
0x000000710068f754,O,000052,_ZN5uking5query22CheckItemShopSelectBuyD0Ev
0x000000710068f788,U,000128,AI_Query_CheckItemShopSelectBuy::doQuery
0x000000710068f788,O,000128,_ZN5uking5query22CheckItemShopSelectBuy7doQueryEv
0x000000710068f808,O,000204,_ZNK5uking5query22CheckItemShopSelectBuy27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
0x000000710068f8d4,O,000092,_ZNK5uking5query22CheckItemShopSelectBuy18getRuntimeTypeInfoEv
0x000000710068f930,O,000072,_ZN5uking5query23CheckLastDamageAttackerC1ERKN4ksys3act2ai5Query7InitArgE
Expand Down Expand Up @@ -40947,7 +40947,7 @@ Address,Quality,Size,Name
0x0000007100690344,O,000048,_ZN5uking5query18CheckMaterialValueC1ERKN4ksys3act2ai5Query7InitArgE
0x0000007100690374,O,000020,_ZN5uking5query18CheckMaterialValueD1Ev
0x0000007100690388,O,000052,_ZN5uking5query18CheckMaterialValueD0Ev
0x00000071006903bc,U,000120,AI_Query_CheckMaterialValue::doQuery
0x00000071006903bc,O,000120,_ZN5uking5query18CheckMaterialValue7doQueryEv
0x0000007100690434,O,000204,_ZNK5uking5query18CheckMaterialValue27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
0x0000007100690500,O,000092,_ZNK5uking5query18CheckMaterialValue18getRuntimeTypeInfoEv
0x000000710069055c,O,000056,_ZN5uking5query17CheckMiniGameTimeC1ERKN4ksys3act2ai5Query7InitArgE
Expand Down Expand Up @@ -40991,7 +40991,7 @@ Address,Quality,Size,Name
0x0000007100691624,O,000048,_ZN5uking5query20CheckPlacedItemSaledC1ERKN4ksys3act2ai5Query7InitArgE
0x0000007100691654,O,000020,_ZN5uking5query20CheckPlacedItemSaledD1Ev
0x0000007100691668,O,000052,_ZN5uking5query20CheckPlacedItemSaledD0Ev
0x000000710069169c,U,000136,AI_Query_CheckPlacedItemSaled::doQuery
0x000000710069169c,O,000136,_ZN5uking5query20CheckPlacedItemSaled7doQueryEv
0x0000007100691724,O,000204,_ZNK5uking5query20CheckPlacedItemSaled27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
0x00000071006917f0,O,000092,_ZNK5uking5query20CheckPlacedItemSaled18getRuntimeTypeInfoEv
0x000000710069184c,O,000052,_ZN5uking5query20CheckPlayerDeadCauseC1ERKN4ksys3act2ai5Query7InitArgE
Expand Down Expand Up @@ -41398,7 +41398,7 @@ Address,Quality,Size,Name
0x000000710069b634,O,000048,_ZN5uking5query24HasItemDyeSpecifiedColorC1ERKN4ksys3act2ai5Query7InitArgE
0x000000710069b664,O,000020,_ZN5uking5query24HasItemDyeSpecifiedColorD1Ev
0x000000710069b678,O,000052,_ZN5uking5query24HasItemDyeSpecifiedColorD0Ev
0x000000710069b6ac,U,000052,AI_Query_HasItemDyeSpecifiedColor::doQuery
0x000000710069b6ac,O,000052,_ZN5uking5query24HasItemDyeSpecifiedColor7doQueryEv
0x000000710069b6e0,O,000204,_ZNK5uking5query24HasItemDyeSpecifiedColor27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
0x000000710069b7ac,O,000092,_ZNK5uking5query24HasItemDyeSpecifiedColor18getRuntimeTypeInfoEv
0x000000710069b808,O,000052,_ZN5uking5query13HasPorchArrowC1ERKN4ksys3act2ai5Query7InitArgE
Expand Down Expand Up @@ -41436,7 +41436,7 @@ Address,Quality,Size,Name
0x000000710069c564,O,000076,_ZN5uking5query10HasSetItemC1ERKN4ksys3act2ai5Query7InitArgE
0x000000710069c5b0,O,000020,_ZN5uking5query10HasSetItemD1Ev
0x000000710069c5c4,O,000052,_ZN5uking5query10HasSetItemD0Ev
0x000000710069c5f8,m,000200,_ZN5uking5query10HasSetItem7doQueryEv
0x000000710069c5f8,O,000200,_ZN5uking5query10HasSetItem7doQueryEv
0x000000710069c6c0,O,000112,_ZN5uking5query10HasSetItem10loadParamsERKN4evfl8QueryArgE
0x000000710069c730,O,000100,_ZN5uking5query10HasSetItem10loadParamsEv
0x000000710069c794,O,000204,_ZNK5uking5query10HasSetItem27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
Expand Down
8 changes: 6 additions & 2 deletions src/Game/AI/Query/queryBranchByDyeColor.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#include "Game/AI/Query/queryBranchByDyeColor.h"
#include <evfl/Query.h>
#include "KingSystem/GameData/gdtCommonFlagsUtils.h"

namespace uking::query {

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

BranchByDyeColor::~BranchByDyeColor() = default;

// FIXME: implement
int BranchByDyeColor::doQuery() {
return -1;
auto index = ksys::gdt::getFlag_ColorChange_MaterialIndex();
if (index >= 1 && index <= 15) {
return index;
}
return 0;
}

void BranchByDyeColor::loadParams(const evfl::QueryArg& arg) {}
Expand Down
6 changes: 4 additions & 2 deletions src/Game/AI/Query/queryCheckAppPoint.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#include "Game/AI/Query/queryCheckAppPoint.h"
#include <evfl/Query.h>
#include "KingSystem/GameData/gdtSpecialFlags.h"

namespace uking::query {

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

CheckAppPoint::~CheckAppPoint() = default;

// FIXME: implement
int CheckAppPoint::doQuery() {
return -1;
s32 reach = ksys::gdt::getS32ByKey("ReachPointActorDiscoverNum");
s32 use = ksys::gdt::getS32ByKey("App_ExtendUsePoint");
return reach - use > 1;
}

void CheckAppPoint::loadParams(const evfl::QueryArg& arg) {}
Expand Down
16 changes: 14 additions & 2 deletions src/Game/AI/Query/queryCheckAppShopSelect.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
#include "Game/AI/Query/queryCheckAppShopSelect.h"
#include <evfl/Query.h>
#include "KingSystem/GameData/gdtManager.h"

namespace uking::query {

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

CheckAppShopSelect::~CheckAppShopSelect() = default;

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

void CheckAppShopSelect::loadParams(const evfl::QueryArg& arg) {}
Expand Down
16 changes: 14 additions & 2 deletions src/Game/AI/Query/queryCheckDyeShopSelect.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
#include "Game/AI/Query/queryCheckDyeShopSelect.h"
#include <evfl/Query.h>
#include "KingSystem/GameData/gdtManager.h"

namespace uking::query {

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

CheckDyeShopSelect::~CheckDyeShopSelect() = default;

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

void CheckDyeShopSelect::loadParams(const evfl::QueryArg& arg) {}
Expand Down
11 changes: 9 additions & 2 deletions src/Game/AI/Query/queryCheckItemShopDecide.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
#include "Game/AI/Query/queryCheckItemShopDecide.h"
#include <evfl/Query.h>
#include "KingSystem/GameData/gdtManager.h"

namespace uking::query {

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

CheckItemShopDecide::~CheckItemShopDecide() = default;

// FIXME: implement
int CheckItemShopDecide::doQuery() {
return -1;
bool decide = false;
auto* gdm = ksys::gdt::Manager::instance();
if (gdm != nullptr) {
if (gdm->getParam().get().getBool(&decide, "Shop_IsDecide") && decide) {
return 1;
}
}
return 0;
}

void CheckItemShopDecide::loadParams(const evfl::QueryArg& arg) {}
Expand Down
12 changes: 10 additions & 2 deletions src/Game/AI/Query/queryCheckItemShopPorchVacancy.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "Game/AI/Query/queryCheckItemShopPorchVacancy.h"
#include <evfl/Query.h>
#include "KingSystem/GameData/gdtManager.h"

namespace uking::query {

Expand All @@ -8,9 +9,16 @@ CheckItemShopPorchVacancy::CheckItemShopPorchVacancy(const InitArg& arg)

CheckItemShopPorchVacancy::~CheckItemShopPorchVacancy() = default;

// FIXME: implement
int CheckItemShopPorchVacancy::doQuery() {
return -1;
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) {}
Expand Down
11 changes: 9 additions & 2 deletions src/Game/AI/Query/queryCheckItemShopSelectBuy.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
#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;

// FIXME: implement
int CheckItemShopSelectBuy::doQuery() {
return -1;
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) {}
Expand Down
Loading
Loading