From 328944e1111a64804548f6fb7e076338dfc978f3 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Thu, 3 Jul 2014 01:00:16 +0300 Subject: [PATCH] Fixed levelling up of commander --- client/CCreatureWindow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/CCreatureWindow.cpp b/client/CCreatureWindow.cpp index 51e062cb6..f6531aa5d 100644 --- a/client/CCreatureWindow.cpp +++ b/client/CCreatureWindow.cpp @@ -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)); } }