1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-25 21:38:59 +02:00

* spell scroll campaign bonus

* minor fix (gratuitous call to giveCampaignBonusToHero)
This commit is contained in:
mateuszb 2011-02-23 11:21:40 +00:00
parent 8e7b855478
commit a6b4cfdde7
2 changed files with 6 additions and 8 deletions

View File

@ -475,7 +475,7 @@ void CGarrisonInt::activate()
for(size_t i = 0; i<splitButtons.size(); i++)
if( (splitButtons[i]->isBlocked()) != !highlighted)
splitButtons[i]->block(!highlighted);
CIntObject::activate();
}
@ -517,7 +517,7 @@ CInfoWindow::CInfoWindow()
ID = -1;
setDelComps(false);
text = NULL;
}
}
void CInfoWindow::close()
{

View File

@ -814,7 +814,10 @@ void CGameState::init( StartInfo * si, ui32 checksum, int Seed )
hero->giveArtifact(curBonus.info2);
break;
case 4: //spell scroll
//TODO
{
CArtifactInstance * scroll = CArtifactInstance::createScroll(VLC->spellh->spells[curBonus.info2]);
scroll->putAt(hero, scroll->firstAvailableSlot(hero));
}
break;
case 5: //prim skill
{
@ -1069,11 +1072,6 @@ void CGameState::init( StartInfo * si, ui32 checksum, int Seed )
map->heroes.push_back(nnn);
map->objects.push_back(nnn);
map->addBlockVisTiles(nnn);
//give campaign bonus
if (scenarioOps->mode == StartInfo::CAMPAIGN && getPlayer(nnn->tempOwner)->human)
{
HLP::giveCampaignBonusToHero(nnn, scenarioOps, campaign->camp->scenarios[scenarioOps->whichMapInCampaign].travelOptions);
}
}
}