From a6f0c4add70d0e2ba642fa2f8b31269ffa0ea383 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 21:30:17 +0000 Subject: [PATCH] Decompile fn_09381 (UICashEmotionListChildWnd_Search::AddResults) Batch #8810 by kyoshi: 0 byte-identical, 1 confirmed by peer review. - fn_09381 UICashEmotionListChildWnd_Search::AddResults: logic confirmed by peer review Peer-reviewed-by: eAthena, gordaoprogramas, System4z Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/CashEmotionMgr.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Source/Contents/CashEmotionMgr.cpp b/Source/Contents/CashEmotionMgr.cpp index cd526482..75db17c2 100644 --- a/Source/Contents/CashEmotionMgr.cpp +++ b/Source/Contents/CashEmotionMgr.cpp @@ -1789,6 +1789,35 @@ const char* UICashEmotionListChildWnd_Search::Filter() { } // OFFSET: 0x007C59A0 +// FUNCTION: fn_09381 +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); + } else { + pack = new (std::nothrow) UICashEmotionPack_Search(*this->m_context); + } + if (!pack) { + return; + } + + pack->SetSize(243, 135); + const char* title = nullptr; + if (type == 1) { + title = g_simpleStringMgr->GetString("EMSG_SEARCH_WND_BASIC_TITLE"); + } else if (type == 2) { + title = g_simpleStringMgr->GetString("EMSG_SEARCH_WND_PURCHASE_TITLE"); + } else if (type == 3) { + title = g_simpleStringMgr->GetString("EMSG_SEARCH_WND_UNPURCHASED_TITLE"); + } + const int height = pack->SetResults(title, results); + pack->Resize(243, height); + pack->Move(9, y); + y += height; + + this->AddChild(pack); + this->m_items.push_back(pack); +} // OFFSET: 0x007C5D80 // FUNCTION: fn_09383