Unused code removed

Code related to the non-existent table, character_battleground_random
removed.
This commit is contained in:
Charles A Edwards 2016-08-30 13:05:50 +01:00 committed by Antz
parent d88e38e549
commit c78d8199df
4 changed files with 4 additions and 52 deletions

View file

@ -1953,13 +1953,6 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
return true;
}
void Player::SetRandomWinner(bool isWinner)
{
m_IsBGRandomWinner = isWinner;
if (m_IsBGRandomWinner)
CharacterDatabase.PExecute("INSERT INTO character_battleground_random (guid) VALUES ('%u')", GetGUIDLow());
}
bool Player::TeleportToBGEntryPoint()
{
ScheduleDelayedOperation(DELAYED_BG_MOUNT_RESTORE);

View file

@ -1095,8 +1095,6 @@ class Player : public Unit
bool TeleportToBGEntryPoint();
void SetRandomWinner(bool isWinner);
void SetSummonPoint(uint32 mapid, float x, float y, float z)
{
m_summon_expire = time(NULL) + MAX_PLAYER_SUMMON_DELAY;

View file

@ -1583,13 +1583,9 @@ void World::Update(uint32 diff)
for (int i = 0; i < WUPDATE_COUNT; ++i)
{
if (m_timers[i].GetCurrent() >= 0)
{
m_timers[i].Update(diff);
}
{ m_timers[i].Update(diff); }
else
{
m_timers[i].SetCurrent(0);
}
{ m_timers[i].SetCurrent(0); }
}
///- Update the game time and check for shutdown time
@ -1598,24 +1594,9 @@ void World::Update(uint32 diff)
///-Update mass mailer tasks if any
sMassMailMgr.Update();
/// Handle daily quests and dungeon reset time
/// Handle daily quests reset time
if (m_gameTime > m_NextDailyQuestReset)
{
ResetDailyQuests();
sLFGMgr.ResetDailyRecords();
}
/// Handle weekly quests reset time
if (m_gameTime > m_NextWeeklyQuestReset)
ResetWeeklyQuests();
/// Handle monthly quests reset time
if (m_gameTime > m_NextMonthlyQuestReset)
ResetMonthlyQuests();
/// Handle random battlegrounds reset time
if (m_gameTime > m_NextRandomBGReset)
ResetRandomBG();
/// <ul><li> Handle auctions when the timer has passed
if (m_timers[WUPDATE_AUCTIONS].Passed())
@ -1641,13 +1622,6 @@ void World::Update(uint32 diff)
m_timers[WUPDATE_AHBOT].Reset();
}
/// <li> Update Dungeon Finder
if (m_timers[WUPDATE_LFGMGR].Passed())
{
sLFGMgr.Update();
m_timers[WUPDATE_LFGMGR].Reset();
}
/// <li> Handle session updates
UpdateSessions(diff);
@ -1670,7 +1644,7 @@ void World::Update(uint32 diff)
///- Used by Eluna
#ifdef ENABLE_ELUNA
sEluna->OnWorldUpdate(diff);
#endif
#endif /* ENABLE_ELUNA */
///- Delete all characters which have been deleted X days before
if (m_timers[WUPDATE_DELETECHARS].Passed())
@ -2335,18 +2309,6 @@ void World::ResetDailyQuests()
CharacterDatabase.PExecute("UPDATE saved_variables SET NextDailyQuestResetTime = '" UI64FMTD "'", uint64(m_NextDailyQuestReset));
}
void World::ResetRandomBG()
{
sLog.outDetail("Random BG status reset for all characters.");
CharacterDatabase.Execute("DELETE FROM character_battleground_random");
for (SessionMap::const_iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
if (itr->second->GetPlayer())
itr->second->GetPlayer()->SetRandomWinner(false);
m_NextRandomBGReset = time_t(m_NextRandomBGReset + DAY);
CharacterDatabase.PExecute("UPDATE saved_variables SET NextRandomBGResetTime = '" UI64FMTD "'", uint64(m_NextRandomBGReset));
}
void World::ResetWeeklyQuests()
{
DETAIL_LOG("Weekly quests reset for all characters.");

View file

@ -675,7 +675,6 @@ class World
void SetMonthlyQuestResetTime(bool initialize = true);
void ResetCurrencyWeekCounts();
void ResetDailyQuests();
void ResetRandomBG();
void ResetWeeklyQuests();
void ResetMonthlyQuests();