[7639] Correctly fixed error spam, revert [7637]. Thx to vladimir

Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
Triply 2009-04-08 19:09:07 +02:00
parent 6c19590062
commit 4ec75c7c9e
2 changed files with 15 additions and 7 deletions

View file

@ -673,12 +673,20 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
// AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case // AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case
if(!miscvalue1) if(!miscvalue1)
continue; continue;
BattleGround* bg = GetPlayer()->GetBattleGround(); // skip wrong arena achievements, if not achievIdByArenaSlot then normal total death counter
if(!bg || !bg->isArena()) bool notfit = false;
continue; for(int i = 0; i < MAX_ARENA_SLOT; ++i)
//bg is arena so bg->GetArenaType() will return correct value {
uint8 slot = ArenaTeam::GetSlotByType(bg->GetArenaType()); if(achievIdByArenaSlot[i] == achievement->ID)
if(slot >= MAX_ARENA_SLOT || achievIdByArenaSlot[slot] != achievement->ID) {
BattleGround* bg = GetPlayer()->GetBattleGround();
if(!bg || !bg->isArena() || ArenaTeam::GetSlotByType(bg->GetArenaType()) != i)
notfit = true;
break;
}
}
if(notfit)
continue; continue;
SetCriteriaProgress(achievementCriteria, 1, PROGRESS_ACCUMULATE); SetCriteriaProgress(achievementCriteria, 1, PROGRESS_ACCUMULATE);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7638" #define REVISION_NR "7639"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__