[7737] Implement ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE.

Zone dependent achievement criteria required DB support.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Trazom 2009-04-30 03:00:59 +04:00 committed by VladimirMangos
parent b22b603c0e
commit dba73b611d
6 changed files with 62 additions and 24 deletions

View file

@ -141,6 +141,7 @@ void WorldSession::HandleAutostoreLootItemOpcode( WorldPacket & recv_data )
player->SendNewItem(newitem, uint32(item->count), false, false, true);
player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, item->itemid, item->count);
player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE, loot->loot_type, item->count);
}
else
player->SendEquipError( msg, NULL, NULL );
@ -497,6 +498,7 @@ void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data )
Item * newitem = target->StoreNewItem( dest, item.itemid, true, item.randomPropertyId );
target->SendNewItem(newitem, uint32(item.count), false, false, true );
target->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, item.itemid, item.count);
target->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE, pLoot->loot_type, item.count);
// mark as looted
item.count=0;