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

Fix level up crashes: 1) Crash on double level up. 2) Crash on custom class level up.

This commit is contained in:
Dmitry Orlov
2020-10-19 22:39:57 +03:00
parent 643cc00db6
commit b25baf66be
5 changed files with 33 additions and 6 deletions

View File

@ -34,6 +34,7 @@ CSkill::LevelInfo::~LevelInfo()
CSkill::CSkill(SecondarySkill id, std::string identifier)
: id(id), identifier(identifier)
{
gainChance[0] = gainChance[1] = 0; //affects CHeroClassHandler::afterLoadFinalization()
levels.resize(NSecondarySkill::levels.size() - 1);
}