[7637] Prevent console spam - FATAL: Unknown arena team type %u for some arena team.

Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
rastikzzz 2009-04-08 18:16:57 +02:00 committed by Triply
parent def4351671
commit 3f0bef7a32
2 changed files with 7 additions and 15 deletions

View file

@ -673,20 +673,12 @@ 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;
// skip wrong arena achievements, if not achievIdByArenaSlot then normal totla death counter
bool notfit = false;
for(int i = 0; i < MAX_ARENA_SLOT; ++i)
{
if(achievIdByArenaSlot[i] == achievement->ID)
{
BattleGround* bg = GetPlayer()->GetBattleGround(); BattleGround* bg = GetPlayer()->GetBattleGround();
if(!bg || ArenaTeam::GetSlotByType(bg->GetArenaType())!=i) if(!bg || !bg->isArena())
notfit = true; continue;
//bg is arena so bg->GetArenaType() will return correct value
break; uint8 slot = ArenaTeam::GetSlotByType(bg->GetArenaType());
} if(slot >= MAX_ARENA_SLOT || achievIdByArenaSlot[slot] != achievement->ID)
}
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 "7636" #define REVISION_NR "7637"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__