mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-14 02:33:51 +02:00
Do not activate mana vortex if hero already has double mana
This commit is contained in:
parent
4e7809d934
commit
38bee87cf4
@ -181,13 +181,14 @@ void COPWBonus::onHeroVisit (const CGHeroInstance * h) const
|
|||||||
if(visitors.empty())
|
if(visitors.empty())
|
||||||
{
|
{
|
||||||
if(h->mana < h->manaLimit() * 2)
|
if(h->mana < h->manaLimit() * 2)
|
||||||
|
{
|
||||||
cb->setManaPoints (heroID, 2 * h->manaLimit());
|
cb->setManaPoints (heroID, 2 * h->manaLimit());
|
||||||
//TODO: investigate line below
|
//TODO: investigate line below
|
||||||
//cb->setObjProperty (town->id, ObjProperty::VISITED, true);
|
//cb->setObjProperty (town->id, ObjProperty::VISITED, true);
|
||||||
iw.text.appendRawString(getVisitingBonusGreeting());
|
iw.text.appendRawString(getVisitingBonusGreeting());
|
||||||
cb->showInfoDialog(&iw);
|
cb->showInfoDialog(&iw);
|
||||||
//extra visit penalty if hero alredy had double mana points (or even more?!)
|
town->addHeroToStructureVisitors(h, indexOnTV);
|
||||||
town->addHeroToStructureVisitors(h, indexOnTV);
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user