1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

HeroBonus: get rid of code that used getBonusList

This commit is contained in:
ArseniyShestakov
2015-12-11 16:01:51 +03:00
parent 8fb5dacba2
commit 1730a31471
4 changed files with 12 additions and 6 deletions

View File

@@ -452,8 +452,14 @@ void CCreatureHandler::loadCrExpBon()
}
do //parse everything that's left
{
b.sid = parser.readNumber(); //id = this particular creature ID
loadStackExp(b, creatures[b.sid]->getBonusList(), parser); //add directly to CCreature Node
auto sid = parser.readNumber(); //id = this particular creature ID
b.sid = sid;
bl.clear();
loadStackExp(b, bl, parser);
for(Bonus * b : bl)
{
creatures[sid]->addNewBonus(b); //add directly to CCreature Node
}
}
while (parser.endLine());