[10802] Use ObjectGuid in Mail code.

Some catched bugs fixed in mixed uint32/guid values using cases.
This commit is contained in:
VladimirMangos 2010-12-01 15:03:49 +03:00
parent 3de8212e03
commit 938622bedc
9 changed files with 59 additions and 54 deletions

View file

@ -156,7 +156,7 @@ void AuctionHouseMgr::SendAuctionWonMail( AuctionEntry *auction )
// will delete item or place to receiver mail list
MailDraft(msgAuctionWonSubject.str(), msgAuctionWonBody.str())
.AddItem(pItem)
.SendMailTo(MailReceiver(bidder,auction->bidder), auction, MAIL_CHECK_MASK_COPIED);
.SendMailTo(MailReceiver(bidder, bidder_guid), auction, MAIL_CHECK_MASK_COPIED);
}
// receiver not exist
else
@ -192,7 +192,7 @@ void AuctionHouseMgr::SendAuctionSalePendingMail( AuctionEntry * auction )
DEBUG_LOG("AuctionSalePending body string : %s", msgAuctionSalePendingBody.str().c_str());
MailDraft(msgAuctionSalePendingSubject.str(), msgAuctionSalePendingBody.str())
.SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_COPIED);
.SendMailTo(MailReceiver(owner, owner_guid), auction, MAIL_CHECK_MASK_COPIED);
}
}
@ -235,7 +235,7 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail( AuctionEntry * auction )
MailDraft(msgAuctionSuccessfulSubject.str(), auctionSuccessfulBody.str())
.AddMoney(profit)
.SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_COPIED, HOUR);
.SendMailTo(MailReceiver(owner, owner_guid), auction, MAIL_CHECK_MASK_COPIED, HOUR);
}
}
@ -270,7 +270,7 @@ void AuctionHouseMgr::SendAuctionExpiredMail( AuctionEntry * auction )
// will delete item or place to receiver mail list
MailDraft(subject.str(), "") // TODO: fix body
.AddItem(pItem)
.SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_COPIED);
.SendMailTo(MailReceiver(owner, owner_guid), auction, MAIL_CHECK_MASK_COPIED);
}
// owner not found
else
@ -418,7 +418,7 @@ void AuctionHouseMgr::LoadAuctions()
// item will deleted or added to received mail list
MailDraft(msgAuctionCanceledOwner.str(), "") // TODO: fix body
.AddItem(pItem)
.SendMailTo(MailReceiver(auction->owner), auction, MAIL_CHECK_MASK_COPIED);
.SendMailTo(MailReceiver(ObjectGuid(HIGHGUID_PLAYER, auction->owner)), auction, MAIL_CHECK_MASK_COPIED);
RemoveAItem(auction->item_guidlow);
auction->DeleteFromDB();