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:
parent
085fc0a1a7
commit
c55c5e668f
1 changed files with 8 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue