1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00
This commit is contained in:
Ivan Savenko
2013-03-14 20:44:00 +00:00
parent ff1c224a97
commit c4c592b773
14 changed files with 67 additions and 63 deletions

View File

@@ -646,7 +646,7 @@ void CCreatureHandler::loadStackExperience(CCreature * creature, const JsonNode
{
BOOST_FOREACH (const JsonNode &exp, input.Vector())
{
auto bonus = JsonUtils::parseBonus (exp["bonus"]); // FIXME: memory leak? Only copies of bonus is added to creature
auto bonus = JsonUtils::parseBonus (exp["bonus"]);
bonus->source = Bonus::STACK_EXPERIENCE;
bonus->duration = Bonus::PERMANENT;
const JsonVector &values = exp["values"].Vector();
@@ -679,6 +679,7 @@ void CCreatureHandler::loadStackExperience(CCreature * creature, const JsonNode
++lowerLimit;
}
}
delete bonus;
}
}