Jump to content

[7753] ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS implementation


Recommended Posts

Posted

What bug does the patch fix? What features does the patch add?

This patch implements ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS.

For which repository revision was the patch created?

7744

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

Couldn't find any.

diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp
index 912f950..8d91103 100644
--- a/src/game/AchievementMgr.cpp
+++ b/src/game/AchievementMgr.cpp
@@ -562,6 +562,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
        {
            // std. case: increment at 1
            case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST:
+            case ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS:
                // AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case
                if(!miscvalue1)
                    continue;
@@ -1151,7 +1152,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
            case ACHIEVEMENT_CRITERIA_TYPE_HK_RACE:
            case ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS:
            case ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_VENDORS:
-            case ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS:
            case ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL:
            case ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE:
            case ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL:
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index fa8d925..6adb95e 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -3424,6 +3424,7 @@ bool Player::resetTalents(bool no_cost)
    {
        ModifyMoney(-(int32)cost);
        GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TALENTS, cost);
+        GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS, 1);

        m_resetTalentsCost = cost;
        m_resetTalentsTime = time(NULL);

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use