1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00
- Fixed upgrades not working after recent changes. Now all upgrades will be handled by creature names.
This commit is contained in:
DjWarmonger
2012-11-14 15:26:33 +00:00
parent a7cea94247
commit 13a5a820d0
4 changed files with 78 additions and 68 deletions

View File

@ -118,6 +118,16 @@ void CModHandler::reload()
VLC->dobjinfo->gobjs[Obj::MONSTER][crea->idNumber] = info;
}
BOOST_FOREACH(auto up, crea->upgradeNames)
{
auto it = VLC->creh->nameToID.find(up);
if (it != VLC->creh->nameToID.end())
{
crea->upgrades.insert (it->second);
}
else
tlog2 << "Not found upgrade with name " << up << "\n";
}
}
}