fix(Core/Player): achievements activation (#1463)

This commit is contained in:
robens {e.py}
2019-02-14 19:11:54 +01:00
committed by Francesco Borzì
parent cb81f3c17a
commit 1b7522ff0e
2 changed files with 4 additions and 1 deletions
@@ -5,6 +5,7 @@
*/ */
#include "AchievementMgr.h" #include "AchievementMgr.h"
#include "AccountMgr.h"
#include "ArenaTeam.h" #include "ArenaTeam.h"
#include "ArenaTeamMgr.h" #include "ArenaTeamMgr.h"
#include "BattlegroundAB.h" #include "BattlegroundAB.h"
@@ -2190,7 +2191,7 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement)
} }
} }
if (achievement->flags & (ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_KILL)) if (achievement->flags & (ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_KILL) && AccountMgr::IsPlayerAccount(m_player->GetSession()->GetSecurity()))
sAchievementMgr->SetRealmCompleted(achievement); sAchievementMgr->SetRealmCompleted(achievement);
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT, achievement->ID); UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT, achievement->ID);
@@ -1211,6 +1211,8 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
} }
// all item positions resolved // all item positions resolved
CheckAllAchievementCriteria();
return true; return true;
} }