aboutsummaryrefslogtreecommitdiff
path: root/src/game/AuctionHouseMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/AuctionHouseMgr.cpp')
-rw-r--r--src/game/AuctionHouseMgr.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp
index 282836a76b2..1f952e249c3 100644
--- a/src/game/AuctionHouseMgr.cpp
+++ b/src/game/AuctionHouseMgr.cpp
@@ -152,9 +152,6 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction)
msgAuctionWonBody << std::dec << ":" << auction->bid << ":" << auction->buyout;
sLog.outDebug("AuctionWon body string : %s", msgAuctionWonBody.str().c_str());
- //prepare mail data... :
- uint32 itemTextId = objmgr.CreateItemText(msgAuctionWonBody.str());
-
// set owner to bidder (to prevent delete item with sender char deleting)
// owner in `data` will set at mail receive and item extracting
CharacterDatabase.PExecute("UPDATE item_instance SET owner_guid = '%u' WHERE guid='%u'",auction->bidder,pItem->GetGUIDLow());
@@ -163,9 +160,9 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction)
if (bidder)
bidder->GetSession()->SendAuctionBidderNotification(auction->GetHouseId(), auction->Id, bidder_guid, 0, 0, auction->item_template);
- MailDraft(msgAuctionWonSubject.str(), itemTextId)
+ MailDraft(msgAuctionWonSubject.str(), msgAuctionWonBody.str())
.AddItem(pItem)
- .SendMailTo(MailReceiver(bidder,auction->bidder), auction, MAIL_CHECK_MASK_AUCTION);
+ .SendMailTo(MailReceiver(bidder,auction->bidder), MailSender(auction), MAIL_CHECK_MASK_NONE);
}
}
@@ -193,10 +190,8 @@ void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry * auction)
sLog.outDebug("AuctionSalePending body string : %s", msgAuctionSalePendingBody.str().c_str());
- uint32 itemTextId = objmgr.CreateItemText(msgAuctionSalePendingBody.str());
-
- MailDraft(msgAuctionSalePendingSubject.str(), itemTextId)
- .SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_AUCTION);
+ MailDraft(msgAuctionSalePendingSubject.str(), msgAuctionSalePendingBody.str())
+ .SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_NONE);
}
}
@@ -222,8 +217,6 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry * auction)
sLog.outDebug("AuctionSuccessful body string : %s", auctionSuccessfulBody.str().c_str());
- uint32 itemTextId = objmgr.CreateItemText(auctionSuccessfulBody.str());
-
uint32 profit = auction->bid + auction->deposit - auctionCut;
//FIXME: what do if owner offline
@@ -233,9 +226,9 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry * auction)
//send auction owner notification, bidder must be current!
owner->GetSession()->SendAuctionOwnerNotification(auction);
}
- MailDraft(msgAuctionSuccessfulSubject.str(), itemTextId)
+ MailDraft(msgAuctionSuccessfulSubject.str(), auctionSuccessfulBody.str())
.AddMoney(profit)
- .SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_AUCTION, sWorld.getConfig(CONFIG_MAIL_DELIVERY_DELAY));
+ .SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_NONE, sWorld.getConfig(CONFIG_MAIL_DELIVERY_DELAY));
}
}
@@ -253,12 +246,12 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry * auction)
if (owner || owner_accId)
{
std::ostringstream subject;
- subject << auction->item_template << ":0:" << AUCTION_EXPIRED;
+ subject << auction->item_template << ":0:" << AUCTION_EXPIRED << ":0:0";
if (owner && owner->GetGUIDLow() != auctionbot.GetAHBplayerGUID())
owner->GetSession()->SendAuctionOwnerNotification(auction);
- MailDraft(subject.str())
+ MailDraft(subject.str(), "") // TODO: fix body
.AddItem(pItem)
.SendMailTo(MailReceiver(owner,auction->owner), auction);
}