From 1e9de7dbd776316a138d965dba84696e5ec354e0 Mon Sep 17 00:00:00 2001 From: Trazom62 Date: Tue, 23 Mar 2010 19:15:17 +0100 Subject: Implement Four-Horsemen achievements (requires DB Data). Fixes issue #1107. --HG-- branch : trunk --- src/game/InstanceData.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/game/InstanceData.cpp') diff --git a/src/game/InstanceData.cpp b/src/game/InstanceData.cpp index cc42a453ea8..3ff804818ea 100644 --- a/src/game/InstanceData.cpp +++ b/src/game/InstanceData.cpp @@ -322,6 +322,17 @@ void InstanceData::DoCompleteAchievement(uint32 achievement) pPlayer->CompletedAchievement(AE); } +// Update Achievement Criteria for all players in instance +void InstanceData::DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1, uint32 miscvalue2, Unit *unit, uint32 time) +{ + Map::PlayerList const &PlayerList = instance->GetPlayers(); + + if (!PlayerList.isEmpty()) + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + if (Player *pPlayer = i->getSource()) + pPlayer->UpdateAchievementCriteria(type, miscvalue1, miscvalue2, unit, time); +} + // Remove Auras due to Spell on all players in instance void InstanceData::DoRemoveAurasDueToSpellOnPlayers(uint32 spell) { -- cgit v1.2.3