mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-13 01:20:34 +02:00
Little more events
[Still need more work]
This commit is contained in:
@ -2308,9 +2308,25 @@ void CGEvent::giveContents( const CGHeroInstance *h, bool afterBattle ) const
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(spells.size())
|
||||||
|
{
|
||||||
|
std::set<ui32> spellsToGive;
|
||||||
|
iw.components.clear();
|
||||||
|
for(int i=0; i<spells.size(); i++)
|
||||||
|
{
|
||||||
|
iw.components.push_back(Component(Component::SPELL,spells[i],0,0));
|
||||||
|
spellsToGive.insert(spells[i]);
|
||||||
|
}
|
||||||
|
if(spellsToGive.size())
|
||||||
|
{
|
||||||
|
cb->changeSpells(h->id,true,spellsToGive);
|
||||||
|
cb->showInfoDialog(&iw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(manaDiff)
|
if(manaDiff)
|
||||||
{
|
{
|
||||||
getText(iw,afterBattle,luckDiff,176,177,h);
|
getText(iw,afterBattle,manaDiff,176,177,h);
|
||||||
iw.components.push_back(Component(Component::PRIM_SKILL,5,manaDiff,0));
|
iw.components.push_back(Component(Component::PRIM_SKILL,5,manaDiff,0));
|
||||||
cb->showInfoDialog(&iw);
|
cb->showInfoDialog(&iw);
|
||||||
cb->setManaPoints(h->id, h->mana + manaDiff);
|
cb->setManaPoints(h->id, h->mana + manaDiff);
|
||||||
@ -2318,7 +2334,7 @@ void CGEvent::giveContents( const CGHeroInstance *h, bool afterBattle ) const
|
|||||||
|
|
||||||
if(moraleDiff)
|
if(moraleDiff)
|
||||||
{
|
{
|
||||||
getText(iw,afterBattle,luckDiff,178,179,h);
|
getText(iw,afterBattle,moraleDiff,178,179,h);
|
||||||
iw.components.push_back(Component(Component::MORALE,0,moraleDiff,0));
|
iw.components.push_back(Component(Component::MORALE,0,moraleDiff,0));
|
||||||
cb->showInfoDialog(&iw);
|
cb->showInfoDialog(&iw);
|
||||||
GiveBonus gb;
|
GiveBonus gb;
|
||||||
|
Reference in New Issue
Block a user