Core/AchievementMgr: We heard you like uninitialized variables so... we initialized them for you so you can hate us
This commit is contained in:
@@ -632,7 +632,7 @@ void AchievementMgr::LoadFromDB(PreparedQueryResult achievementResult, PreparedQ
|
||||
|
||||
// title achievement rewards are retroactive
|
||||
if (AchievementReward const* reward = sAchievementMgr->GetAchievementReward(achievement))
|
||||
if (uint32 titleId = reward->titleId[GetPlayer()->GetTeam() == ALLIANCE ? 0 : 1])
|
||||
if (uint32 titleId = reward->titleId[Player::TeamForRace(GetPlayer()->getRace()) == ALLIANCE ? 0 : 1])
|
||||
if (CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(titleId))
|
||||
if (!GetPlayer()->HasTitle(titleEntry))
|
||||
GetPlayer()->SetTitle(titleEntry);
|
||||
|
||||
Reference in New Issue
Block a user