diff --git a/hch/CGeneralTextHandler.cpp b/hch/CGeneralTextHandler.cpp index 39154755a..356f8a79f 100644 --- a/hch/CGeneralTextHandler.cpp +++ b/hch/CGeneralTextHandler.cpp @@ -440,6 +440,47 @@ void CGeneralTextHandler::load() loadToIt(buffo,buf,it,3); levels.push_back(buffo); } + buf = bitmaph->getTextFile ("SEERHUT.TXT"); + it = 0; + for (i = 0; i < 7; ++i) //misc description + loadToIt (dump,buf,it,3); + tlog5 << "\t\t Drop the crap\n"; + seerEmpty.resize(6); + for (i = 0; i < 6; ++i) + { + loadToIt(tmp, buf, it, 4); + seerEmpty.push_back(tmp); + } + tlog5 << "\t\t Loaded empty\n"; + int j,k; + quests.resize(6); + for (i = 0; i < 6; ++i) + { + quests[i].resize(5); + for (j = 0; j < 5; ++j) + { + quests[i][j].resize(6); + loadToIt (dump, buf, it, 4); //front desciption + for (k = 0; k < 6; ++k) + { + loadToIt (quests[i][j][k], buf, it, 4); + trimQuotation (quests[i][j][k]); + } + } + } + tlog5 << "\t\t Loaded quests\n"; + for (i = 0; i < 6; ++i) //gap description + loadToIt(dump,buf,it,4); + seerNames.resize(48); + for (i = 0; i < 14; ++i) //additional tabs + { + loadToIt(seerNames[i], buf, it, 4); + loadToIt(dump, buf, it, 3); + } + tlog5 << "\t\t Loaded names1\n"; + for (i = 14; i < 48; ++i) + loadToIt(seerNames[i], buf, it, 3); + tlog5 << "\t\t Loaded names2\n"; } diff --git a/hch/CGeneralTextHandler.h b/hch/CGeneralTextHandler.h index ee26a1f88..f8b4f93a8 100644 --- a/hch/CGeneralTextHandler.h +++ b/hch/CGeneralTextHandler.h @@ -61,6 +61,7 @@ public: std::vector terrainNames; std::vector randsign; std::vector > mines; //first - name; second - event description + std::vector seerEmpty; std::vector > > quests; //[quest][type][index] //type: quest, progress, complete, rollover, log OR time limit //index: 0-2 seer hut, 3-5 border guard std::vector seerNames; diff --git a/hch/CObjectHandler.cpp b/hch/CObjectHandler.cpp index e2a68dd64..1c2d57b1d 100644 --- a/hch/CObjectHandler.cpp +++ b/hch/CObjectHandler.cpp @@ -3159,12 +3159,13 @@ bool CQuest::checkQuest (const CGHeroInstance * h) const void CGSeerHut::initObj() { - //seerName = & (VLC->generaltexth->seerNames[ran()%VLC->generaltexth->seerNames.size()]); + seerName = & (VLC->generaltexth->seerNames[ran()%VLC->generaltexth->seerNames.size()]); } const std::string & CGSeerHut::getHoverText() const { - return VLC->generaltexth->names[ID]; //TODO + //return VLC->generaltexth->names[ID]; //TODO + return seerName; } void CGSeerHut::onHeroVisit( const CGHeroInstance * h ) const