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

Merge pull request #4490 from godric3/fix-campaign-hero-placeholder

Fix campaign hero placeholder
This commit is contained in:
Ivan Savenko
2024-09-09 23:39:20 +03:00
committed by GitHub
4 changed files with 16 additions and 2 deletions

View File

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