query: Implement CheckFame

This commit is contained in:
Léo Lam 2021-03-26 14:55:58 +01:00
parent d39e8400fc
commit 0e07294548
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
3 changed files with 12 additions and 4 deletions

View File

@ -73,7 +73,7 @@ query::CheckExtraLifeOfPlayer:
query::CheckFadeState:
status: pending
query::CheckFame:
status: pending
status: done
query::CheckFlag:
status: done
query::CheckGameDataFloat:

View File

@ -40787,7 +40787,7 @@
0x000000710068ca88,AI_Query_CheckFame::ctor,52,_ZN5uking5query9CheckFameC1ERKN4ksys3act2ai5Query7InitArgE
0x000000710068cabc,AI_Query_CheckFame::dtor,20,_ZN5uking5query9CheckFameD1Ev
0x000000710068cad0,AI_Query_CheckFame::dtorDelete,52,_ZN5uking5query9CheckFameD0Ev
0x000000710068cb04,AI_Query_CheckFame::doQuery,152,
0x000000710068cb04,AI_Query_CheckFame::doQuery,152,_ZN5uking5query9CheckFame7doQueryEv
0x000000710068cb9c,AI_Query_CheckFame::m10,64,_ZN5uking5query9CheckFame10loadParamsERKN4evfl8QueryArgE
0x000000710068cbdc,AI_Query_CheckFame::loadParams,64,_ZN5uking5query9CheckFame10loadParamsEv
0x000000710068cc1c,AI_Query_CheckFame::rtti1,204,_ZNK5uking5query9CheckFame27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE

Can't render this file because it is too large.

View File

@ -1,5 +1,6 @@
#include "Game/AI/Query/queryCheckFame.h"
#include <evfl/query.h>
#include "KingSystem/GameData/gdtManager.h"
namespace uking::query {
@ -7,9 +8,16 @@ CheckFame::CheckFame(const InitArg& arg) : ksys::act::ai::Query(arg) {}
CheckFame::~CheckFame() = default;
// FIXME: implement
int CheckFame::doQuery() {
return -1;
auto* gdm = ksys::gdt::Manager::instance();
if (!gdm)
return 0;
int fame = 0;
if (!gdm->getParamBypassPerm().get().getS32(&fame, "FamouseValue")) // sic
return 0;
return fame >= *mValue;
}
void CheckFame::loadParams(const evfl::QueryArg& arg) {