From 09f4285a2ef7971ea9ce6685b574c679bcdcddf8 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Mon, 2 Nov 2026 22:11:24 +0000 Subject: [PATCH] Maintenance: [forced, user-approved] Family G8: type CSession +0x61A8/+0x61AC (replaces G7's *(int*)unknown_61A8_0000 cast). Original Batch #10203 by ragnarok-clanker: forced by an admin (0 lower score(s), 0 changed function(s)); checked with 214 compiled unit(s), including every includer of Source/Client/Session.h. --- Source/Client/Mode/GameMode.cpp | 2 +- Source/Client/Session.cpp | 4 ++-- Source/Client/Session.h | 3 ++- Source/Contents/Skills/AutomaticSkills.cpp | 2 +- Source/UI/Window/UIWindowMgr.cpp | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Source/Client/Mode/GameMode.cpp b/Source/Client/Mode/GameMode.cpp index 8ee80599..ab9b0031 100644 --- a/Source/Client/Mode/GameMode.cpp +++ b/Source/Client/Mode/GameMode.cpp @@ -3549,7 +3549,7 @@ void CGameMode::InitializeState() { *reinterpret_cast(this->unknown_0600) = 0; s_signBoardMgr->Initialize(); g_statusRefreshSuppressed = 0; - int& localMapMove = *reinterpret_cast(&g_session.unknown_61A8[4]); + int& localMapMove = g_session.m_localMapMove; if (localMapMove == 1) { localMapMove = 0; } diff --git a/Source/Client/Session.cpp b/Source/Client/Session.cpp index 236310bc..5c10273f 100644 --- a/Source/Client/Session.cpp +++ b/Source/Client/Session.cpp @@ -3063,7 +3063,7 @@ void CSession::Init() { this->m_lastIntervalTime = timeGetTime(); this->unknown_61A4 = 0; - *reinterpret_cast(this->unknown_61A8_0000) = 0; + this->m_currentHotkey = 0; this->unknown_1010 = 0xFFFFFFFF; *reinterpret_cast(&this->unknown_5570[0x08]) = -1; *reinterpret_cast(&this->unknown_5620[0x08]) = -1; @@ -4752,7 +4752,7 @@ CSession::CSession() { } this->m_newRobeDrawOnTop = false; - *reinterpret_cast(&this->unknown_61A8_0000[4]) = 0; + this->m_localMapMove = 0; this->m_swapEquipmentMode = 0; this->unknown_7F74[0] = 1; *reinterpret_cast(&this->unknown_7F74[4]) = 0; diff --git a/Source/Client/Session.h b/Source/Client/Session.h index e6b9acb2..b66bb6bd 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -543,7 +543,8 @@ public: union { /* 61A8 */ unsigned char unknown_61A8[0x10]; struct { - /* 61A8 */ unsigned char unknown_61A8_0000[0x08]; + /* 61A8 */ int m_currentHotkey; + /* 61AC */ int m_localMapMove; /* 61B0 */ bool m_guildMemberListSort; /* 61B1 */ unsigned char unknown_61B1; /* 61B2 */ bool m_blockPrivateTab; diff --git a/Source/Contents/Skills/AutomaticSkills.cpp b/Source/Contents/Skills/AutomaticSkills.cpp index de4937e9..a897fa37 100644 --- a/Source/Contents/Skills/AutomaticSkills.cpp +++ b/Source/Contents/Skills/AutomaticSkills.cpp @@ -89,7 +89,7 @@ void AutomaticSkills::Use(std::int16_t id, std::int16_t level, std::uint32_t tar Cancel(id); g_session.SetOption(cancel, 0, 0); } else { - g_session.unknown_61A4 = *reinterpret_cast(g_session.unknown_61A8_0000); + g_session.unknown_61A4 = g_session.m_currentHotkey; g_session.SetOption(ActiveOption(id), 1, 0); } } diff --git a/Source/UI/Window/UIWindowMgr.cpp b/Source/UI/Window/UIWindowMgr.cpp index 169f45a6..ad87a6a9 100644 --- a/Source/UI/Window/UIWindowMgr.cpp +++ b/Source/UI/Window/UIWindowMgr.cpp @@ -1440,7 +1440,7 @@ bool UIWindowMgr::ProcessKeyDown(int key, int keyData, int pressed) { } } - int& lastKey = *reinterpret_cast(g_session.unknown_61A8_0000); + int& lastKey = g_session.m_currentHotkey; if (lastKey != key) { if (pressed == 0) { return this->ProcessHotkeyAction(key, pressed);