mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Don't return mails to non-existing characters (thanks to laviniu for finding the bug)
--HG-- branch : trunk
This commit is contained in:
@@ -375,8 +375,8 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data)
|
||||
CharacterDatabase.CommitTransaction();
|
||||
pl->RemoveMail(mailId);
|
||||
|
||||
// send back only to players and simple drop for other cases
|
||||
if (m->messageType == MAIL_NORMAL)
|
||||
// only return mail if the player exists (and delete if not existing)
|
||||
if (m->messageType == MAIL_NORMAL && m->sender)
|
||||
{
|
||||
MailDraft draft(m->subject, m->body);
|
||||
if (m->mailTemplateId)
|
||||
|
||||
Reference in New Issue
Block a user