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:
parent
99f167a44c
commit
cca46e311d
@ -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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user