[9425] More achievement types support.

Implemented new achievement criteria requirement:
* ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM_LVL (item level and item quality equiped in specific slot)

Implemented suppoprt achievement types:
* ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM (required DB data)
* ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL (required DB data)

Also 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
* ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM
* ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM
This commit is contained in:
VladimirMangos 2010-02-21 03:12:29 +03:00
parent 8bb13412e5
commit df652c56c0
10 changed files with 123 additions and 17 deletions

View file

@ -143,7 +143,11 @@ void AuctionHouseMgr::SendAuctionWonMail( AuctionEntry *auction )
CharacterDatabase.CommitTransaction();
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);
}
else
RemoveAItem(pItem->GetGUIDLow()); // we have to remove the item, before we delete it !!
@ -225,6 +229,7 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail( AuctionEntry * auction )
if (owner)
{
//FIXME: what do if owner offline
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 );