1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

CArtifactSet cleanup

This commit is contained in:
SoundSSGood
2024-09-19 16:51:59 +03:00
parent b9ae7f1138
commit 586a32a616
14 changed files with 112 additions and 149 deletions

View File

@@ -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])

View File

@@ -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());
}
}