From c75fcbe20b07fd7518be58bf02ba30d903133449 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 7 May 2016 01:16:29 +0200 Subject: Core/Achievements: AchievementMgr refactoring * Extracted base CriteriaHandler class that deals with criteria only and will be reused for future scenario implementation * Fixed players earning guild achievements --- src/server/game/Conditions/ConditionMgr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/game/Conditions/ConditionMgr.cpp') diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 002f4040255..4a0fa1984aa 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -425,8 +425,8 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const } case CONDITION_REALM_ACHIEVEMENT: { - AchievementEntry const* achievement = sAchievementMgr->GetAchievement(ConditionValue1); - if (achievement && sAchievementMgr->IsRealmCompleted(achievement, std::numeric_limits::max())) + AchievementEntry const* achievement = sAchievementStore.LookupEntry(ConditionValue1); + if (achievement && sAchievementMgr->IsRealmCompleted(achievement)) condMeets = true; break; } @@ -1908,7 +1908,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const } case CONDITION_ACHIEVEMENT: { - AchievementEntry const* achievement = sAchievementMgr->GetAchievement(cond->ConditionValue1); + AchievementEntry const* achievement = sAchievementStore.LookupEntry(cond->ConditionValue1); if (!achievement) { TC_LOG_ERROR("sql.sql", "%s has non existing achivement id (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); @@ -2211,7 +2211,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const break; case CONDITION_REALM_ACHIEVEMENT: { - AchievementEntry const* achievement = sAchievementMgr->GetAchievement(cond->ConditionValue1); + AchievementEntry const* achievement = sAchievementStore.LookupEntry(cond->ConditionValue1); if (!achievement) { TC_LOG_ERROR("sql.sql", "%s has non existing realm first achivement id (%u), skipped.", cond->ToString(true).c_str(), cond->ConditionValue1); -- cgit v1.2.3