1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Fix for quest artifacts

This commit is contained in:
DjWarmonger
2010-07-09 05:07:56 +00:00
parent 3af697b91a
commit b189356a63
2 changed files with 4 additions and 3 deletions

View File

@@ -910,7 +910,7 @@ std::pair<int,int> CGameState::pickObject (CGObjectInstance *obj)
{
switch(obj->ID)
{
case 65: //random artifact //how the hell use IGameCallback for this?
case 65:
return std::pair<int,int>(5, VLC->arth->getRandomArt (CArtifact::ART_TREASURE | CArtifact::ART_MINOR | CArtifact::ART_MAJOR | CArtifact::ART_RELIC));
case 66: //random treasure artifact
return std::pair<int,int>(5, VLC->arth->getRandomArt (CArtifact::ART_TREASURE));

View File

@@ -2072,8 +2072,9 @@ void Mapa::loadQuest(CQuest * guard, const unsigned char * bufor, int & i)
int artNumber = bufor[i]; ++i;
for(int yy=0; yy<artNumber; ++yy)
{
guard->m5arts.push_back(readNormalNr(bufor,i, 2)); i+=2;
allowedArtifact[artNumber] = false; //these are unavaliable for random generation
int artid = readNormalNr(bufor,i, 2); i+=2;
guard->m5arts.push_back(artid);
allowedArtifact[artid] = false; //these are unavaliable for random generation
}
break;
}