From dec68dbf7eb7980c70b9e8728d12cd8d8ecaf62a Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 07:22:21 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/UserData/NormalItemSlots.cpp Batch #18023 by eAthena: 2 byte-identical, 0 confirmed by peer review. - fn_13628 EquipWndInfo::IsValid: byte-identical - fn_13650 MerchantItemShopWndInfo::IsValid: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Contents/UserData/NormalItemSlots.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Source/Contents/UserData/NormalItemSlots.cpp b/Source/Contents/UserData/NormalItemSlots.cpp index 1f1eb1f69..54d1260e9 100644 --- a/Source/Contents/UserData/NormalItemSlots.cpp +++ b/Source/Contents/UserData/NormalItemSlots.cpp @@ -140,7 +140,10 @@ int EquipWndInfo::IsValid() const { return 0; } - const int extraHeight = g_session.m_swapEquipmentMode == 1 ? 158 : 0; + int extraHeight = 0; + if (g_session.m_swapEquipmentMode == 1) { + extraHeight = 158; + } if (this->height != 167 && this->height != 17 && this->height != 187 && this->height != 187 + extraHeight) { return 0; } @@ -148,7 +151,11 @@ int EquipWndInfo::IsValid() const { return 0; } - return this->x >= 0 && this->x <= g_renderer->viewport.width - 280 && this->y >= 0 && this->y <= g_renderer->viewport.height - this->height; + if (this->x >= 0 && this->x <= g_renderer->viewport.width - 280 && this->y >= 0 && this->y <= g_renderer->viewport.height - this->height) { + return 1; + } + + return 0; } // OFFSET: 0x009A5460 @@ -300,7 +307,11 @@ int MerchantItemShopWndInfo::IsValid(bool wide) const { return 0; } - return this->height >= 120 && this->x >= 0 && this->x <= g_renderer->viewport.width - this->width && this->y >= 0 && this->y <= g_renderer->viewport.height - this->height; + if (this->height >= 120 && this->x >= 0 && this->x <= g_renderer->viewport.width - this->width && this->y >= 0 && this->y <= g_renderer->viewport.height - this->height) { + return 1; + } + + return 0; } // OFFSET: 0x009A5B00