mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-24 00:36:29 +02:00
Merge pull request #1486 from IvanSavenko/configurable_rewardables
Well, it works for my brand new objects with arbitrary bonus, so likely will work with everything else.
This commit is contained in:
@@ -1523,32 +1523,6 @@ void CGWitchHut::serializeJsonOptions(JsonSerializeFormat & handler)
|
||||
}
|
||||
}
|
||||
|
||||
void CGMagicWell::onHeroVisit( const CGHeroInstance * h ) const
|
||||
{
|
||||
int message;
|
||||
|
||||
if(h->hasBonusFrom(Bonus::OBJECT,ID)) //has already visited Well today
|
||||
{
|
||||
message = 78;//"A second drink at the well in one day will not help you."
|
||||
}
|
||||
else if(h->mana < h->manaLimit())
|
||||
{
|
||||
giveDummyBonus(h->id);
|
||||
cb->setManaPoints(h->id,h->manaLimit());
|
||||
message = 77;
|
||||
}
|
||||
else
|
||||
{
|
||||
message = 79;
|
||||
}
|
||||
showInfoDialog(h, message);
|
||||
}
|
||||
|
||||
std::string CGMagicWell::getHoverText(const CGHeroInstance * hero) const
|
||||
{
|
||||
return getObjectName() + " " + visitedTxt(hero->hasBonusFrom(Bonus::OBJECT,ID));
|
||||
}
|
||||
|
||||
void CGObservatory::onHeroVisit( const CGHeroInstance * h ) const
|
||||
{
|
||||
InfoWindow iw;
|
||||
|
||||
Reference in New Issue
Block a user