mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
parent
d71b11de81
commit
080e037c54
@ -43,7 +43,7 @@ class CSelectableSkill;
|
||||
*/
|
||||
|
||||
CCreatureWindow::CCreatureWindow (const CStack &stack, int Type):
|
||||
CWindowObject(PLAYER_COLORED | (Type < 3 ? RCLICK_POPUP : 0 ) ),
|
||||
CWindowObject(PLAYER_COLORED | (Type == 0 ? RCLICK_POPUP : 0 ) ),
|
||||
type(Type)
|
||||
{
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL;
|
||||
@ -58,7 +58,7 @@ CCreatureWindow::CCreatureWindow (const CStack &stack, int Type):
|
||||
}
|
||||
|
||||
CCreatureWindow::CCreatureWindow (const CStackInstance &stack, int Type):
|
||||
CWindowObject(PLAYER_COLORED | (Type < 3 ? RCLICK_POPUP : 0 ) ),
|
||||
CWindowObject(PLAYER_COLORED | (Type == 0 ? RCLICK_POPUP : 0 ) ),
|
||||
type(Type)
|
||||
{
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL;
|
||||
@ -67,7 +67,7 @@ CCreatureWindow::CCreatureWindow (const CStackInstance &stack, int Type):
|
||||
}
|
||||
|
||||
CCreatureWindow::CCreatureWindow(int Cid, int Type, int creatureCount):
|
||||
CWindowObject(PLAYER_COLORED | (Type < 3 ? RCLICK_POPUP : 0 ) ),
|
||||
CWindowObject(PLAYER_COLORED | (Type == 0 ? RCLICK_POPUP : 0 ) ),
|
||||
type(Type)
|
||||
{
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL;
|
||||
@ -78,7 +78,7 @@ CCreatureWindow::CCreatureWindow(int Cid, int Type, int creatureCount):
|
||||
}
|
||||
|
||||
CCreatureWindow::CCreatureWindow(const CStackInstance &st, int Type, boost::function<void()> Upg, boost::function<void()> Dsm, UpgradeInfo *ui):
|
||||
CWindowObject(PLAYER_COLORED | (Type < 3 ? RCLICK_POPUP : 0 ) ),
|
||||
CWindowObject(PLAYER_COLORED | (Type == 0 ? RCLICK_POPUP : 0 ) ),
|
||||
type(Type),
|
||||
dismiss(0),
|
||||
upgrade(0),
|
||||
@ -899,7 +899,7 @@ CIntObject * createCreWindow(
|
||||
if(settings["general"]["classicCreatureWindow"].Bool())
|
||||
return new CCreInfoWindow(*s, lclick);
|
||||
else
|
||||
return new CCreatureWindow(*s, CCreatureWindow::BATTLE);
|
||||
return new CCreatureWindow(*s, lclick ? CCreatureWindow::BATTLE : CCreatureWindow::OTHER);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,9 +22,10 @@ PlayerInfo::PlayerInfo(): canHumanPlay(false), canComputerPlay(false),
|
||||
|
||||
si8 PlayerInfo::defaultCastle() const
|
||||
{
|
||||
if(allowedFactions.size() == 1)
|
||||
if(allowedFactions.size() == 1 || !isFactionRandom)
|
||||
{
|
||||
// only one faction is available - pick it
|
||||
// faction can't be chosen - set to first that is marked as allowed
|
||||
assert(!allowedFactions.empty());
|
||||
return *allowedFactions.begin();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user