1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

check amount of artifacts on hero when checking requirements of a quest that requires artifact(s)

fixes case when 2 or more identical artifacts are required
This commit is contained in:
Andrey Filipenkov
2022-10-01 09:28:32 +03:00
parent 86708841f8
commit aa217236b3
6 changed files with 52 additions and 16 deletions

View File

@ -1758,7 +1758,7 @@ CGSeerHut * CMapLoaderH3M::readSeerHut()
if (artID != 255)
{
//not none quest
hut->quest->m5arts.push_back (artID);
hut->quest->addArtifactID(artID);
hut->quest->missionType = CQuest::MISSION_ART;
}
else
@ -1887,7 +1887,7 @@ void CMapLoaderH3M::readQuest(IQuestObject * guard)
for(int yy = 0; yy < artNumber; ++yy)
{
int artid = reader.readUInt16();
guard->quest->m5arts.push_back(artid);
guard->quest->addArtifactID(artid);
map->allowedArtifact[artid] = false; //these are unavailable for random generation
}
break;