From a5ad4d3ada892e19b991977ea15be5449e91b7dc Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Mon, 2 Nov 2026 12:21:44 +0000 Subject: [PATCH] Confirm fn_12414 (UInCashWnd::Slot11) Batch #9975 by ragnarok-clanker: 1 byte-identical, 0 confirmed by peer review. - fn_12414 UInCashWnd::Slot11: byte-identical (already on main) Merged automatically: every function is byte-identical to the original. --- Source/UI/Acceptance/UIChooseSellBuyWnd.cpp | 31 ++++++++++++++++----- Source/UI/Shop/UInCash_CallWnd.h | 6 ++-- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp index 7a7d0078..5ff5c417 100644 --- a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp +++ b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp @@ -3387,7 +3387,7 @@ void UIPetEggListWnd::Paint() { void UInCashWnd::DrawItems() { int row = 0; int index = 0; - for (auto it = this->m_items.begin(); it != this->m_items.end(); ++it, ++index) { + for (auto it = this->items.begin(); it != this->items.end(); ++it, ++index) { if (index < this->m_page * 8 - 8) { continue; } @@ -4951,13 +4951,13 @@ ITEM_INFO UInCashWnd::ItemAt(int x, int y) { const SessionMessengerContext& lists = reinterpret_cast(g_session); int top = this->m_listTop; if (x < 252) { - std::list::iterator it = this->m_items.begin(); + std::list::iterator it = this->items.begin(); for (int row = 0; row < 4; ++row) { if (y >= top && y <= top + this->m_rowHeight) { int index = row + (this->m_page - 1) * 8; int count = lists.GetList1788(this->m_tab); if (this->m_tab == 8) { - count = static_cast(this->m_items.size()); + count = static_cast(this->items.size()); } if (count <= index) { return ITEM_INFO(0); @@ -4970,17 +4970,17 @@ ITEM_INFO UInCashWnd::ItemAt(int x, int y) { } top += this->m_rowHeight; } - return it != this->m_items.end() ? *it : ITEM_INFO(0); + return it != this->items.end() ? *it : ITEM_INFO(0); } if (x < 444) { - std::list::iterator it = this->m_items.begin(); + std::list::iterator it = this->items.begin(); for (int row = 0; row < 4; ++row) { if (y >= top && y <= top + this->m_rowHeight) { int index = this->m_page * 8 - 4 + row; int count = lists.GetList1788(this->m_tab); if (this->m_tab == 8) { - count = static_cast(this->m_items.size()); + count = static_cast(this->items.size()); } if (count <= index) { return ITEM_INFO(0); @@ -4993,7 +4993,7 @@ ITEM_INFO UInCashWnd::ItemAt(int x, int y) { } top += this->m_rowHeight; } - return it != this->m_items.end() ? *it : ITEM_INFO(0); + return it != this->items.end() ? *it : ITEM_INFO(0); } int index = 0; @@ -7646,6 +7646,23 @@ void UIEquipWnd::Slot25(int x, int y) { } } +// OFFSET: 0x008C9880 +UInCashWnd::UInCashWnd(UIWindowContext& windows, UIFrameContext& frames) : UIItemBaseWnd(windows, frames) { + this->m_placement = nullptr; + this->m_tab = 0; + this->m_selected = 0; + this->m_pageCount = 0; + this->m_page = 0; + this->m_selectedIndex = 0; + this->m_totalPrice = 0; + this->m_firstOther = 0; + this->m_pointBalance = 0; + this->m_cashBalance = 0; + this->m_rowHeight = 106; + this->m_listTop = 56; + this->m_listHeight = 32; +} + // OFFSET: 0x008F33F0 // FUNCTION: fn_12267 void UInCashWnd::Slot26(int x, int y) { diff --git a/Source/UI/Shop/UInCash_CallWnd.h b/Source/UI/Shop/UInCash_CallWnd.h index 2b3d256f..63c6d115 100644 --- a/Source/UI/Shop/UInCash_CallWnd.h +++ b/Source/UI/Shop/UInCash_CallWnd.h @@ -2,6 +2,7 @@ #define RAGNAROK_SOURCE_UI_SHOP_UINCASH_CALLWND_H #include "Contents/Items/ItemInfo.h" +#include "UI/Item/UIItemBaseWnd.h" #include "UI/Window/UIFrameWnd.h" #include @@ -9,8 +10,9 @@ struct WindowPlacement; class UIScrollBar; -class UInCashWnd : public UIFrameWnd { +class UInCashWnd : public UIItemBaseWnd { public: + UInCashWnd(UIWindowContext& windows, UIFrameContext& frames); bool Slot03() override; void Slot10(int x, int y, std::intptr_t value) override; void Slot11() override; @@ -22,8 +24,6 @@ public: ITEM_INFO ItemAt(int x, int y); void DrawItems(); - /* 00B4 */ unsigned char unknown_00B4[0x34]; - /* 00E8 */ std::list m_items; /* 00F0 */ unsigned char unknown_00F0[0x08]; /* 00F8 */ std::list m_otherItems; /* 0100 */ WindowPlacement* m_placement;