From bd56c39fc434964a196fd341b2cd6d1fe44700ab Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 7 Nov 2026 06:46:04 +0000 Subject: [PATCH] Decompile fn_04173 (UILapineBox_IngredientListWnd::SendMsg) Batch #13756 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_04173 UILapineBox_IngredientListWnd::SendMsg: logic confirmed by peer review Peer-reviewed-by: Yommy, secret, aDw Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/UILapineBoxWnd.cpp | 46 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Source/UI/UILapineBoxWnd.cpp b/Source/UI/UILapineBoxWnd.cpp index 7013c4e59..f419ead4b 100644 --- a/Source/UI/UILapineBoxWnd.cpp +++ b/Source/UI/UILapineBoxWnd.cpp @@ -415,17 +415,6 @@ int UILapineBoxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: int UILapineBox_IngredientListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { switch (message) { - case 6: - for (std::vector::iterator it = this->items.begin(); it != this->items.end(); ++it) { - UIIngredientInfoWnd* entry = *it; - if (sender != entry) { - entry->selected = 0; - entry->Invalidate(); - } - } - this->Invalidate(); - break; - case 0x17: for (std::vector::iterator material = this->materials.begin(); material != this->materials.end(); ++material) { std::vector ids = g_session.FindInventoryIndicesByItemId(std::atoi(material->itemId.c_str()), 1); @@ -443,24 +432,16 @@ int UILapineBox_IngredientListWnd::SendMsg(UIWindow* sender, int message, std::i this->SendMsg(this, 0x57, 0, 0, 0, 0); break; - case 0x57: { - int y = 7; - for (std::vector::iterator it = this->items.begin(); it != this->items.end();) { + case 6: + for (std::vector::iterator it = this->items.begin(); it != this->items.end(); ++it) { UIIngredientInfoWnd* entry = *it; - if (entry->geometry.visible == 0) { + if (sender != entry) { + entry->selected = 0; entry->Invalidate(); - it = this->items.erase(it); - } else { - this->MoveScrollChild(entry, 0, y); - (*it)->Invalidate(); - ++it; - y += 0x1E; } } - this->Slot53(); this->Invalidate(); break; - } case 0x68: { std::vector::iterator it; @@ -509,6 +490,25 @@ int UILapineBox_IngredientListWnd::SendMsg(UIWindow* sender, int message, std::i break; } + case 0x57: { + int y = 7; + for (std::vector::iterator it = this->items.begin(); it != this->items.end();) { + UIIngredientInfoWnd* entry = *it; + if (entry->geometry.visible == 0) { + entry->Invalidate(); + it = this->items.erase(it); + } else { + this->MoveScrollChild(entry, 0, y); + (*it)->Invalidate(); + ++it; + y += 0x1E; + } + } + this->Slot53(); + this->Invalidate(); + break; + } + default: break; }