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

Merge pull request #230 from dydzio0614/CommanderExperience

Some repair for WoG commanders
This commit is contained in:
ArseniyShestakov 2016-10-02 19:29:55 +03:00 committed by GitHub
commit 6f82dc3e15
2 changed files with 2 additions and 2 deletions

View File

@ -499,7 +499,7 @@ BattleInfo * BattleInfo::setupBattle( int3 tile, ETerrainType terrain, BFieldTyp
//adding commanders
for (int i = 0; i < 2; ++i)
{
if (heroes[i] && heroes[i]->commander)
if (heroes[i] && heroes[i]->commander && heroes[i]->commander->alive)
{
CStack * stack = curB->generateNewStack (*heroes[i]->commander, !i, SlotID::COMMANDER_SLOT_PLACEHOLDER,
creatureBank ? commanderBank[i] : commanderField[i]);

View File

@ -102,7 +102,7 @@ public:
//TODO: what if Commander is not a part of creature set?
//commander class is determined by its base creature
ui8 alive;
ui8 alive; //maybe change to bool when breaking save compatibility?
ui8 level; //required only to count callbacks
std::string name; // each Commander has different name
std::vector <ui8> secondarySkills; //ID -> level