[7719] Use all existed 4 world map overlay area ids instead 3, replace values by constant for avoid problem repeat.

This commit is contained in:
VladimirMangos 2009-04-26 20:03:36 +04:00
parent d74cdadc54
commit b62c142425
6 changed files with 24 additions and 14 deletions

View file

@ -890,12 +890,16 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
break;
bool matchFound = false;
for (int j = 0; j < 3; ++j)
for (int j = 0; j < MAX_WORLD_MAP_OVERLAY_AREA_IDX; ++j)
{
int32 exploreFlag = GetAreaFlagByAreaID(worldOverlayEntry->areatableID[j]);
if(exploreFlag < 0)
uint32 area_id = worldOverlayEntry->areatableID[j];
if(!area_id) // array have 0 only in empty tail
break;
int32 exploreFlag = GetAreaFlagByAreaID(area_id);
if(exploreFlag < 0)
continue;
uint32 playerIndexOffset = uint32(exploreFlag) / 32;
uint32 mask = 1<< (uint32(exploreFlag) % 32);