[7639] Correctly fixed error spam, revert [7637]. Thx to vladimir Author: Triply
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user