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

Artifact instances are now owned solely by CMap

This commit is contained in:
Ivan Savenko
2025-03-10 16:20:40 +00:00
parent 797646cc05
commit 2ca1748e96
31 changed files with 203 additions and 194 deletions

View File

@@ -278,7 +278,7 @@ void TreasurePlacer::addScrolls()
if(map.isAllowedSpell(spellID) && spellID.toSpell()->getLevel() == i + 1)
out.push_back(spellID);
}
auto * a = ArtifactUtils::createScroll(*RandomGeneratorUtil::nextItem(out, zone.getRand()));
auto * a = map.mapInstance->createScroll(*RandomGeneratorUtil::nextItem(out, zone.getRand()));
obj->storedArtifact = a;
return obj;
};