From 63104767eb2bade147ac007db13c03a1de3683fe Mon Sep 17 00:00:00 2001 From: celguar Date: Fri, 29 Mar 2024 20:01:50 +0300 Subject: [PATCH] Fix merge --- src/game/Entities/Player.cpp | 2 -- src/game/Entities/Player.h | 2 -- src/game/LFG/LFGQueue.cpp | 2 ++ src/game/Maps/MapManager.cpp | 4 +-- src/game/World/World.cpp | 54 ------------------------------------ 5 files changed, 4 insertions(+), 60 deletions(-) diff --git a/src/game/Entities/Player.cpp b/src/game/Entities/Player.cpp index b563618e5d..8531eb913b 100644 --- a/src/game/Entities/Player.cpp +++ b/src/game/Entities/Player.cpp @@ -19701,7 +19701,6 @@ void Player::learnSpellHighRank(uint32 spellid) sSpellMgr.doForHighRanks(spellid, worker); } -#ifdef ENABLE_PLAYERBOTS void Player::learnClassLevelSpells(bool includeHighLevelQuestRewards) { ChrClassesEntry const* clsEntry = sChrClassesStore.LookupEntry(getClass()); @@ -19856,7 +19855,6 @@ void Player::learnClassLevelSpells(bool includeHighLevelQuestRewards) } } } -#endif void Player::_LoadSkills(std::unique_ptr queryResult) { diff --git a/src/game/Entities/Player.h b/src/game/Entities/Player.h index 31a24e4c84..348c0161cd 100644 --- a/src/game/Entities/Player.h +++ b/src/game/Entities/Player.h @@ -1508,9 +1508,7 @@ class Player : public Unit void learnQuestRewardedSpells(); void learnQuestRewardedSpells(Quest const* quest); void learnSpellHighRank(uint32 spellid); -#ifdef ENABLE_PLAYERBOTS void learnClassLevelSpells(bool includeHighLevelQuestRewards = false); -#endif uint32 GetFreeTalentPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS1); } void SetFreeTalentPoints(uint32 points) { SetUInt32Value(PLAYER_CHARACTER_POINTS1, points); } diff --git a/src/game/LFG/LFGQueue.cpp b/src/game/LFG/LFGQueue.cpp index c3af647b9c..ddc3f5daed 100644 --- a/src/game/LFG/LFGQueue.cpp +++ b/src/game/LFG/LFGQueue.cpp @@ -142,8 +142,10 @@ void LFGQueue::Update() if (qGroup->second.playerCount == 5) { +#ifdef ENABLE_PLAYERBOTS if (sWorld.getConfig(CONFIG_BOOL_LFG_TELEPORT)) TeleportGroupToStone(qGroup->first, qGroup->second.areaId); +#endif RemoveGroupFromQueue(qGroup->first, GROUP_SYSTEM_LEAVE); break; diff --git a/src/game/Maps/MapManager.cpp b/src/game/Maps/MapManager.cpp index 41b1867e98..fcda8b2fc5 100644 --- a/src/game/Maps/MapManager.cpp +++ b/src/game/Maps/MapManager.cpp @@ -222,9 +222,9 @@ void MapManager::Update(uint32 diff) map.second->DoUpdate((uint32)i_timer.GetCurrent()); } - bool fasterUpdates = false; + /*bool fasterUpdates = false; uint32 maxDiff = sWorld.GetMaxDiff(); - fasterUpdates = maxDiff > 100; + fasterUpdates = maxDiff > 100;*/ if (m_updater.activated()) { diff --git a/src/game/World/World.cpp b/src/game/World/World.cpp index 357b248497..8fc8319d2c 100644 --- a/src/game/World/World.cpp +++ b/src/game/World/World.cpp @@ -1572,60 +1572,6 @@ void World::Update(uint32 diff) m_currentMSTime = WorldTimer::getMSTime(); m_currentTime = std::chrono::time_point_cast(Clock::now()); m_currentDiff = diff; - m_currentDiffSum += diff; - m_currentDiffSumIndex++; - - m_histDiff.push_back(diff); - m_maxDiff = std::max(m_maxDiff, diff); - - while(m_histDiff.size() >= 600) - { - m_currentDiffSum -= m_histDiff.front(); - m_histDiff.pop_front(); - } - - m_averageDiff = (uint32)(m_currentDiffSum / m_histDiff.size()); - - if (m_currentDiffSumIndex && m_currentDiffSumIndex % 60 == 0) - { - //m_averageDiff = (uint32)(m_currentDiffSum / m_currentDiffSumIndex); - //if (m_maxDiff < m_averageDiff) - // m_maxDiff = m_averageDiff; - sLog.outBasic("Avg Diff: %u. Sessions online: %u.", m_averageDiff, (uint32)GetActiveSessionCount()); - sLog.outBasic("Max Diff: %u.", m_maxDiff); - } - if (m_currentDiffSum % 3000 == 0) - { - m_maxDiff = *std::max_element(m_histDiff.begin(), m_histDiff.end()); - } - /* - if (m_currentDiffSum > 300000) - { - m_currentDiffSum = 0; - m_currentDiffSumIndex = 0; - if (m_maxDiff > m_averageDiff) - { - m_maxDiff = m_averageDiff; - sLog.outBasic("Max Diff reset to: %u.", m_maxDiff); - } - } - if (GetActiveSessionCount()) - { - if (m_currentDiffSumIndex && (m_currentDiffSumIndex % 5 == 0)) - { - uint32 tempDiff = (uint32)(m_currentDiffSum / m_currentDiffSumIndex); - if (tempDiff > m_averageDiff) - { - m_averageDiff = tempDiff; - } - if (m_maxDiff < tempDiff) - { - m_maxDiff = tempDiff; - sLog.outBasic("Max Diff Increased: %u.", m_maxDiff); - } - } - } - */ #ifdef ENABLE_PLAYERBOTS m_currentDiffSum += diff;