Core/Handlers: Allow gamemasters to send mails with customer support badge depending on gm mode (.gm off/on)

This commit is contained in:
leak
2010-12-31 04:47:57 +01:00
parent c5a143547d
commit 73fe85e6fd
3 changed files with 11 additions and 1 deletions
@@ -280,11 +280,13 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
// If theres is an item, there is a one hour delivery delay if sent to another account's character.
uint32 deliver_delay = needItemDelay ? sWorld->getIntConfig(CONFIG_MAIL_DELIVERY_DELAY) : 0;
uint32 stationary = pl->isGameMaster() ? MAIL_STATIONERY_GM : MAIL_STATIONERY_DEFAULT;
// will delete item or place to receiver mail list
draft
.AddMoney(money)
.AddCOD(COD)
.SendMailTo(trans, MailReceiver(receive, GUID_LOPART(rc)), pl, body.empty() ? MAIL_CHECK_MASK_COPIED : MAIL_CHECK_MASK_HAS_BODY, deliver_delay);
.SendMailTo(trans, MailReceiver(receive, GUID_LOPART(rc)), MailSender(pl), body.empty() ? MAIL_CHECK_MASK_COPIED : MAIL_CHECK_MASK_HAS_BODY, deliver_delay);
pl->SaveInventoryAndGoldToDB(trans);
CharacterDatabase.CommitTransaction(trans);