Browse Source

Fixed crashes with RMG Seer Huts. Now they are functional.

DjWarmonger 10 years ago
parent
commit
d840fb40eb
1 changed files with 10 additions and 2 deletions
  1. 10 2
      lib/rmg/CRmgTemplateZone.cpp

+ 10 - 2
lib/rmg/CRmgTemplateZone.cpp

@@ -2668,8 +2668,7 @@ void CRmgTemplateZone::addAllPossibleObjects(CMapGenerator* gen)
 
 	//seer huts with creatures or generic rewards
 
-	//if (questArtZone) //we won't be placing seer huts if there is no zone left to place arties
-	if (false) //FIXME: Seer Huts are bugged
+	if (questArtZone) //we won't be placing seer huts if there is no zone left to place arties
 	{
 		static const int genericSeerHuts = 8;
 		int seerHutsPerType = 0;
@@ -2726,6 +2725,9 @@ void CRmgTemplateZone::addAllPossibleObjects(CMapGenerator* gen)
 				obj->quest->missionType = CQuest::MISSION_ART;
 				ArtifactID artid = *RandomGeneratorUtil::nextItem(gen->getQuestArtsRemaning(), gen->rand);
 				obj->quest->m5arts.push_back(artid);
+				obj->quest->lastDay = -1;
+				obj->quest->isCustomFirst = obj->quest->isCustomNext = obj->quest->isCustomComplete = false;
+
 				gen->banQuestArt(artid);
 				gen->map->addQuest(obj);
 
@@ -2762,6 +2764,9 @@ void CRmgTemplateZone::addAllPossibleObjects(CMapGenerator* gen)
 				obj->quest->missionType = CQuest::MISSION_ART;
 				ArtifactID artid = *RandomGeneratorUtil::nextItem(gen->getQuestArtsRemaning(), gen->rand);
 				obj->quest->m5arts.push_back(artid);
+				obj->quest->lastDay = -1;
+				obj->quest->isCustomFirst = obj->quest->isCustomNext = obj->quest->isCustomComplete = false;
+
 				gen->banQuestArt(artid);
 				gen->map->addQuest(obj);
 
@@ -2784,6 +2789,9 @@ void CRmgTemplateZone::addAllPossibleObjects(CMapGenerator* gen)
 				obj->quest->missionType = CQuest::MISSION_ART;
 				ArtifactID artid = *RandomGeneratorUtil::nextItem(gen->getQuestArtsRemaning(), gen->rand);
 				obj->quest->m5arts.push_back(artid);
+				obj->quest->lastDay = -1;
+				obj->quest->isCustomFirst = obj->quest->isCustomNext = obj->quest->isCustomComplete = false;
+
 				gen->banQuestArt(artid);
 				gen->map->addQuest(obj);