mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +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 text = msgText;
|
||||
|
||||
// from console show not existed sender
|
||||
MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : 0, MAIL_STATIONERY_GM);
|
||||
ObjectGuid::LowType senderGuid;
|
||||
// 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
|
||||
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
@@ -2789,8 +2791,10 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// from console show not existed sender
|
||||
MailSender sender(MAIL_NORMAL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetGUID().GetCounter() : 0, MAIL_STATIONERY_GM);
|
||||
ObjectGuid::LowType senderGuid;
|
||||
// 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
|
||||
MailDraft draft(subject, text);
|
||||
|
||||
Reference in New Issue
Block a user