From a1b07f8e68c43d28a4341c0d330c7a93044cb4ca Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Tue, 24 Sep 2024 15:39:48 -0300 Subject: [PATCH] fix: disable irrelevant informations Loads only as far as is actually needed for preload --- src/game/game.cpp | 2 +- src/io/iologindata.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game/game.cpp b/src/game/game.cpp index 5e99dda81fa..b1fb66c2776 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -988,7 +988,7 @@ std::shared_ptr Game::getPlayerByName(const std::string &s, bool allowOf return nullptr; } std::shared_ptr tmpPlayer = std::make_shared(nullptr); - if (!IOLoginData::loadPlayerByName(tmpPlayer, s)) { + if (!IOLoginData::loadPlayerByName(tmpPlayer, s, allowOffline)) { if (!isNewName) { g_logger().error("Failed to load player {} from database", s); } else { diff --git a/src/io/iologindata.cpp b/src/io/iologindata.cpp index fce5d0dc293..41f8cea8985 100644 --- a/src/io/iologindata.cpp +++ b/src/io/iologindata.cpp @@ -123,6 +123,10 @@ bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result // Experience load IOLoginDataLoad::loadPlayerExperience(player, result); + if (disableIrrelevantInfo) { + return true; + } + // Blessings load IOLoginDataLoad::loadPlayerBlessings(player, result); @@ -180,10 +184,6 @@ bool IOLoginData::loadPlayer(std::shared_ptr player, DBResult_ptr result // Load instant spells list IOLoginDataLoad::loadPlayerInstantSpellList(player, result); - if (disableIrrelevantInfo) { - return true; - } - // load forge history IOLoginDataLoad::loadPlayerForgeHistory(player, result);