mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
[7637] Prevent console spam - FATAL: Unknown arena team type %u for some arena team. Author: rastikzzz
--HG-- branch : trunk
This commit is contained in:
@@ -673,20 +673,12 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
||||
// AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case
|
||||
if(!miscvalue1)
|
||||
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();
|
||||
if(!bg || ArenaTeam::GetSlotByType(bg->GetArenaType())!=i)
|
||||
notfit = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(notfit)
|
||||
BattleGround* bg = GetPlayer()->GetBattleGround();
|
||||
if(!bg || !bg->isArena())
|
||||
continue;
|
||||
//bg is arena so bg->GetArenaType() will return correct value
|
||||
uint8 slot = ArenaTeam::GetSlotByType(bg->GetArenaType());
|
||||
if(slot >= MAX_ARENA_SLOT || achievIdByArenaSlot[slot] != achievement->ID)
|
||||
continue;
|
||||
|
||||
SetCriteriaProgress(achievementCriteria, 1, PROGRESS_ACCUMULATE);
|
||||
|
||||
Reference in New Issue
Block a user