[11794] Add support to start timed achievements in BGs

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Feanordev 2011-09-16 21:42:10 +02:00 committed by Schmoozerd
parent 0eff04c161
commit dc5595a91f
12 changed files with 30 additions and 1 deletions

View file

@ -1165,6 +1165,13 @@ void BattleGround::StartBattleGround()
sBattleGroundMgr.AddBattleGround(GetInstanceID(), GetTypeID(), this);
}
void BattleGround::StartTimedAchievement(AchievementCriteriaTypes type, uint32 entry)
{
for (BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
if (Player* pPlayer = GetBgMap()->GetPlayer(itr->first))
pPlayer->GetAchievementMgr().StartTimedAchievementCriteria(type, entry);
}
void BattleGround::AddPlayer(Player *plr)
{
// remove afk from player