mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Converted terrainTypeHandler into proper handler class
This commit is contained in:
@@ -121,7 +121,7 @@ void Object::Instance::setTemplate(TerrainId terrain)
|
||||
auto templates = VLC->objtypeh->getHandlerFor(dObject.ID, dObject.subID)->getTemplates(terrain);
|
||||
if (templates.empty())
|
||||
{
|
||||
auto terrainName = VLC->terrainTypeHandler->terrains()[terrain].name;
|
||||
auto terrainName = VLC->terrainTypeHandler->getById(terrain)->name;
|
||||
throw rmgException(boost::to_string(boost::format("Did not find graphics for object (%d,%d) at %s") % dObject.ID % dObject.subID % terrainName));
|
||||
}
|
||||
dObject.appearance = templates.front();
|
||||
|
||||
Reference in New Issue
Block a user