mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Fixes for loading 1.5 mods in vcmi 1.6
This commit is contained in:
@ -207,8 +207,13 @@ TObjectTypeHandler CObjectClassesHandler::loadSubObjectFromJson(const std::strin
|
||||
|
||||
// Compatibility with 1.5 mods for 1.6. To be removed in 1.7
|
||||
// Detect banks that use old format and load them using old bank hander
|
||||
if (baseObject->id == Obj::CREATURE_BANK && entry.Struct().count("levels") && !entry.Struct().count("rewards"))
|
||||
handler = "bank";
|
||||
if (baseObject->id == Obj::CREATURE_BANK)
|
||||
{
|
||||
if (entry.Struct().count("levels") && !entry.Struct().count("rewards"))
|
||||
handler = "bank";
|
||||
else
|
||||
handler = "configurable";
|
||||
}
|
||||
|
||||
auto createdObject = handlerConstructors.at(handler)();
|
||||
|
||||
|
Reference in New Issue
Block a user