mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-14 02:33:51 +02:00
fixed formatting and other small issues
This commit is contained in:
parent
73f782aa39
commit
f9a8cb2876
@ -492,9 +492,9 @@ std::vector<std::shared_ptr<Bonus>> SpecialtyInfoToBonuses(const SSpecialtyInfo
|
|||||||
//propagate for regular upgrades of base creature
|
//propagate for regular upgrades of base creature
|
||||||
for(auto cre_id : creatures[spec.subtype]->upgrades)
|
for(auto cre_id : creatures[spec.subtype]->upgrades)
|
||||||
{
|
{
|
||||||
bonus = std::make_shared<Bonus>(*bonus);
|
std::shared_ptr<Bonus> upgradeUpgradedVersion = std::make_shared<Bonus>(*bonus);
|
||||||
bonus->subtype = cre_id;
|
upgradeUpgradedVersion->subtype = cre_id;
|
||||||
result.push_back(bonus);
|
result.push_back(upgradeUpgradedVersion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -613,10 +613,10 @@ void CHeroHandler::loadHeroSpecialty(CHero * hero, const JsonNode & node)
|
|||||||
for(const JsonNode &specialty : specialtiesNode.Vector())
|
for(const JsonNode &specialty : specialtiesNode.Vector())
|
||||||
{
|
{
|
||||||
SSpecialtyInfo spec;
|
SSpecialtyInfo spec;
|
||||||
spec.type = specialty["type"].Float();
|
spec.type = specialty["type"].Integer();
|
||||||
spec.val = specialty["val"].Float();
|
spec.val = specialty["val"].Integer();
|
||||||
spec.subtype = specialty["subtype"].Float();
|
spec.subtype = specialty["subtype"].Integer();
|
||||||
spec.additionalinfo = specialty["info"].Float();
|
spec.additionalinfo = specialty["info"].Integer();
|
||||||
//we convert after loading completes, to have all identifiers for json logging
|
//we convert after loading completes, to have all identifiers for json logging
|
||||||
hero->specDeprecated.push_back(spec);
|
hero->specDeprecated.push_back(spec);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user