diff options
author | win32 <none@none> | 2009-12-16 18:58:36 +0200 |
---|---|---|
committer | win32 <none@none> | 2009-12-16 18:58:36 +0200 |
commit | bf2c3fd8cf32578324162a8bef2ac6e48e7e0009 (patch) | |
tree | ccb8f71a159aba2799cc009352a8626d95b6fc6c /src/game/AuctionHouseHandler.cpp | |
parent | dc53b4a9def06d012d791304aaba1c748a1f997a (diff) |
MaNGOS merge: Mail System.
* Store loot in mail_loot_template indexed by mail template ids.
* Implement proper creating mail text copy item from mail template based mail.
* Move send functions to new MailDraft class from WorldSession.
* Implement mails sending at player levelup.
* Autor VladimirMangos, converted by me.
--HG--
branch : trunk
Diffstat (limited to 'src/game/AuctionHouseHandler.cpp')
-rw-r--r-- | src/game/AuctionHouseHandler.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/game/AuctionHouseHandler.cpp b/src/game/AuctionHouseHandler.cpp index 9de5a98062c..12ed6fc797c 100644 --- a/src/game/AuctionHouseHandler.cpp +++ b/src/game/AuctionHouseHandler.cpp @@ -129,7 +129,9 @@ void WorldSession::SendAuctionOutbiddedMail(AuctionEntry *auction, uint32 newPri if (oldBidder && _player) oldBidder->GetSession()->SendAuctionBidderNotification(auction->GetHouseId(), auction->Id, _player->GetGUID(), newPrice, auction->GetAuctionOutBid(), auction->item_template); - WorldSession::SendMailTo(oldBidder, MAIL_AUCTION, MAIL_STATIONERY_AUCTION, auction->GetHouseId(), auction->bidder, msgAuctionOutbiddedSubject.str(), 0, NULL, auction->bid, 0, MAIL_CHECK_MASK_NONE); + MailDraft(msgAuctionOutbiddedSubject.str()) + .AddMoney(auction->bid) + .SendMailTo(MailReceiver(oldBidder, auction->bidder), auction); } } @@ -149,7 +151,9 @@ void WorldSession::SendAuctionCancelledToBidderMail(AuctionEntry* auction) std::ostringstream msgAuctionCancelledSubject; msgAuctionCancelledSubject << auction->item_template << ":0:" << AUCTION_CANCELLED_TO_BIDDER; - WorldSession::SendMailTo(bidder, MAIL_AUCTION, MAIL_STATIONERY_AUCTION, auction->GetHouseId(), auction->bidder, msgAuctionCancelledSubject.str(), 0, NULL, auction->bid, 0, MAIL_CHECK_MASK_NONE); + MailDraft(msgAuctionCancelledSubject.str()) + .AddMoney(auction->bid) + .SendMailTo(MailReceiver(bidder, auction->bidder), auction); } } @@ -442,11 +446,10 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data) std::ostringstream msgAuctionCanceledOwner; msgAuctionCanceledOwner << auction->item_template << ":0:" << AUCTION_CANCELED; - MailItemsInfo mi; - mi.AddItem(auction->item_guidlow, auction->item_template, pItem); - // item will deleted or added to received mail list - WorldSession::SendMailTo(pl, MAIL_AUCTION, MAIL_STATIONERY_AUCTION, auction->GetHouseId(), pl->GetGUIDLow(), msgAuctionCanceledOwner.str(), 0, &mi, 0, 0, MAIL_CHECK_MASK_NONE); + MailDraft(msgAuctionCanceledOwner.str()) + .AddItem(pItem) + .SendMailTo(pl, auction); } else { |