mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Mail: Load mails at login instead of on demand when queried by packets (logging in always sends one of the packets that cause mail loading anyway)
(cherry picked from commit 57eaab80d9)
This commit is contained in:
@@ -572,10 +572,6 @@ void WorldSession::HandleGetMailList(WorldPackets::Mail::MailGetList& packet)
|
||||
|
||||
Player* player = _player;
|
||||
|
||||
//load players mails, and mailed items
|
||||
if (!player->m_mailsLoaded)
|
||||
player->_LoadMail();
|
||||
|
||||
WorldPackets::Mail::MailListResult response;
|
||||
time_t curTime = GameTime::GetGameTime();
|
||||
|
||||
@@ -655,14 +651,10 @@ void WorldSession::HandleMailCreateTextItem(WorldPackets::Mail::MailCreateTextIt
|
||||
}
|
||||
}
|
||||
|
||||
/// @todo Fix me! ... this void has probably bad condition, but good data are sent
|
||||
void WorldSession::HandleQueryNextMailTime(WorldPackets::Mail::MailQueryNextMailTime& /*packet*/)
|
||||
{
|
||||
WorldPackets::Mail::MailQueryNextTimeResult result;
|
||||
|
||||
if (!_player->m_mailsLoaded)
|
||||
_player->_LoadMail();
|
||||
|
||||
if (_player->unReadMails > 0)
|
||||
{
|
||||
result.NextMailTime = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user