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
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user