|
@@ -1709,6 +1709,16 @@ void CGHeroInstance::serializeJsonOptions(JsonSerializeFormat & handler)
|
|
|
setHeroTypeName(typeName);
|
|
|
}
|
|
|
|
|
|
+ if(!handler.saving)
|
|
|
+ {
|
|
|
+ if(!appearance)
|
|
|
+ {
|
|
|
+ // crossoverDeserialize
|
|
|
+ type = getHeroType().toHeroType();
|
|
|
+ appearance = VLC->objtypeh->getHandlerFor(Obj::HERO, type->heroClass->getIndex())->getTemplates().front();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
CArmedInstance::serializeJsonOptions(handler);
|
|
|
|
|
|
{
|
|
@@ -1724,13 +1734,6 @@ void CGHeroInstance::serializeJsonOptions(JsonSerializeFormat & handler)
|
|
|
|
|
|
if(!handler.saving)
|
|
|
{
|
|
|
- if(!appearance)
|
|
|
- {
|
|
|
- // crossoverDeserialize
|
|
|
- type = getHeroType().toHeroType();
|
|
|
- appearance = VLC->objtypeh->getHandlerFor(Obj::HERO, type->heroClass->getIndex())->getTemplates().front();
|
|
|
- }
|
|
|
-
|
|
|
patrol.patrolling = (rawPatrolRadius > NO_PATROLING);
|
|
|
patrol.initialPos = visitablePos();
|
|
|
patrol.patrolRadius = (rawPatrolRadius > NO_PATROLING) ? rawPatrolRadius : 0;
|