1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Use ArtifactInstanceID in CGArtifact

This commit is contained in:
Ivan Savenko
2025-03-18 20:38:12 +00:00
parent ab11d2b075
commit 16a06179cf
11 changed files with 53 additions and 39 deletions

View File

@@ -1406,7 +1406,7 @@ std::shared_ptr<CGObjectInstance> CMapLoaderH3M::readArtifact(const int3 & mapPo
logGlobal->warn("Map '%s': Artifact %s: not implemented pickup mode %d (flags: %d)", mapName, mapPosition.toString(), pickupMode, static_cast<int>(pickupFlags));
}
object->storedArtifact = map->createArtifact(artID, SpellID::NONE);
object->setArtifactInstance(map->createArtifact(artID, SpellID::NONE));
return object;
}
@@ -1416,7 +1416,7 @@ std::shared_ptr<CGObjectInstance> CMapLoaderH3M::readScroll(const int3 & mapPosi
readMessageAndGuards(object->message, object.get(), mapPosition);
SpellID spellID = reader->readSpell32();
object->storedArtifact = map->createArtifact(ArtifactID::SPELL_SCROLL, spellID.getNum());
object->setArtifactInstance(map->createArtifact(ArtifactID::SPELL_SCROLL, spellID.getNum()));
return object;
}