Core/Achievements: Mountain o' Mounts and similar achievement will be properly awarded when you have required amount of mounts, not earlier (#19002)

(cherry picked from commit 8646e72f18)
This commit is contained in:
xinef1
2017-01-29 16:10:03 +01:00
committed by funjoker
parent 29166a1d0a
commit a07f73c846

View File

@@ -1374,7 +1374,11 @@ void AchievementMgr<T>::UpdateAchievementCriteria(AchievementCriteriaTypes type,
for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter)
{
if (skillIter->second->SkillLine == achievementCriteria->learn_skillline_spell.skillLine)
spellCount++;
{
// do not add couter twice if by any chance skill is listed twice in dbc (eg. skill 777 and spell 22717)
++spellCount;
break;
}
}
}
SetCriteriaProgress(achievementCriteria, spellCount, referencePlayer);
@@ -1397,7 +1401,11 @@ void AchievementMgr<T>::UpdateAchievementCriteria(AchievementCriteriaTypes type,
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellIter.first);
for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter)
if (skillIter->second->SkillLine == achievementCriteria->learn_skill_line.skillLine)
spellCount++;
{
// do not add couter twice if by any chance skill is listed twice in dbc (eg. skill 777 and spell 22717)
++spellCount;
break;
}
}
SetCriteriaProgress(achievementCriteria, spellCount, referencePlayer);
break;