mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Fix regressions in RMG & map editor
This commit is contained in:
		| @@ -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) | ||||
| 	{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user