From bf8a63e6c43dda1238ab8ceea59cd44b7f318d9d Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Mon, 9 Nov 2026 20:49:45 +0000 Subject: [PATCH] Decompile 5 functions in Source/UI/UILapineUpgradeBoxWnd.cpp Batch #15212 by Yommy: 0 byte-identical, 5 confirmed by peer review. - fn_04200 UILapineUpgradeBoxWnd::Paint: logic confirmed by peer review - fn_04205 UILapineUpgradeBoxWnd::OnLBtnDown: logic confirmed by peer review - fn_04206 UILapineUpgradeBox_IngredientInfoWnd::OnLBtnDown: logic confirmed by peer review - fn_04210 UILapineUpgradeBoxWnd::OnProcess: logic confirmed by peer review - fn_04220 UILapineUpgradeBox_IngredientListWnd::AddIngredient: logic confirmed by peer review Peer-reviewed-by: eAthena, alisonrag Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/UILapineUpgradeBoxWnd.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/UI/UILapineUpgradeBoxWnd.cpp b/Source/UI/UILapineUpgradeBoxWnd.cpp index 71a8d9362..0673b0cfc 100644 --- a/Source/UI/UILapineUpgradeBoxWnd.cpp +++ b/Source/UI/UILapineUpgradeBoxWnd.cpp @@ -161,7 +161,7 @@ void UILapineUpgradeBoxWnd::Paint() { this->DrawCenteredText(35, 47, LookupMessage(MSI_LAPINE_FAIL_NOT_ENOUGH_REFINING_LEVEL), 156, 0, 11, 0xCD7A51, 0); this->DrawCenteredText(35, 63, this->description.c_str(), 156, 0, 11, 0x844A42, 0); - if (this->item.identity[1] != 0) { + if (this->item.identity[1] > 0) { DrawItemIcon(*this, ResourceMgr::Instance(), 101, 165, this->item, 0); } @@ -223,7 +223,7 @@ void UILapineUpgradeBoxWnd::OnLBtnDown(int x, int y) { if (y < 17) { UIFrameWnd::OnLBtnDown(x, y); } - if (static_cast(x - 101) <= 24 && static_cast(y - 165) <= 24 && this->item.identity[1] != 0) { + if (static_cast(x - 101) <= 24 && static_cast(y - 165) <= 24 && this->item.identity[1] > 0) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 26, this->item, 1, -1); } } @@ -231,7 +231,7 @@ void UILapineUpgradeBoxWnd::OnLBtnDown(int x, int y) { // OFFSET: 0x00603E80 // FUNCTION: fn_04206 void UILapineUpgradeBox_IngredientInfoWnd::OnLBtnDown(int x, int y) { - if (this->item.identity[1] != 0) { + if (this->item.identity[1] > 0) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 27, this->item, this->quantity, -1); } } @@ -431,14 +431,14 @@ void UILapineUpgradeBoxWnd::OnProcess() { this->selectButton->Invalidate(); this->Invalidate(); } - } else if (this->selectButton->Disabled() == 1 && this->item.identity[1] == 0) { + } else if (this->selectButton->Disabled() == 1 && this->item.identity[1] <= 0) { this->selectButton->SetDisabled(0); this->selectButton->Invalidate(); this->Invalidate(); } if (this->waiting == 0) { - if (this->item.identity[1] != 0) { + if (this->item.identity[1] > 0) { if (this->upgradeButton->Disabled() == 1) { this->upgradeButton->SetDisabled(0); this->upgradeButton->Invalidate(); @@ -499,13 +499,13 @@ void UILapineUpgradeBoxWnd::AddMaterial(int id) { // FUNCTION: fn_04220 bool UILapineUpgradeBox_IngredientListWnd::AddIngredient(std::uint32_t identity) { ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, identity); - if (owned.identity[1] == 0) { + if (owned.identity[1] <= 0) { return false; } - const int itemId = std::atoi(owned.itemId.c_str()); if (owned.refiningLevel < this->minRefine || owned.refiningLevel > this->maxRefine || owned.optionCount < this->minOptionCount) { return false; } + const int itemId = std::atoi(owned.itemId.c_str()); if ((g_session.IsPetEgg(itemId) == 1 && owned.damaged == 1) || g_session.HasSwapEquipmentItem(owned.identity[1]) == 1) { return false; }