Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
celguar committed Apr 7, 2024
1 parent c4c38e3 commit e92dded
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 60 deletions.
2 changes: 0 additions & 2 deletions src/game/Entities/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19692,7 +19692,6 @@ void Player::learnSpellHighRank(uint32 spellid)
sSpellMgr.doForHighRanks(spellid, worker);
}

#ifdef ENABLE_PLAYERBOTS
void Player::learnClassLevelSpells(bool includeHighLevelQuestRewards)
{
ChrClassesEntry const* clsEntry = sChrClassesStore.LookupEntry(getClass());
Expand Down Expand Up @@ -19847,7 +19846,6 @@ void Player::learnClassLevelSpells(bool includeHighLevelQuestRewards)
}
}
}
#endif

void Player::_LoadSkills(std::unique_ptr<QueryResult> queryResult)
{
Expand Down
2 changes: 0 additions & 2 deletions src/game/Entities/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -1505,9 +1505,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); }
Expand Down
2 changes: 2 additions & 0 deletions src/game/LFG/LFGQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/game/Maps/MapManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down
54 changes: 0 additions & 54 deletions src/game/World/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1572,60 +1572,6 @@ void World::Update(uint32 diff)
m_currentMSTime = WorldTimer::getMSTime();
m_currentTime = std::chrono::time_point_cast<std::chrono::milliseconds>(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;
Expand Down

0 comments on commit e92dded

Please sign in to comment.