1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed schemas for battle animation overwritting an solo attribute instead images attribute dependant. Now working for replacing battle sprites on pre-existant heroes too (#490)

This commit is contained in:
Fior.in 2018-09-12 20:33:34 -03:00 committed by Alexander Shishkin
parent 99f167a44c
commit cca46e311d
2 changed files with 6 additions and 6 deletions

View File

@ -59,6 +59,11 @@
"type":"boolean", "type":"boolean",
"description": "This hero is female (changeable via editor)" "description": "This hero is female (changeable via editor)"
}, },
"battleImage": {
"type":"string",
"description": "Custom def used on battle",
"format" : "defFile"
},
"images": { "images": {
"type":"object", "type":"object",
"additionalProperties" : false, "additionalProperties" : false,
@ -84,11 +89,6 @@
"type":"string", "type":"string",
"description": "Small image of hero specialty for use in exchange screen", "description": "Small image of hero specialty for use in exchange screen",
"format" : "imageFile" "format" : "imageFile"
},
"battleImage": {
"type":"string",
"description": "Custom def used on battle",
"format" : "defFile"
} }
} }
}, },

View File

@ -322,7 +322,7 @@ CHero * CHeroHandler::loadFromJson(const JsonNode & node, const std::string & id
hero->iconSpecLarge = node["images"]["specialtyLarge"].String(); hero->iconSpecLarge = node["images"]["specialtyLarge"].String();
hero->portraitSmall = node["images"]["small"].String(); hero->portraitSmall = node["images"]["small"].String();
hero->portraitLarge = node["images"]["large"].String(); hero->portraitLarge = node["images"]["large"].String();
hero->battleImage = node["images"]["battleImage"].String(); hero->battleImage = node["battleImage"].String();
loadHeroArmy(hero, node); loadHeroArmy(hero, node);
loadHeroSkills(hero, node); loadHeroSkills(hero, node);