mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
* spell scroll campaign bonus
* minor fix (gratuitous call to giveCampaignBonusToHero)
This commit is contained in:
@ -475,7 +475,7 @@ void CGarrisonInt::activate()
|
|||||||
for(size_t i = 0; i<splitButtons.size(); i++)
|
for(size_t i = 0; i<splitButtons.size(); i++)
|
||||||
if( (splitButtons[i]->isBlocked()) != !highlighted)
|
if( (splitButtons[i]->isBlocked()) != !highlighted)
|
||||||
splitButtons[i]->block(!highlighted);
|
splitButtons[i]->block(!highlighted);
|
||||||
|
|
||||||
CIntObject::activate();
|
CIntObject::activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -517,7 +517,7 @@ CInfoWindow::CInfoWindow()
|
|||||||
ID = -1;
|
ID = -1;
|
||||||
setDelComps(false);
|
setDelComps(false);
|
||||||
text = NULL;
|
text = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInfoWindow::close()
|
void CInfoWindow::close()
|
||||||
{
|
{
|
||||||
|
@ -814,7 +814,10 @@ void CGameState::init( StartInfo * si, ui32 checksum, int Seed )
|
|||||||
hero->giveArtifact(curBonus.info2);
|
hero->giveArtifact(curBonus.info2);
|
||||||
break;
|
break;
|
||||||
case 4: //spell scroll
|
case 4: //spell scroll
|
||||||
//TODO
|
{
|
||||||
|
CArtifactInstance * scroll = CArtifactInstance::createScroll(VLC->spellh->spells[curBonus.info2]);
|
||||||
|
scroll->putAt(hero, scroll->firstAvailableSlot(hero));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 5: //prim skill
|
case 5: //prim skill
|
||||||
{
|
{
|
||||||
@ -1069,11 +1072,6 @@ void CGameState::init( StartInfo * si, ui32 checksum, int Seed )
|
|||||||
map->heroes.push_back(nnn);
|
map->heroes.push_back(nnn);
|
||||||
map->objects.push_back(nnn);
|
map->objects.push_back(nnn);
|
||||||
map->addBlockVisTiles(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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user