1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Bonus type ARTIFACT_CHARGE

This commit is contained in:
SoundSSGood
2025-05-11 22:42:41 +02:00
parent 9bbebd62e9
commit a750adf705
6 changed files with 31 additions and 2 deletions

View File

@@ -271,7 +271,14 @@ void CArtifactsOfHeroBase::setSlotData(ArtPlacePtr artPlace, const ArtifactPosit
{
artPlace->lockSlot(slotInfo->locked);
artPlace->setArtifact(slotInfo->getArt()->getTypeId(), slotInfo->getArt()->getScrollSpellID());
if(slotInfo->locked || slotInfo->getArt()->isCombined())
if(slotInfo->locked)
return;
const auto curArt = slotInfo->getArt();
// If the artifact has charges, add charges information
artPlace->addChargesArtInfo(curArt->valOfBonuses(BonusType::ARTIFACT_CHARGE));
if(curArt->isCombined())
return;
// If the artifact is part of at least one combined artifact, add additional information