1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00
This commit is contained in:
DjWarmonger
2010-06-06 09:50:37 +00:00
parent 2ed69d3f4d
commit e0dc6573bf
2 changed files with 18 additions and 12 deletions

View File

@ -3271,14 +3271,19 @@ void CGSeerHut::initObj()
seerName = VLC->generaltexth->seerNames[ran()%VLC->generaltexth->seerNames.size()]; seerName = VLC->generaltexth->seerNames[ran()%VLC->generaltexth->seerNames.size()];
textOption = ran()%3; textOption = ran()%3;
progress = 0; progress = 0;
if (missionType && !isCustom) if (missionType)
{ {
if (!isCustom)
{
firstVisitText = VLC->generaltexth->quests[missionType-1][0][textOption]; firstVisitText = VLC->generaltexth->quests[missionType-1][0][textOption];
nextVisitText = VLC->generaltexth->quests[missionType-1][1][textOption]; nextVisitText = VLC->generaltexth->quests[missionType-1][1][textOption];
completedText = VLC->generaltexth->quests[missionType-1][2][textOption]; completedText = VLC->generaltexth->quests[missionType-1][2][textOption];
} }
}
else else
firstVisitText = VLC->generaltexth->seerEmpty[textOption]; firstVisitText = VLC->generaltexth->seerEmpty[textOption];
} }
const std::string & CGSeerHut::getHoverText() const const std::string & CGSeerHut::getHoverText() const

View File

@ -1045,21 +1045,21 @@ void Mapa::readHeader( const unsigned char * bufor, int &i)
i+=31; //omitting NULLS i+=31; //omitting NULLS
allowedArtifact.resize(ARTIFACTS_QUANTITY); allowedArtifact.resize(ARTIFACTS_QUANTITY);
for(unsigned int x=0;x<allowedArtifact.size();x++) for (unsigned int x=0; x<allowedArtifact.size(); x++)
allowedArtifact[x] = true; allowedArtifact[x] = true;
//reading allowed artifacts: 17 or 18 bytes //reading allowed artifacts: 17 or 18 bytes
if(version!=RoE) if (version!=RoE)
{ {
ist=i; //starting i for loop ist=i; //starting i for loop
for(i; i<ist+(version==AB ? 17 : 18); ++i) for (i; i<ist+(version==AB ? 17 : 18); ++i)
{ {
unsigned char c = bufor[i]; unsigned char c = bufor[i];
for(int yy=0; yy<8; ++yy) for (int yy=0; yy<8; ++yy)
{ {
if((i-ist)*8+yy < ARTIFACTS_QUANTITY) if ((i-ist)*8+yy < ARTIFACTS_QUANTITY)
{ {
if(c == (c|((unsigned char)intPow(2, yy)))) if (c == (c|((unsigned char)intPow(2, yy))))
allowedArtifact[(i-ist)*8+yy] = false; allowedArtifact[(i-ist)*8+yy] = false;
} }
} }
@ -1831,6 +1831,7 @@ void Mapa::readObjects( const unsigned char * bufor, int &i)
nobj = new CGMagicWell(); nobj = new CGMagicWell();
break; break;
} }
case 15: //Cover of darkness
case 58: //Redwood Observatory case 58: //Redwood Observatory
case 60: //Pillar of Fire case 60: //Pillar of Fire
{ {
@ -2094,9 +2095,9 @@ void Mapa::loadQuest(CQuest * guard, const unsigned char * bufor, int & i)
guard->nextVisitText = readString(bufor,i); guard->nextVisitText = readString(bufor,i);
guard->completedText = readString(bufor,i); guard->completedText = readString(bufor,i);
if (guard->firstVisitText.size() && guard->nextVisitText.size() && guard->completedText.size()) if (guard->firstVisitText.size() && guard->nextVisitText.size() && guard->completedText.size())
guard->isCustom = false; //randomize all if any text is missing
else
guard->isCustom = true; guard->isCustom = true;
else
guard->isCustom = false; //randomize all if any text is missing
} }
TerrainTile & Mapa::getTile( int3 tile ) TerrainTile & Mapa::getTile( int3 tile )