1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00
This commit is contained in:
AlexVinS
2017-08-12 14:36:04 +03:00
parent 15138c23de
commit 8c0fab1dcf
19 changed files with 37 additions and 33 deletions

View File

@@ -427,20 +427,20 @@ void CGPandoraBox::serializeJsonOptions(JsonSerializeFormat & handler)
for(const auto & p : skillMap.Struct())
{
const std::string id = p.first;
const std::string levelId = p.second.String();
const std::string skillName = p.first;
const std::string levelId = p.second.String();
const int rawId = vstd::find_pos(NSecondarySkill::names, id);
const int rawId = vstd::find_pos(NSecondarySkill::names, skillName);
if(rawId < 0)
{
logGlobal->error("Invalid secondary skill %s", id);
logGlobal->error("Invalid secondary skill %s", skillName);
continue;
}
const int level = vstd::find_pos(NSecondarySkill::levels, levelId);
if(level < 0)
{
logGlobal->error("Invalid secondary skill level%s", levelId);
logGlobal->error("Invalid secondary skill level %s", levelId);
continue;
}