1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

CCombinedArtifactInstance refactoring

This commit is contained in:
SoundSSGood
2023-06-18 15:21:35 +03:00
parent 7aef0f404b
commit 07c811dd67
8 changed files with 99 additions and 165 deletions

View File

@@ -153,7 +153,7 @@ bool CQuest::checkQuest(const CGHeroInstance * h) const
if(h->getArtPosCount(elem.first, false, true, true) < elem.second)
return false;
if(!h->hasArt(elem.first))
reqSlots += h->getAssemblyByConstituent(elem.first)->constituentsInfo.size() - 2;
reqSlots += h->getAssemblyByConstituent(elem.first)->partsInfo.size() - 2;
}
if(ArtifactUtils::isBackpackFreeSlots(h, reqSlots))
return true;
@@ -804,7 +804,7 @@ void CGSeerHut::finishQuest(const CGHeroInstance * h, ui32 accept) const
{
const auto * assembly = h->getAssemblyByConstituent(elem);
assert(assembly);
auto parts = assembly->constituentsInfo;
auto parts = assembly->partsInfo;
// Remove the assembly
cb->removeArtifact(ArtifactLocation(h, h->getArtPos(assembly)));