mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
CArtifactSet cleanup
This commit is contained in:
@@ -743,7 +743,7 @@ void BattleWindow::bSpellf()
|
||||
const auto artID = blockingBonus->sid.as<ArtifactID>();
|
||||
//If we have artifact, put name of our hero. Otherwise assume it's the enemy.
|
||||
//TODO check who *really* is source of bonus
|
||||
std::string heroName = myHero->hasArt(artID) ? myHero->getNameTranslated() : owner.enemyHero().name;
|
||||
std::string heroName = myHero->hasArt(artID, true) ? myHero->getNameTranslated() : owner.enemyHero().name;
|
||||
|
||||
//%s wields the %s, an ancient artifact which creates a p dead to all magic.
|
||||
LOCPLINT->showInfoDialog(boost::str(boost::format(CGI->generaltexth->allTexts[683])
|
||||
|
||||
@@ -271,7 +271,7 @@ void CArtifactsOfHeroBase::setSlotData(ArtPlacePtr artPlace, const ArtifactPosit
|
||||
arts.try_emplace(combinedArt->getId(), std::vector<ArtifactID>{});
|
||||
for(const auto part : combinedArt->getConstituents())
|
||||
{
|
||||
if(curHero->hasArt(part->getId(), false, false, false))
|
||||
if(curHero->hasArt(part->getId(), false, false))
|
||||
arts.at(combinedArt->getId()).emplace_back(part->getId());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user