mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix hero serialization
This commit is contained in:
parent
9d054f0bd5
commit
bd32bd66b3
@ -128,10 +128,15 @@ void MapController::repairMap()
|
|||||||
assert(type->heroClass);
|
assert(type->heroClass);
|
||||||
//TODO: find a way to get proper type name
|
//TODO: find a way to get proper type name
|
||||||
if(obj->ID == Obj::HERO)
|
if(obj->ID == Obj::HERO)
|
||||||
|
{
|
||||||
nih->typeName = "hero";
|
nih->typeName = "hero";
|
||||||
|
nih->subTypeName = type->heroClass->identifier;
|
||||||
|
}
|
||||||
if(obj->ID == Obj::PRISON)
|
if(obj->ID == Obj::PRISON)
|
||||||
|
{
|
||||||
nih->typeName = "prison";
|
nih->typeName = "prison";
|
||||||
nih->subTypeName = type->heroClass->identifier;
|
nih->subTypeName = "prison";
|
||||||
|
}
|
||||||
|
|
||||||
nih->type = type;
|
nih->type = type;
|
||||||
if(nih->name.empty())
|
if(nih->name.empty())
|
||||||
|
Loading…
Reference in New Issue
Block a user