1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Merge pull request #3947 from godric3/map-editor-fix-prison-hero-selection

map editor: fix prison hero selection
This commit is contained in:
Ivan Savenko 2024-05-12 16:01:25 +03:00 committed by GitHub
commit 9921065088
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);
}
}