aboutsummaryrefslogtreecommitdiff
path: root/src/game/AuctionHouseMgr.cpp
diff options
context:
space:
mode:
authorJohn Holiver <johnholiver@gmail.com>2010-05-21 16:49:19 -0300
committerJohn Holiver <johnholiver@gmail.com>2010-05-21 16:49:19 -0300
commitbd41a4d36fbb6b954cb2008edcf24b3ed9d60a05 (patch)
treea0a3317c56a8a2efbdf85195a4cef50f1dec638d /src/game/AuctionHouseMgr.cpp
parentaf1aecc1f5311a9ba82c5dc9dfec5751a6bd2647 (diff)
More achievement types support.
Achievment types used only for statistics: * ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION * ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS * ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_VENDORS * ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS Tnx to VladimirMangos --HG-- branch : trunk
Diffstat (limited to 'src/game/AuctionHouseMgr.cpp')
-rw-r--r--src/game/AuctionHouseMgr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp
index 95b388b6c1a..cac9cf9940a 100644
--- a/src/game/AuctionHouseMgr.cpp
+++ b/src/game/AuctionHouseMgr.cpp
@@ -152,7 +152,11 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction)
CharacterDatabase.PExecute("UPDATE item_instance SET owner_guid = '%u' WHERE guid='%u'",auction->bidder,pItem->GetGUIDLow());
if (bidder)
+ {
bidder->GetSession()->SendAuctionBidderNotification(auction->GetHouseId(), auction->Id, bidder_guid, 0, 0, auction->item_template);
+ // FIXME: for offline player need also
+ bidder->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS, 1);
+ }
MailDraft(msgAuctionWonSubject.str(), msgAuctionWonBody.str())
.AddItem(pItem)
@@ -216,6 +220,7 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry * auction)
//FIXME: what do if owner offline
if (owner && owner->GetGUIDLow() != auctionbot.GetAHBplayerGUID())
{
+ owner->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS, profit);
owner->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_SOLD, auction->bid);
//send auction owner notification, bidder must be current!
owner->GetSession()->SendAuctionOwnerNotification(auction);