1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

use GameConstants::SPELL_LEVELS

This commit is contained in:
godric3 2024-03-24 19:02:39 +01:00
parent acceca0139
commit 353435047f

View File

@ -45,7 +45,7 @@ void HeroSpellWidget::initSpellLists()
{
QListWidget * spellLists[] = { ui->spellList1, ui->spellList2, ui->spellList3, ui->spellList4, ui->spellList5 };
auto spells = VLC->spellh->objects;
for (int i = 0; i < 5; i++)
for (int i = 0; i < GameConstants::SPELL_LEVELS; i++)
{
std::vector<ConstTransitivePtr<CSpell>> spellsByLevel;
auto getSpellsByLevel = [i](auto spell) {