1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-15 20:03:15 +02:00

map editor: fix prison hero selection

This commit is contained in:
godric3
2024-05-11 21:54:24 +02:00
parent 26b76db6e7
commit 578800b3e3

View File

@@ -317,7 +317,7 @@ void Inspector::updateProperties(CGHeroInstance * o)
addProperty("Skills", PropertyEditorPlaceholder(), delegate, false);
addProperty("Spells", PropertyEditorPlaceholder(), new HeroSpellDelegate(*o), false);
if(o->type)
if(o->type || o->ID == Obj::PRISON)
{ //Hero type
auto * delegate = new InspectorDelegate;
for(int i = 0; i < VLC->heroh->objects.size(); ++i)
@@ -330,7 +330,7 @@ void Inspector::updateProperties(CGHeroInstance * o)
}
}
}
addProperty("Hero type", o->type->getNameTranslated(), delegate, false);
addProperty("Hero type", o->type ? o->type->getNameTranslated() : "", delegate, false);
}
}