diff options
| author | Shauren <shauren.trinity@gmail.com> | 2016-05-07 01:16:29 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2016-05-07 01:16:29 +0200 |
| commit | c75fcbe20b07fd7518be58bf02ba30d903133449 (patch) | |
| tree | 747a9ecc6a91ffc04d394090c0a3d2e588f630b4 /src/server/game/Conditions/ConditionMgr.cpp | |
| parent | 44962fe3a9551f183ee9003c8947d5f433cfee16 (diff) | |
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
Diffstat (limited to 'src/server/game/Conditions/ConditionMgr.cpp')
| -rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<uint32>::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); |
