mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
Remove compat code for old banks, fixes crash on loading old mods
This commit is contained in:
@ -217,16 +217,6 @@ TObjectTypeHandler CObjectClassesHandler::loadSubObjectFromJson(const std::strin
|
|||||||
assert(handlerConstructors.count(handler) != 0);
|
assert(handlerConstructors.count(handler) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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)
|
|
||||||
{
|
|
||||||
if (entry.Struct().count("levels") && !entry.Struct().count("rewards"))
|
|
||||||
handler = "bank";
|
|
||||||
else
|
|
||||||
handler = "configurable";
|
|
||||||
}
|
|
||||||
|
|
||||||
auto createdObject = handlerConstructors.at(handler)();
|
auto createdObject = handlerConstructors.at(handler)();
|
||||||
|
|
||||||
createdObject->modScope = scope;
|
createdObject->modScope = scope;
|
||||||
|
Reference in New Issue
Block a user