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)
Port From (https://github.com/TrinityCore/TrinityCore/commit/a9b4f9aca0d0b90e59e0ed26e9bb4cce7d0ceeab)
This commit is contained in:
@@ -568,10 +568,6 @@ namespace Game
|
||||
|
||||
Player player = GetPlayer();
|
||||
|
||||
//load players mails, and mailed items
|
||||
if (!player.m_mailsLoaded)
|
||||
player._LoadMail();
|
||||
|
||||
var mails = player.GetMails();
|
||||
|
||||
MailListResult response = new();
|
||||
@@ -658,9 +654,6 @@ namespace Game
|
||||
{
|
||||
MailQueryNextTimeResult result = new();
|
||||
|
||||
if (!GetPlayer().m_mailsLoaded)
|
||||
GetPlayer()._LoadMail();
|
||||
|
||||
if (GetPlayer().unReadMails > 0)
|
||||
{
|
||||
result.NextMailTime = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user