[11706] Use proper text structure in auction mail subject/text

This for example will enable show random property suffix in item name
in auction mails.
This commit is contained in:
VladimirMangos 2011-07-02 07:10:03 +04:00
parent cda3a95fc2
commit 5e9854974b
3 changed files with 9 additions and 9 deletions

View file

@ -162,7 +162,7 @@ void WorldSession::SendAuctionOutbiddedMail(AuctionEntry *auction)
if (oldBidder || oldBidder_accId) if (oldBidder || oldBidder_accId)
{ {
std::ostringstream msgAuctionOutbiddedSubject; std::ostringstream msgAuctionOutbiddedSubject;
msgAuctionOutbiddedSubject << auction->itemTemplate << ":0:" << AUCTION_OUTBIDDED << ":0:0"; msgAuctionOutbiddedSubject << auction->itemTemplate << ":" << auction->itemRandomPropertyId << ":" << AUCTION_OUTBIDDED << ":" << auction->Id << ":" << auction->itemCount;
if (oldBidder) if (oldBidder)
oldBidder->GetSession()->SendAuctionBidderNotification(auction); oldBidder->GetSession()->SendAuctionBidderNotification(auction);
@ -187,7 +187,7 @@ void WorldSession::SendAuctionCancelledToBidderMail(AuctionEntry* auction)
if (bidder || bidder_accId) if (bidder || bidder_accId)
{ {
std::ostringstream msgAuctionCancelledSubject; std::ostringstream msgAuctionCancelledSubject;
msgAuctionCancelledSubject << auction->itemTemplate << ":0:" << AUCTION_CANCELLED_TO_BIDDER << ":0:0"; msgAuctionCancelledSubject << auction->itemTemplate << ":" << auction->itemRandomPropertyId << ":" << AUCTION_CANCELLED_TO_BIDDER << ":" << auction->Id << ":" << auction->itemCount;
if (bidder) if (bidder)
bidder->GetSession()->SendAuctionRemovedNotification(auction); bidder->GetSession()->SendAuctionRemovedNotification(auction);
@ -505,7 +505,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
} }
// Return the item by mail // Return the item by mail
std::ostringstream msgAuctionCanceledOwner; std::ostringstream msgAuctionCanceledOwner;
msgAuctionCanceledOwner << auction->itemTemplate << ":0:" << AUCTION_CANCELED << ":0:0"; msgAuctionCanceledOwner << auction->itemTemplate << ":" << auction->itemRandomPropertyId << ":" << AUCTION_CANCELED << ":" << auction->Id << ":" << auction->itemCount;
// item will deleted or added to received mail list // item will deleted or added to received mail list
MailDraft(msgAuctionCanceledOwner.str(), "") // TODO: fix body MailDraft(msgAuctionCanceledOwner.str(), "") // TODO: fix body

View file

@ -138,7 +138,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction)
if (bidder || bidder_accId) if (bidder || bidder_accId)
{ {
std::ostringstream msgAuctionWonSubject; std::ostringstream msgAuctionWonSubject;
msgAuctionWonSubject << auction->itemTemplate << ":0:" << AUCTION_WON; msgAuctionWonSubject << auction->itemTemplate << ":" << auction->itemRandomPropertyId << ":" << AUCTION_WON;
std::ostringstream msgAuctionWonBody; std::ostringstream msgAuctionWonBody;
msgAuctionWonBody.width(16); msgAuctionWonBody.width(16);
@ -185,7 +185,7 @@ void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry * auction)
if (owner || owner_guid && sObjectMgr.GetPlayerAccountIdByGUID(owner_guid)) if (owner || owner_guid && sObjectMgr.GetPlayerAccountIdByGUID(owner_guid))
{ {
std::ostringstream msgAuctionSalePendingSubject; std::ostringstream msgAuctionSalePendingSubject;
msgAuctionSalePendingSubject << auction->itemTemplate << ":0:" << AUCTION_SALE_PENDING; msgAuctionSalePendingSubject << auction->itemTemplate << ":" << auction->itemRandomPropertyId << ":" << AUCTION_SALE_PENDING;
std::ostringstream msgAuctionSalePendingBody; std::ostringstream msgAuctionSalePendingBody;
uint32 auctionCut = auction->GetAuctionCut(); uint32 auctionCut = auction->GetAuctionCut();
@ -219,7 +219,7 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry * auction)
if (owner || owner_accId) if (owner || owner_accId)
{ {
std::ostringstream msgAuctionSuccessfulSubject; std::ostringstream msgAuctionSuccessfulSubject;
msgAuctionSuccessfulSubject << auction->itemTemplate << ":0:" << AUCTION_SUCCESSFUL; msgAuctionSuccessfulSubject << auction->itemTemplate << ":" << auction->itemRandomPropertyId << ":" << AUCTION_SUCCESSFUL;
std::ostringstream auctionSuccessfulBody; std::ostringstream auctionSuccessfulBody;
uint32 auctionCut = auction->GetAuctionCut(); uint32 auctionCut = auction->GetAuctionCut();
@ -267,7 +267,7 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry * auction)
if (owner || owner_accId) if (owner || owner_accId)
{ {
std::ostringstream subject; std::ostringstream subject;
subject << auction->itemTemplate << ":0:" << AUCTION_EXPIRED << ":0:0"; subject << auction->itemTemplate << ":" << auction->itemRandomPropertyId << ":" << AUCTION_EXPIRED << ":" << auction->Id << ":" << auction->itemCount;
if (owner) if (owner)
owner->GetSession()->SendAuctionOwnerNotification(auction); owner->GetSession()->SendAuctionOwnerNotification(auction);
@ -462,7 +462,7 @@ void AuctionHouseMgr::LoadAuctions()
// Attempt send item back to owner // Attempt send item back to owner
std::ostringstream msgAuctionCanceledOwner; std::ostringstream msgAuctionCanceledOwner;
msgAuctionCanceledOwner << auction->itemTemplate << ":0:" << AUCTION_CANCELED << ":0:0"; msgAuctionCanceledOwner << auction->itemTemplate << ":"<< auction->itemRandomPropertyId << ":" << AUCTION_CANCELED << ":" << auction->Id << ":" << auction->itemCount;
if (auction->itemGuidLow) if (auction->itemGuidLow)
{ {

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11705" #define REVISION_NR "11706"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__