Implement Four-Horsemen achievements (requires DB Data).

Fixes issue #1107.

--HG--
branch : trunk
This commit is contained in:
Trazom62
2010-03-23 19:15:17 +01:00
parent cfc094040f
commit 1e9de7dbd7
5 changed files with 77 additions and 3 deletions
+11
View File
@@ -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)
{
+3
View File
@@ -158,6 +158,9 @@ class InstanceData : public ZoneScript
// Complete Achievement for all players in instance
void DoCompleteAchievement(uint32 achievement);
// Update Achievement Criteria for all players in instance
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1=0, uint32 miscvalue2=0, Unit *unit=NULL, uint32 time=0);
// Remove Auras due to Spell on all players in instance
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell);