Moved battleground achievement scripted checks into scripts

Call ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL updates in code
Implemented achievements: Save the Day, Quick Cap, Warsong Expedience

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-08-13 13:48:59 +02:00
parent 9bd2619425
commit 30468a106f
11 changed files with 175 additions and 54 deletions
@@ -1872,6 +1872,13 @@ bool Battleground::IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxSc
return score >= minScore && score <= maxScore;
}
void Battleground::StartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
{
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
if (Player* pPlayer = sObjectMgr.GetPlayer(itr->first))
pPlayer->GetAchievementMgr().StartTimedAchievement(type, entry);
}
void Battleground::SetBracket(PvPDifficultyEntry const* bracketEntry)
{
m_BracketId = bracketEntry->GetBracketId();