[9730] Mail send related fixes in recent code.

* Avoid use explicit MailReciever/MailSender where not need.
  Types specially added for autoconvertion from common cases.

* Prevent allow copy text auction mails. It anyway store encoded data.
  Same for some another non-player mails.
This commit is contained in:
VladimirMangos 2010-04-12 05:04:05 +04:00
parent 9304d7509d
commit c64a2e8c84
6 changed files with 14 additions and 14 deletions

View file

@ -152,7 +152,7 @@ void AuctionHouseMgr::SendAuctionWonMail( AuctionEntry *auction )
// will delete item or place to receiver mail list
MailDraft(msgAuctionWonSubject.str(), msgAuctionWonBody.str())
.AddItem(pItem)
.SendMailTo(MailReceiver(bidder,auction->bidder), MailSender(auction), MAIL_CHECK_MASK_NONE);
.SendMailTo(MailReceiver(bidder,auction->bidder), auction, MAIL_CHECK_MASK_COPIED);
}
// receiver not exist
else
@ -188,7 +188,7 @@ void AuctionHouseMgr::SendAuctionSalePendingMail( AuctionEntry * auction )
sLog.outDebug("AuctionSalePending body string : %s", msgAuctionSalePendingBody.str().c_str());
MailDraft(msgAuctionSalePendingSubject.str(), msgAuctionSalePendingBody.str())
.SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_NONE);
.SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_COPIED);
}
}
@ -231,7 +231,7 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail( AuctionEntry * auction )
MailDraft(msgAuctionSuccessfulSubject.str(), auctionSuccessfulBody.str())
.AddMoney(profit)
.SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_NONE, HOUR);
.SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_COPIED, HOUR);
}
}
@ -266,7 +266,7 @@ void AuctionHouseMgr::SendAuctionExpiredMail( AuctionEntry * auction )
// will delete item or place to receiver mail list
MailDraft(subject.str(), "") // TODO: fix body
.AddItem(pItem)
.SendMailTo(MailReceiver(owner,auction->owner), auction);
.SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_COPIED);
}
// owner not found
else