1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

ArtifactUtils::createArtifact ArtifactUtils::createNewArtifactInstance unified

This commit is contained in:
SoundSSGood
2024-09-04 16:25:30 +03:00
parent b06426ac43
commit 30fa2846aa
8 changed files with 53 additions and 70 deletions

View File

@@ -343,7 +343,7 @@ void CGHeroInstance::initHero(vstd::RNG & rand)
// hero starts with default spellbook presence status
if(!getArt(ArtifactPosition::SPELLBOOK) && type->haveSpellBook)
{
auto artifact = ArtifactUtils::createNewArtifactInstance(ArtifactID::SPELLBOOK);
auto artifact = ArtifactUtils::createArtifact(ArtifactID::SPELLBOOK);
putArtifact(ArtifactPosition::SPELLBOOK, artifact);
}
}
@@ -352,7 +352,7 @@ void CGHeroInstance::initHero(vstd::RNG & rand)
if(!getArt(ArtifactPosition::MACH4))
{
auto artifact = ArtifactUtils::createNewArtifactInstance(ArtifactID::CATAPULT);
auto artifact = ArtifactUtils::createArtifact(ArtifactID::CATAPULT);
putArtifact(ArtifactPosition::MACH4, artifact); //everyone has a catapult
}
@@ -468,7 +468,7 @@ void CGHeroInstance::initArmy(vstd::RNG & rand, IArmyDescriptor * dst)
if(!getArt(slot))
{
auto artifact = ArtifactUtils::createNewArtifactInstance(aid);
auto artifact = ArtifactUtils::createArtifact(aid);
putArtifact(slot, artifact);
}
else