mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7716] Fixed some typos and possible crashes.
This commit is contained in:
parent
c2e6dd20dd
commit
c9d51a6dc7
25 changed files with 281 additions and 263 deletions
|
|
@ -720,12 +720,12 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
|||
continue;
|
||||
// skip wrong arena achievements, if not achievIdByArenaSlot then normal total death counter
|
||||
bool notfit = false;
|
||||
for(int i = 0; i < MAX_ARENA_SLOT; ++i)
|
||||
for(int j = 0; j < MAX_ARENA_SLOT; ++j)
|
||||
{
|
||||
if(achievIdByArenaSlot[i] == achievement->ID)
|
||||
if(achievIdByArenaSlot[j] == achievement->ID)
|
||||
{
|
||||
BattleGround* bg = GetPlayer()->GetBattleGround();
|
||||
if(!bg || !bg->isArena() || ArenaTeam::GetSlotByType(bg->GetArenaType()) != i)
|
||||
if(!bg || !bg->isArena() || ArenaTeam::GetSlotByType(bg->GetArenaType()) != j)
|
||||
notfit = true;
|
||||
|
||||
break;
|
||||
|
|
@ -749,26 +749,26 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
|||
|
||||
// search case
|
||||
bool found = false;
|
||||
for(int i = 0; achievIdForDangeon[i][0]; ++i)
|
||||
for(int j = 0; achievIdForDangeon[j][0]; ++j)
|
||||
{
|
||||
if(achievIdForDangeon[i][0] == achievement->ID)
|
||||
if(achievIdForDangeon[j][0] == achievement->ID)
|
||||
{
|
||||
if(map->IsRaid())
|
||||
{
|
||||
// if raid accepted (ignore difficulty)
|
||||
if(!achievIdForDangeon[i][2])
|
||||
if(!achievIdForDangeon[j][2])
|
||||
break; // for
|
||||
}
|
||||
else if(GetPlayer()->GetDifficulty()==DIFFICULTY_NORMAL)
|
||||
{
|
||||
// dungeon in normal mode accepted
|
||||
if(!achievIdForDangeon[i][1])
|
||||
if(!achievIdForDangeon[j][1])
|
||||
break; // for
|
||||
}
|
||||
else
|
||||
{
|
||||
// dungeon in heroic mode accepted
|
||||
if(!achievIdForDangeon[i][3])
|
||||
if(!achievIdForDangeon[j][3])
|
||||
break; // for
|
||||
}
|
||||
|
||||
|
|
@ -890,9 +890,9 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
|||
break;
|
||||
|
||||
bool matchFound = false;
|
||||
for (int i = 0; i < 3; ++i)
|
||||
for (int j = 0; j < 3; ++j)
|
||||
{
|
||||
int32 exploreFlag = GetAreaFlagByAreaID(worldOverlayEntry->areatableID[i]);
|
||||
int32 exploreFlag = GetAreaFlagByAreaID(worldOverlayEntry->areatableID[j]);
|
||||
if(exploreFlag < 0)
|
||||
break;
|
||||
|
||||
|
|
@ -1392,7 +1392,7 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry,
|
|||
{
|
||||
progress = &iter->second;
|
||||
|
||||
uint32 newValue;
|
||||
uint32 newValue = 0;
|
||||
switch(ptype)
|
||||
{
|
||||
case PROGRESS_SET:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue