1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

CArtifact refactoring

This commit is contained in:
SoundSSGood
2023-06-29 18:34:07 +03:00
parent d44821e733
commit 060aecc61c
11 changed files with 110 additions and 77 deletions

View File

@@ -257,11 +257,11 @@ void CArtifactsOfHeroBase::setSlotData(ArtPlacePtr artPlace, const ArtifactPosit
{
artPlace->lockSlot(slotInfo->locked);
artPlace->setArtifact(slotInfo->artifact);
if(!slotInfo->artifact->canBeDisassembled())
if(!slotInfo->artifact->isCombined())
{
// If the artifact is part of at least one combined artifact, add additional information
std::map<const CArtifact*, int> arts;
for(const auto combinedArt : slotInfo->artifact->artType->constituentOf)
for(const auto combinedArt : slotInfo->artifact->artType->partOf)
{
arts.insert(std::pair(combinedArt, 0));
for(const auto part : *combinedArt->constituents)