1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

use subid

This commit is contained in:
Laserlicht
2024-10-01 20:44:08 +02:00
parent bd58caac13
commit e85e938865
3 changed files with 13 additions and 12 deletions

View File

@ -353,7 +353,7 @@ TObjectTypeHandler CObjectClassesHandler::getHandlerFor(MapObjectID type, MapObj
return mapObjectTypes.front()->objectTypeHandlers.front();
auto subID = subtype.getNum();
if (type == Obj::PRISON || type == Obj::HERO_PLACEHOLDER)
if (type == Obj::PRISON || type == Obj::HERO_PLACEHOLDER || type == Obj::SPELL_SCROLL)
subID = 0;
auto result = mapObjectTypes.at(type.getNum())->objectTypeHandlers.at(subID);