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

Fix creature set loading

This commit is contained in:
AlexVinS 2016-02-26 02:35:30 +03:00
parent 8e3e574900
commit 66d8408130

View File

@ -502,11 +502,14 @@ void CCreatureSet::serializeJson(JsonSerializeFormat & handler, const std::strin
{
for(size_t idx = 0; idx < json.Vector().size(); idx++)
{
CStackInstance * new_stack = new CStackInstance();
if(json.Vector()[idx]["amount"].Float() > 0)
{
CStackInstance * new_stack = new CStackInstance();
new_stack->readJson(json.Vector()[idx]);
new_stack->readJson(json.Vector()[idx]);
putStack(SlotID(idx), new_stack);
putStack(SlotID(idx), new_stack);
}
}
}
}