mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
Unused code removed
Code related to the non-existent table, character_battleground_random removed.
This commit is contained in:
parent
d88e38e549
commit
c78d8199df
4 changed files with 4 additions and 52 deletions
|
|
@ -1953,13 +1953,6 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||||
return true;
|
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()
|
bool Player::TeleportToBGEntryPoint()
|
||||||
{
|
{
|
||||||
ScheduleDelayedOperation(DELAYED_BG_MOUNT_RESTORE);
|
ScheduleDelayedOperation(DELAYED_BG_MOUNT_RESTORE);
|
||||||
|
|
|
||||||
|
|
@ -1095,8 +1095,6 @@ class Player : public Unit
|
||||||
|
|
||||||
bool TeleportToBGEntryPoint();
|
bool TeleportToBGEntryPoint();
|
||||||
|
|
||||||
void SetRandomWinner(bool isWinner);
|
|
||||||
|
|
||||||
void SetSummonPoint(uint32 mapid, float x, float y, float z)
|
void SetSummonPoint(uint32 mapid, float x, float y, float z)
|
||||||
{
|
{
|
||||||
m_summon_expire = time(NULL) + MAX_PLAYER_SUMMON_DELAY;
|
m_summon_expire = time(NULL) + MAX_PLAYER_SUMMON_DELAY;
|
||||||
|
|
|
||||||
|
|
@ -1583,13 +1583,9 @@ void World::Update(uint32 diff)
|
||||||
for (int i = 0; i < WUPDATE_COUNT; ++i)
|
for (int i = 0; i < WUPDATE_COUNT; ++i)
|
||||||
{
|
{
|
||||||
if (m_timers[i].GetCurrent() >= 0)
|
if (m_timers[i].GetCurrent() >= 0)
|
||||||
{
|
{ m_timers[i].Update(diff); }
|
||||||
m_timers[i].Update(diff);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{ m_timers[i].SetCurrent(0); }
|
||||||
m_timers[i].SetCurrent(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///- Update the game time and check for shutdown time
|
///- Update the game time and check for shutdown time
|
||||||
|
|
@ -1598,24 +1594,9 @@ void World::Update(uint32 diff)
|
||||||
///-Update mass mailer tasks if any
|
///-Update mass mailer tasks if any
|
||||||
sMassMailMgr.Update();
|
sMassMailMgr.Update();
|
||||||
|
|
||||||
/// Handle daily quests and dungeon reset time
|
/// Handle daily quests reset time
|
||||||
if (m_gameTime > m_NextDailyQuestReset)
|
if (m_gameTime > m_NextDailyQuestReset)
|
||||||
{
|
|
||||||
ResetDailyQuests();
|
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
|
/// <ul><li> Handle auctions when the timer has passed
|
||||||
if (m_timers[WUPDATE_AUCTIONS].Passed())
|
if (m_timers[WUPDATE_AUCTIONS].Passed())
|
||||||
|
|
@ -1641,13 +1622,6 @@ void World::Update(uint32 diff)
|
||||||
m_timers[WUPDATE_AHBOT].Reset();
|
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
|
/// <li> Handle session updates
|
||||||
UpdateSessions(diff);
|
UpdateSessions(diff);
|
||||||
|
|
||||||
|
|
@ -1670,7 +1644,7 @@ void World::Update(uint32 diff)
|
||||||
///- Used by Eluna
|
///- Used by Eluna
|
||||||
#ifdef ENABLE_ELUNA
|
#ifdef ENABLE_ELUNA
|
||||||
sEluna->OnWorldUpdate(diff);
|
sEluna->OnWorldUpdate(diff);
|
||||||
#endif
|
#endif /* ENABLE_ELUNA */
|
||||||
|
|
||||||
///- Delete all characters which have been deleted X days before
|
///- Delete all characters which have been deleted X days before
|
||||||
if (m_timers[WUPDATE_DELETECHARS].Passed())
|
if (m_timers[WUPDATE_DELETECHARS].Passed())
|
||||||
|
|
@ -2335,18 +2309,6 @@ void World::ResetDailyQuests()
|
||||||
CharacterDatabase.PExecute("UPDATE saved_variables SET NextDailyQuestResetTime = '" UI64FMTD "'", uint64(m_NextDailyQuestReset));
|
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()
|
void World::ResetWeeklyQuests()
|
||||||
{
|
{
|
||||||
DETAIL_LOG("Weekly quests reset for all characters.");
|
DETAIL_LOG("Weekly quests reset for all characters.");
|
||||||
|
|
|
||||||
|
|
@ -675,7 +675,6 @@ class World
|
||||||
void SetMonthlyQuestResetTime(bool initialize = true);
|
void SetMonthlyQuestResetTime(bool initialize = true);
|
||||||
void ResetCurrencyWeekCounts();
|
void ResetCurrencyWeekCounts();
|
||||||
void ResetDailyQuests();
|
void ResetDailyQuests();
|
||||||
void ResetRandomBG();
|
|
||||||
void ResetWeeklyQuests();
|
void ResetWeeklyQuests();
|
||||||
void ResetMonthlyQuests();
|
void ResetMonthlyQuests();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue