[8764] Simplify code for mail items send. Avoid packet unread spam at errors.

This commit is contained in:
VladimirMangos 2009-11-02 14:44:29 +03:00
parent 132aed0f0b
commit d5dad82f3d
9 changed files with 86 additions and 126 deletions

View file

@ -142,7 +142,7 @@ void AuctionHouseMgr::SendAuctionWonMail( AuctionEntry *auction )
CharacterDatabase.CommitTransaction();
MailItemsInfo mi;
mi.AddItem(auction->item_guidlow, auction->item_template, pItem);
mi.AddItem(pItem);
if (bidder)
bidder->GetSession()->SendAuctionBidderNotification( auction->GetHouseId(), auction->Id, bidder_guid, 0, 0, auction->item_template);
@ -262,7 +262,7 @@ void AuctionHouseMgr::SendAuctionExpiredMail( AuctionEntry * auction )
RemoveAItem(pItem->GetGUIDLow()); // we have to remove the item, before we delete it !!
MailItemsInfo mi;
mi.AddItem(auction->item_guidlow, auction->item_template, pItem);
mi.AddItem(pItem);
// will delete item or place to receiver mail list
WorldSession::SendMailTo(owner, MAIL_AUCTION, MAIL_STATIONERY_AUCTION, auction->GetHouseId(), GUID_LOPART(owner_guid), subject.str(), 0, &mi, 0, 0, MAIL_CHECK_MASK_NONE);