Core/Achievements: m_allCompletedAchievements should store only realm firsts
This commit is contained in:
@@ -2381,14 +2381,15 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint32 achievement_id = fields[0].GetUInt32();
|
||||
if (!sAchievementStore.LookupEntry(achievement_id))
|
||||
const AchievementEntry* achievement = sAchievementStore.LookupEntry(achievement_id);
|
||||
if (!achievement)
|
||||
{
|
||||
// we will remove not existed achievement for all characters
|
||||
sLog->outError("Non-existing achievement %u data removed from table `character_achievement`.", achievement_id);
|
||||
CharacterDatabase.PExecute("DELETE FROM character_achievement WHERE achievement = %u", achievement_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
else if (achievement->flags & (ACHIEVEMENT_FLAG_REALM_FIRST_REACH | ACHIEVEMENT_FLAG_REALM_FIRST_KILL))
|
||||
m_allCompletedAchievements.insert(achievement_id);
|
||||
} while (result->NextRow());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user