Conversation
Pistonight
left a comment
There was a problem hiding this comment.
feel free to send decompme if you have questions about the suggestions
@Pistonight made 6 comments.
Reviewable status: 0 of 13 files reviewed, 5 unresolved discussions (waiting on hgh32).
src/Game/AI/Query/queryCheckItemShopPorchVacancy.cpp line 16 at r1 (raw file):
if (gdm != nullptr) { int isp = -1; if (gdm->getParam().get().getS32(&isp, "Shop_CurrentItemState") && (isp == 7)) {
I think it's possible these are inlined helpers in GDT Mgr , like gdm->getS32ByName(...)
src/Game/AI/Query/queryCheckAppShopSelect.cpp line 14 at r1 (raw file):
auto* gdm = ksys::gdt::Manager::instance(); if (gdm != nullptr) { int as = -1;
as -> screen_type, same for other files
src/Game/AI/Query/queryHasItemDyeSpecifiedColor.cpp line 14 at r1 (raw file):
int HasItemDyeSpecifiedColor::doQuery() { s32 sis = ksys::gdt::getFlag_Shop_ItemState(); switch (sis) {
are you sure this is a switch statement and not return state == 0 || state == 9;?
src/Game/AI/Query/queryBranchByDyeColor.cpp line 12 at r1 (raw file):
int BranchByDyeColor::doQuery() { auto ccm = ksys::gdt::getFlag_ColorChange_MaterialIndex();
could we have more readable variable names? i.e. color_change_material_index or index
src/Game/AI/Query/queryCheckPlacedItemSaled.cpp line 21 at r1 (raw file):
ics = 1; } }
Try collapsing the 2 variables
Suggestion:
int state = 2;
if (gdm != nullptr) {
gdm->getParamBypassPerm().get().getS32(&state, "PlacedItemCountState");
if (state == 3) {
state = 1;
}
}|
except inline should be done |
This change is