Przeglądaj źródła

use `GameConstants::SPELL_LEVELS`

godric3 1 rok temu
rodzic
commit
353435047f
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      mapeditor/inspector/herospellwidget.cpp

+ 1 - 1
mapeditor/inspector/herospellwidget.cpp

@@ -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) {