mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-28 03:57:02 +02:00
Fixed levelling up of commander
This commit is contained in:
parent
b58bbcbdd8
commit
328944e111
@ -623,7 +623,12 @@ void CStackWindow::init()
|
||||
selectedIcon = nullptr;
|
||||
selectedSkill = 0;
|
||||
if (info->levelupInfo)
|
||||
{
|
||||
selectedSkill = info->levelupInfo->skills.front();
|
||||
logGlobal->debugStream() << "Received commander level-up. Possible options are: ";
|
||||
for (auto skill : info->levelupInfo->skills)
|
||||
logGlobal->debugStream() << "Skill #" << skill;
|
||||
}
|
||||
|
||||
commanderTab = nullptr;
|
||||
activeTab = 0;
|
||||
@ -709,6 +714,7 @@ CStackWindow::~CStackWindow()
|
||||
{
|
||||
if (info->levelupInfo)
|
||||
{
|
||||
info->levelupInfo->callback(selectedSkill);
|
||||
logGlobal->debugStream() << "Selected skill was " << selectedSkill;
|
||||
info->levelupInfo->callback(vstd::find_pos(info->levelupInfo->skills, selectedSkill));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user