mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
fix(Core/Commands): partially fix an issue with mails sent from console never showing up the 'Customer Support' sender in-game (#8064)
This commit is contained in:
@@ -2691,8 +2691,10 @@ public:
|
|||||||
std::string subject = msgSubject;
|
std::string subject = msgSubject;
|
||||||
std::string text = msgText;
|
std::string text = msgText;
|
||||||
|
|
||||||
// from console show not existed sender
|
ObjectGuid::LowType senderGuid;
|
||||||
MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : 0, MAIL_STATIONERY_GM);
|
// If the message is sent from console, set it as sent by the target itself, like the other Customer Support mails.
|
||||||
|
senderGuid = handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : targetGuid.GetCounter();
|
||||||
|
MailSender sender(MAIL_NORMAL, senderGuid, MAIL_STATIONERY_GM);
|
||||||
|
|
||||||
//- TODO: Fix poor design
|
//- TODO: Fix poor design
|
||||||
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
|
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
|
||||||
@@ -2789,8 +2791,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// from console show not existed sender
|
ObjectGuid::LowType senderGuid;
|
||||||
MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : 0, MAIL_STATIONERY_GM);
|
// If the message is sent from console, set it as sent by the target itself, like the other Customer Support mails.
|
||||||
|
senderGuid = handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : receiverGuid.GetCounter();
|
||||||
|
MailSender sender(MAIL_NORMAL, senderGuid, MAIL_STATIONERY_GM);
|
||||||
|
|
||||||
// fill mail
|
// fill mail
|
||||||
MailDraft draft(subject, text);
|
MailDraft draft(subject, text);
|
||||||
|
|||||||
Reference in New Issue
Block a user