浏览代码

Fix hero serialization

nordsoft 2 年之前
父节点
当前提交
bd32bd66b3
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      mapeditor/mapcontroller.cpp

+ 6 - 1
mapeditor/mapcontroller.cpp

@@ -128,10 +128,15 @@ void MapController::repairMap()
 			assert(type->heroClass);
 			//TODO: find a way to get proper type name
 			if(obj->ID == Obj::HERO)
+			{
 				nih->typeName = "hero";
+				nih->subTypeName = type->heroClass->identifier;
+			}
 			if(obj->ID == Obj::PRISON)
+			{
 				nih->typeName = "prison";
-			nih->subTypeName = type->heroClass->identifier;
+				nih->subTypeName = "prison";
+			}
 			
 			nih->type = type;
 			if(nih->name.empty())