From 1a162f0f4b56c81b0a4ecc2f216ef07dcfd5ec6b Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 3 Nov 2026 21:50:07 +0000 Subject: [PATCH] Maintenance: Fold alias global gl_25097 g_saleOpenWindow (0x1457854) into its evidenced owner member g_windowMgr.unknown_01D4. 0x1457 Batch #10396 by ragnarok-clanker: no function's compiled code changes; checked with 190 compiled unit(s), including every includer of Source/Client/Mode/CGameMode.h. --- Source/Client/Mode/CGameMode.h | 1 - Source/Client/Mode/GameModePackets.cpp | 7 ++----- Source/Contents/Configuration/ServiceOptions.cpp | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Source/Client/Mode/CGameMode.h b/Source/Client/Mode/CGameMode.h index 15027e17..f2ab2e62 100644 --- a/Source/Client/Mode/CGameMode.h +++ b/Source/Client/Mode/CGameMode.h @@ -1025,7 +1025,6 @@ static_assert(sizeof(CGameMode) == 0x670); extern char g_pendingWhisperCount; extern int g_whisperRecord; extern int g_timeAttackStart; -extern UIWindow* g_saleOpenWindow; void sub_CCFF10(); extern int g_localMapMove; extern unsigned char g_gameModePacketBuffer[0x10000]; diff --git a/Source/Client/Mode/GameModePackets.cpp b/Source/Client/Mode/GameModePackets.cpp index f578e7f0..5b98c98f 100644 --- a/Source/Client/Mode/GameModePackets.cpp +++ b/Source/Client/Mode/GameModePackets.cpp @@ -137,9 +137,6 @@ char g_pendingWhisperCount; // GLOBAL: gl_25102 int g_whisperRecord; -// GLOBAL: gl_25097 -UIWindow* g_saleOpenWindow; - // GLOBAL: gl_25098 UIWindow* g_saleResultWindow; @@ -1897,8 +1894,8 @@ void __declspec(noinline) __stdcall sub_D08670(int field14, int itemId, int quan UIWindow* window = g_windowMgr.EnsureWindow(0x102); window->SendMsg(nullptr, 0x17, reinterpret_cast(&item), field10, field14, 0); g_session.RemoveItem1758ByItemId(item); - if (g_saleOpenWindow != nullptr) { - g_saleOpenWindow->SendMsg(nullptr, 0x17, 0, 0, 0, 0); + if (g_windowMgr.unknown_01D4 != nullptr) { + g_windowMgr.unknown_01D4->SendMsg(nullptr, 0x17, 0, 0, 0, 0); } if (g_saleResultWindow != nullptr) { g_saleResultWindow->SendMsg(nullptr, 0x77, fieldC, 0, 0, 0); diff --git a/Source/Contents/Configuration/ServiceOptions.cpp b/Source/Contents/Configuration/ServiceOptions.cpp index 8dc13e05..2f304948 100644 --- a/Source/Contents/Configuration/ServiceOptions.cpp +++ b/Source/Contents/Configuration/ServiceOptions.cpp @@ -948,8 +948,8 @@ void ApplyServiceOptionItemWnd(int id, unsigned char value, bool notify, int ena } } - if (g_saleOpenWindow != nullptr) { - static_cast(g_saleOpenWindow)->RefreshOptionBox(); + if (g_windowMgr.unknown_01D4 != nullptr) { + static_cast(g_windowMgr.unknown_01D4)->RefreshOptionBox(); } }