Fix timed achievement checks for boss killed in instance.
Requires DB update. --HG-- branch : trunk
This commit is contained in:
@@ -339,6 +339,28 @@ void InstanceData::DoUpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
||||
pPlayer->UpdateAchievementCriteria(type, miscvalue1, miscvalue2, unit, time);
|
||||
}
|
||||
|
||||
// Start timed achievement for all players in instance
|
||||
void InstanceData::DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
|
||||
{
|
||||
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->GetAchievementMgr().StartTimedAchievement(type, entry);
|
||||
}
|
||||
|
||||
// Stop timed achievement for all players in instance
|
||||
void InstanceData::DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
|
||||
{
|
||||
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->GetAchievementMgr().RemoveTimedAchievement(type, entry);
|
||||
}
|
||||
|
||||
// Remove Auras due to Spell on all players in instance
|
||||
void InstanceData::DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
|
||||
{
|
||||
|
||||
@@ -162,6 +162,10 @@ class InstanceData : public ZoneScript
|
||||
// Update Achievement Criteria for all players in instance
|
||||
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1=0, uint32 miscvalue2=0, Unit *unit=NULL, uint32 time=0);
|
||||
|
||||
// Start/Stop Timed Achievement Criteria for all players in instance
|
||||
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry);
|
||||
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry);
|
||||
|
||||
// Remove Auras due to Spell on all players in instance
|
||||
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user