1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Fix for empty primary skills array

This commit is contained in:
nordsoft 2023-09-16 05:52:23 +02:00
parent 991a755a1f
commit 033e7010ca

View File

@ -228,6 +228,7 @@ void RewardsWidget::saveCurrentVisitInfo(int index)
vinfo.reward.movePoints = ui->rMovePoints->value();
vinfo.reward.movePercentage = ui->rMovePercentage->value();
vinfo.reward.removeObject = ui->removeObject->isChecked();
vinfo.reward.primary.resize(4);
vinfo.reward.primary[0] = ui->rAttack->value();
vinfo.reward.primary[1] = ui->rDefence->value();
vinfo.reward.primary[2] = ui->rPower->value();
@ -292,6 +293,7 @@ void RewardsWidget::saveCurrentVisitInfo(int index)
vinfo.limiter.heroExperience = ui->lHeroExperience->value();
vinfo.limiter.manaPoints = ui->lManaPoints->value();
vinfo.limiter.manaPercentage = ui->lManaPercentage->value();
vinfo.limiter.primary.resize(4);
vinfo.limiter.primary[0] = ui->lAttack->value();
vinfo.limiter.primary[1] = ui->lDefence->value();
vinfo.limiter.primary[2] = ui->lPower->value();