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

CArtifact getters setters

This commit is contained in:
SoundSSGood
2023-07-03 23:11:56 +03:00
parent fd9c7352a0
commit 9b5f6ec7cf
22 changed files with 68 additions and 57 deletions

View File

@@ -406,10 +406,10 @@ void CGHeroInstance::initArmy(CRandomGenerator & rand, IArmyDescriptor * dst)
ArtifactID aid = creature->warMachine;
const CArtifact * art = aid.toArtifact();
if(art != nullptr && !art->possibleSlots.at(ArtBearer::HERO).empty())
if(art != nullptr && !art->getPossibleSlots().at(ArtBearer::HERO).empty())
{
//TODO: should we try another possible slots?
ArtifactPosition slot = art->possibleSlots.at(ArtBearer::HERO).front();
ArtifactPosition slot = art->getPossibleSlots().at(ArtBearer::HERO).front();
if(!getArt(slot))
putArtifact(slot, ArtifactUtils::createNewArtifactInstance(aid));