1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-10 04:37:45 +00:00

add achv history support;

This commit is contained in:
Alice Ogeda 2023-03-05 16:05:25 -03:00
parent 86f0432293
commit 9528b8177e

View file

@ -61,12 +61,12 @@ void AchievementMgr::unlockAchievement( Entity::Player& player, uint32_t achieve
// handle player achievement history // handle player achievement history
// todo: verify retail behavior due to client copying the last achievement unlocked // 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() ); std::rotate( achvData.history.rbegin(), achvData.history.rbegin() + 1, achvData.history.rend() );
achvHistory[ 0 ] = achievementId;*/ achvData.history[ 0 ] = achievementId;
// fire packets // fire packets
player.setAchievementData( achvData );
Common::Service< World::Manager::PlayerMgr >::ref().onUnlockAchievement( player, achievementId ); Common::Service< World::Manager::PlayerMgr >::ref().onUnlockAchievement( player, achievementId );
// check and add title to player // check and add title to player