From 454304132fd5dabc69a8329a69e416838f020fff Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 16:23:16 +0000 Subject: [PATCH] Maintenance: Fix LNK2001/2019: batch 18550 declared CSession::ResolveAccountServiceBase() but fn_23360 was defined as a free 5-arg fu Batch #18595 by ragnarok-clanker: forced by an admin (0 lower score(s), 6 changed function(s)); checked with 6 compiled unit(s). --- Source/Contents/Emblems/EmblemDataMgr.cpp | 3 +-- Source/Contents/Party/AdventurerAgencyMgr.cpp | 1 - Source/Contents/Store/MCStoreInfoBackup.cpp | 1 - .../Contents/UserData/AccountLinkedUserDataMgr.cpp | 3 +-- Source/Contents/UserData/AccountService.cpp | 13 ++++++------- .../UserData/CharacterLinkedUserDataMgr.cpp | 1 - 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Source/Contents/Emblems/EmblemDataMgr.cpp b/Source/Contents/Emblems/EmblemDataMgr.cpp index c4be36feb..7a8018120 100644 --- a/Source/Contents/Emblems/EmblemDataMgr.cpp +++ b/Source/Contents/Emblems/EmblemDataMgr.cpp @@ -1,4 +1,3 @@ -#include "Contents/UserData/AccountService.h" #include "Contents/Async/AsyncWorkMgr.h" #include "Contents/Emblems/EmblemDataMgr.h" #include "Client/Session/Session.h" @@ -56,7 +55,7 @@ void CEmblemDataMgr::Shutdown() { // OFFSET: 0x005EB580 // FUNCTION: fn_03974 void CEmblemDataMgr::RefreshUrls(LuaScript& settings, LuaScript& tables, const char* host, const char* port, const char* overrideKey) { - const std::string base = ResolveAccountServiceBase(settings, tables, host, port, overrideKey); + const std::string base = g_session.ResolveAccountServiceBase(); if (!base.empty()) { { diff --git a/Source/Contents/Party/AdventurerAgencyMgr.cpp b/Source/Contents/Party/AdventurerAgencyMgr.cpp index f82a537bb..0d688a4ae 100644 --- a/Source/Contents/Party/AdventurerAgencyMgr.cpp +++ b/Source/Contents/Party/AdventurerAgencyMgr.cpp @@ -1,6 +1,5 @@ #include "Client/Session/Session.h" #include "Contents/Configuration/ServiceConfiguration.h" -#include "Contents/UserData/AccountService.h" #include "Contents/Party/AdventurerAgencyMgr.h" #include "Script/LuaScript.h" diff --git a/Source/Contents/Store/MCStoreInfoBackup.cpp b/Source/Contents/Store/MCStoreInfoBackup.cpp index 4b1219639..f147d8063 100644 --- a/Source/Contents/Store/MCStoreInfoBackup.cpp +++ b/Source/Contents/Store/MCStoreInfoBackup.cpp @@ -1,5 +1,4 @@ #include "UI/Window/UIEnums.h" -#include "Contents/UserData/AccountService.h" #include "Contents/Async/AsyncWorkMgr.h" #include "Contents/Store/MCStoreInfoBackup.h" #include "Contents/Tables/MessageTable.h" diff --git a/Source/Contents/UserData/AccountLinkedUserDataMgr.cpp b/Source/Contents/UserData/AccountLinkedUserDataMgr.cpp index b64ae96de..22f5464bd 100644 --- a/Source/Contents/UserData/AccountLinkedUserDataMgr.cpp +++ b/Source/Contents/UserData/AccountLinkedUserDataMgr.cpp @@ -2,7 +2,6 @@ #include "Render/DeviceContext/DCSurface.h" #include "Script/LuaScript.h" #include "Contents/UserData/AccountLinkedUserDataMgr.h" -#include "Contents/UserData/AccountService.h" #include "Contents/UserData/AccountUserData.h" #include "Contents/Async/AsyncWorkMgr.h" #include "Contents/Hotkeys/EmotionHotkeys.h" @@ -128,7 +127,7 @@ void CAccountLinkedUserDataMgr::CompleteLoad( // OFFSET: 0x005BCB10 // FUNCTION: fn_03467 void CAccountLinkedUserDataMgr::RefreshUrls(LuaScript& settings, LuaScript& tables, const char* host, const char* port, const char* overrideKey) { - const std::string base = ResolveAccountServiceBase(settings, tables, host, port, overrideKey); + const std::string base = g_session.ResolveAccountServiceBase(); if (!base.empty()) { constexpr std::array saveSourceArray = CRYPT_NAME("/userconfig/save", 0x59278F63D79F3DA1ULL); const std::uint8_t (&saveSource)[17] = saveSourceArray._Elems; diff --git a/Source/Contents/UserData/AccountService.cpp b/Source/Contents/UserData/AccountService.cpp index 667ef48b8..fdee7e884 100644 --- a/Source/Contents/UserData/AccountService.cpp +++ b/Source/Contents/UserData/AccountService.cpp @@ -1,23 +1,22 @@ -#include "Contents/UserData/AccountService.h" #include "Client/Session/Session.h" #include "Contents/Configuration/ServiceConfiguration.h" #include "Script/LuaScript.h" // OFFSET: 0x00DDBB60 // FUNCTION: fn_23360 -std::string ResolveAccountServiceBase(LuaScript& settings, LuaScript& tables, const char* host, const char* port, const char* overrideKey) { - std::string address = settings.GlobalString("AssistAddr"); +std::string CSession::ResolveAccountServiceBase() { + std::string address = this->m_hotkeyScript->GlobalString("AssistAddr"); if (!address.empty()) { return address; } - std::string key = std::string(host) + ":" + port; - if (overrideKey && *overrideKey) { - key = overrideKey; + std::string key = std::string(g_serviceHost) + ":" + g_servicePort; + if (g_serviceOverrideKey && *g_serviceOverrideKey) { + key = g_serviceOverrideKey; } const char* resolved = nullptr; - if (tables.Call("GetTableStringValueForC", "ss>s", "AssistAddrTbl", key.c_str(), &resolved) && resolved && *resolved) { + if (this->m_hotkeyScript->Call("GetTableStringValueForC", "ss>s", "AssistAddrTbl", key.c_str(), &resolved) && resolved && *resolved) { return resolved; } diff --git a/Source/Contents/UserData/CharacterLinkedUserDataMgr.cpp b/Source/Contents/UserData/CharacterLinkedUserDataMgr.cpp index ec0b9f18b..84ad4a054 100644 --- a/Source/Contents/UserData/CharacterLinkedUserDataMgr.cpp +++ b/Source/Contents/UserData/CharacterLinkedUserDataMgr.cpp @@ -1,6 +1,5 @@ #include "Client/Session/Session.h" #include "Contents/Configuration/ServiceConfiguration.h" -#include "Contents/UserData/AccountService.h" #include "Contents/UserData/CharacterLinkedUserDataMgr.h" #include "Script/LuaScript.h" #include "Utility/Cipher/EncryptedName.h"