mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-15 11:46:56 +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
|
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(0); // artifact
|
||||||
allowedBonus.push_back(1); // gold
|
allowedBonus.push_back(1); // gold
|
||||||
if(initialFaction.getNum() >= 0)
|
if(initialFaction.getNum() >= 0)
|
||||||
@ -922,7 +922,7 @@ void OptionsTab::SelectionWindow::setElement(int elem, bool doApply)
|
|||||||
{
|
{
|
||||||
if(elem >= 4)
|
if(elem >= 4)
|
||||||
return;
|
return;
|
||||||
set.bonus = static_cast<PlayerSettings::Ebonus>(elem-1);
|
set.bonus = static_cast<PlayerSettings::Ebonus>(allowedBonus[elem]);
|
||||||
if(set.bonus != PlayerSettings::NONE)
|
if(set.bonus != PlayerSettings::NONE)
|
||||||
{
|
{
|
||||||
if(!doApply)
|
if(!doApply)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user