From 2efaf2d0a8820f4240bbd74f9cf9f515ccf64398 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 21:56:06 +0000 Subject: [PATCH] Decompile fn_09382 (UICashEmotionListChildWnd_Search::Refresh) Batch #8840 by KWDev: 0 byte-identical, 1 confirmed by peer review. - fn_09382 UICashEmotionListChildWnd_Search::Refresh: logic confirmed by peer review Peer-reviewed-by: gordaoprogramas, System4z, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/CashEmotionMgr.cpp | 32 ++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/Source/Contents/CashEmotionMgr.cpp b/Source/Contents/CashEmotionMgr.cpp index 4b04b0c2..7e12325a 100644 --- a/Source/Contents/CashEmotionMgr.cpp +++ b/Source/Contents/CashEmotionMgr.cpp @@ -235,6 +235,7 @@ public: void Slot15(int width, int height) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; + void Refresh(const char* filter) override; const char* Filter() override; void AddResults(char type, const std::vector>& results, int& y); @@ -1578,7 +1579,7 @@ UICashEmotionListChildWnd_Abstract::UICashEmotionListChildWnd_Abstract(UIWindowC // OFFSET: 0x007C3990 // FUNCTION: fn_09343 -void UICashEmotionScrollWnd::UpdateScrollBars() { +__declspec(noinline) void UICashEmotionScrollWnd::UpdateScrollBars() { if (!this->horizontalBar) { this->horizontalBar = new (std::nothrow) UICashEmotionScrollBar(*this->m_context); if (this->horizontalBar) { @@ -1791,7 +1792,7 @@ const char* UICashEmotionListChildWnd_Search::Filter() { // OFFSET: 0x007C59A0 // FUNCTION: fn_09381 -void UICashEmotionListChildWnd_Search::AddResults(char type, const std::vector>& results, int& y) { +__declspec(noinline) void UICashEmotionListChildWnd_Search::AddResults(char type, const std::vector>& results, int& y) { UICashEmotionPack_Search* pack; if (type == 3) { pack = new (std::nothrow) UICashEmotionPack_Search_UnPurchased(*this->m_context); @@ -1820,6 +1821,33 @@ void UICashEmotionListChildWnd_Search::AddResults(char type, const std::vectorm_items.push_back(pack); } +// OFFSET: 0x007C5B10 +// FUNCTION: fn_09382 +__declspec(noinline) void UICashEmotionListChildWnd_Search::Refresh(const char* filter) { + g_windowMgr.ClearWindow01B8(); + this->m_items.clear(); + this->Clear(); + this->horizontalBar = nullptr; + this->scrollBar = nullptr; + if (filter && std::strlen(filter) >= 1) { + this->m_filter.assign(filter, std::strlen(filter)); + } else { + this->m_filter.assign("", 0); + } + + int y = 0; + std::vector> basePack; + std::vector> ownedPacks; + std::vector> otherPacks; + g_cashEmotionMgr->Search(filter, basePack, ownedPacks, otherPacks); + if (!basePack.empty() || !ownedPacks.empty() || !otherPacks.empty()) { + this->AddResults(1, basePack, y); + this->AddResults(2, ownedPacks, y); + this->AddResults(3, otherPacks, y); + } + this->UpdateScrollBars(); +} + // OFFSET: 0x007C5D80 // FUNCTION: fn_09383 void UICashEmotionListChildWnd_Search::Slot15(int, int) {