mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Merge pull request #2872 from Laserlicht/bonus_selection
fix bonus selection
This commit is contained in:
commit
00db2e245f
@ -625,7 +625,7 @@ OptionsTab::SelectionWindow::SelectionWindow(PlayerColor _color, SelType _type)
|
||||
}
|
||||
|
||||
allowedBonus.push_back(-1); // random
|
||||
if(initialHero.getNum() >= -1)
|
||||
if(initialHero.getNum() >= -1 || SEL->getPlayerInfo(color.getNum()).heroesNames.size() > 0)
|
||||
allowedBonus.push_back(0); // artifact
|
||||
allowedBonus.push_back(1); // gold
|
||||
if(initialFaction.getNum() >= 0)
|
||||
@ -922,7 +922,7 @@ void OptionsTab::SelectionWindow::setElement(int elem, bool doApply)
|
||||
{
|
||||
if(elem >= 4)
|
||||
return;
|
||||
set.bonus = static_cast<PlayerSettings::Ebonus>(elem-1);
|
||||
set.bonus = static_cast<PlayerSettings::Ebonus>(allowedBonus[elem]);
|
||||
if(set.bonus != PlayerSettings::NONE)
|
||||
{
|
||||
if(!doApply)
|
||||
|
Loading…
Reference in New Issue
Block a user