1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

CQuest: add missing completedOption initialization for CGQuestGuard

This commit is contained in:
Arseniy Shestakov 2016-01-27 23:24:17 +03:00
parent 4e8486da7b
commit b7fbbfdebe

View File

@ -416,7 +416,7 @@ void CGSeerHut::init()
{ {
seerName = *RandomGeneratorUtil::nextItem(VLC->generaltexth->seerNames, cb->gameState()->getRandomGenerator()); seerName = *RandomGeneratorUtil::nextItem(VLC->generaltexth->seerNames, cb->gameState()->getRandomGenerator());
quest->textOption = cb->gameState()->getRandomGenerator().nextInt(2); quest->textOption = cb->gameState()->getRandomGenerator().nextInt(2);
quest->completedOption = cb->gameState()->getRandomGenerator().nextInt(1, 5); quest->completedOption = cb->gameState()->getRandomGenerator().nextInt(1, 3);
} }
void CGSeerHut::initObj() void CGSeerHut::initObj()
@ -746,6 +746,7 @@ void CGQuestGuard::init()
{ {
blockVisit = true; blockVisit = true;
quest->textOption = cb->gameState()->getRandomGenerator().nextInt(3, 5); quest->textOption = cb->gameState()->getRandomGenerator().nextInt(3, 5);
quest->completedOption = cb->gameState()->getRandomGenerator().nextInt(4, 5);
} }
void CGQuestGuard::completeQuest(const CGHeroInstance *h) const void CGQuestGuard::completeQuest(const CGHeroInstance *h) const