@@ -372,7 +372,7 @@ std::string CObjectClassesHandler::getObjectName(si32 type, si32 subtype) const
SObjectSounds CObjectClassesHandler::getObjectSounds(si32 type, si32 subtype) const
{
- if(type == Obj::PRISON || type == Obj::HERO)
+ if(type == Obj::PRISON || type == Obj::HERO || type == Obj::SPELL_SCROLL)
subtype = 0;
assert(type < objects.size());
@@ -468,6 +468,9 @@ void MainWindow::addGroupIntoCatalog(const std::string & groupName, bool useCust
itemGroup = itms.front();
}
+ if (VLC->objtypeh->knownObjects().count(ID) == 0)
+ return;
+
auto knownSubObjects = VLC->objtypeh->knownSubObjects(ID);
for(auto secondaryID : knownSubObjects)