mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-28 10:56:38 -05:00
fix copy from existing encounter group function
This commit is contained in:
@@ -31,4 +31,21 @@ WildMonInfo getDefaultMonInfo(Field field) {
|
||||
return newInfo;
|
||||
}
|
||||
|
||||
WildMonInfo copyMonInfoFromTab(QTableWidget *monTable, Field field) {
|
||||
WildMonInfo newInfo;
|
||||
QVector<WildPokemon> newWildMons;
|
||||
|
||||
for (int row = 0; row < monTable->rowCount(); row++) {
|
||||
WildPokemon newWildMon;
|
||||
newWildMon.species = monTable->cellWidget(row, 1)->findChild<QComboBox *>()->currentText();
|
||||
newWildMon.minLevel = monTable->cellWidget(row, 2)->findChild<QSpinBox *>()->value();
|
||||
newWildMon.maxLevel = monTable->cellWidget(row, 3)->findChild<QSpinBox *>()->value();
|
||||
newWildMons.append(newWildMon);
|
||||
}
|
||||
newInfo.active = true;
|
||||
newInfo.wildPokemon = newWildMons;
|
||||
newInfo.encounterRate = monTable->findChild<QSlider *>()->value();
|
||||
|
||||
return newInfo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user