[Cleanup] Remove unused iterator from LoadCharacterDisciplines (#3012)

This commit is contained in:
Aeadoin 2023-03-01 20:35:28 -05:00 committed by GitHub
parent ef214f91e9
commit a78c754c0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -827,14 +827,12 @@ bool ZoneDatabase::LoadCharacterDisciplines(uint32 character_id, PlayerProfile_S
return false;
}
int i = 0;
/* Initialize Disciplines */
memset(pp->disciplines.values, 0, (sizeof(pp->disciplines.values[0]) * MAX_PP_DISCIPLINES));
for (auto& row : character_disciplines) {
if (i < MAX_PP_DISCIPLINES && IsValidSpell(row.disc_id)) {
if (row.slot_id < MAX_PP_DISCIPLINES && IsValidSpell(row.disc_id)) {
pp->disciplines.values[row.slot_id] = row.disc_id;
}
++i;
}
return true;
}