mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Little more events
[Still need more work]
This commit is contained in:
parent
ff131a3b2f
commit
a81378617f
@ -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)
|
||||
{
|
||||
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));
|
||||
cb->showInfoDialog(&iw);
|
||||
cb->setManaPoints(h->id, h->mana + manaDiff);
|
||||
@ -2318,7 +2334,7 @@ void CGEvent::giveContents( const CGHeroInstance *h, bool afterBattle ) const
|
||||
|
||||
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));
|
||||
cb->showInfoDialog(&iw);
|
||||
GiveBonus gb;
|
||||
|
Loading…
x
Reference in New Issue
Block a user