mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[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:
parent
def4351671
commit
3f0bef7a32
2 changed files with 7 additions and 15 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7636"
|
||||
#define REVISION_NR "7637"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue