From 9528b8177e0241e94ea31120a208a3771f354c90 Mon Sep 17 00:00:00 2001 From: Alice Ogeda Date: Sun, 5 Mar 2023 16:05:25 -0300 Subject: [PATCH] add achv history support; --- src/world/Manager/AchievementMgr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/world/Manager/AchievementMgr.cpp b/src/world/Manager/AchievementMgr.cpp index 80bbc81f..aacf7ab8 100644 --- a/src/world/Manager/AchievementMgr.cpp +++ b/src/world/Manager/AchievementMgr.cpp @@ -61,12 +61,12 @@ void AchievementMgr::unlockAchievement( Entity::Player& player, uint32_t achieve // handle player achievement history // todo: verify retail behavior due to client copying the last achievement unlocked - /* auto& achvHistory = player.getAchievementHistory(); - std::rotate( achvHistory.rbegin(), achvHistory.rbegin() + 1, achvHistory.rend() ); - achvHistory[ 0 ] = achievementId;*/ + std::rotate( achvData.history.rbegin(), achvData.history.rbegin() + 1, achvData.history.rend() ); + achvData.history[ 0 ] = achievementId; // fire packets + player.setAchievementData( achvData ); Common::Service< World::Manager::PlayerMgr >::ref().onUnlockAchievement( player, achievementId ); // check and add title to player