diff --git a/lib/Connection.h b/lib/Connection.h index 5e3ee07a9..69e3725b4 100644 --- a/lib/Connection.h +++ b/lib/Connection.h @@ -27,7 +27,7 @@ #include "mapping/CCampaignHandler.h" //for CCampaignState #include "rmg/CMapGenerator.h" // for CMapGenOptions -const ui32 version = 756; +const ui32 version = 757; const ui32 minSupportedVersion = 753; class CISer; diff --git a/lib/mapObjects/CQuest.cpp b/lib/mapObjects/CQuest.cpp index 0db3258bd..8432dfc50 100644 --- a/lib/mapObjects/CQuest.cpp +++ b/lib/mapObjects/CQuest.cpp @@ -416,6 +416,7 @@ void CGSeerHut::init() { seerName = *RandomGeneratorUtil::nextItem(VLC->generaltexth->seerNames, cb->gameState()->getRandomGenerator()); quest->textOption = cb->gameState()->getRandomGenerator().nextInt(2); + quest->completedOption = cb->gameState()->getRandomGenerator().nextInt(1, 5); } void CGSeerHut::initObj() @@ -435,7 +436,7 @@ void CGSeerHut::initObj() else { quest->progress = CQuest::COMPLETE; - quest->firstVisitText = VLC->generaltexth->seerEmpty[quest->textOption]; + quest->firstVisitText = VLC->generaltexth->seerEmpty[quest->completedOption]; } } @@ -582,7 +583,7 @@ void CGSeerHut::onHeroVisit( const CGHeroInstance * h ) const } else { - iw.text << VLC->generaltexth->seerEmpty[quest->textOption]; + iw.text << VLC->generaltexth->seerEmpty[quest->completedOption]; if (ID == Obj::SEER_HUT) iw.text.addReplacement(seerName); cb->showInfoDialog(&iw); diff --git a/lib/mapObjects/CQuest.h b/lib/mapObjects/CQuest.h index cc9fd9063..fe02c57de 100644 --- a/lib/mapObjects/CQuest.h +++ b/lib/mapObjects/CQuest.h @@ -37,8 +37,11 @@ public: std::vector m6creatures; //pair[cre id, cre count], CreatureSet info irrelevant std::vector m7resources; //TODO: use resourceset? - //following field are used only for kill creature/hero missions, the original objects became inaccessible after their removal, so we need to store info needed for messages / hover text + // following fields are used only for kill creature/hero missions, the original + // objects became inaccessible after their removal, so we need to store info + // needed for messages / hover text ui8 textOption; + ui8 completedOption; CStackBasicDescriptor stackToKill; ui8 stackDirection; std::string heroName; //backup of hero name @@ -66,7 +69,16 @@ public: { h & qid & missionType & progress & lastDay & m13489val & m2stats & m5arts & m6creatures & m7resources & textOption & stackToKill & stackDirection & heroName & heroPortrait - & firstVisitText & nextVisitText & completedText & isCustomFirst & isCustomNext & isCustomComplete; + & firstVisitText & nextVisitText & completedText & isCustomFirst + & isCustomNext & isCustomComplete; + if(version >= 757) + { + h & completedOption; + } + else if(!h.saving) + { + completedOption = 1; + } } };