mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix regressions in RMG & map editor
This commit is contained in:
parent
d0fe875cc6
commit
b13637cdd5
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user