1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

use ArtifactID

This commit is contained in:
SoundSSGood
2022-11-29 00:11:46 +02:00
parent 3b072b80d5
commit 909dcb82fa
12 changed files with 57 additions and 47 deletions

View File

@ -1152,7 +1152,7 @@ void CMapLoaderJson::MapObjectLoader::configure()
if(auto art = dynamic_cast<CGArtifact *>(instance))
{
int artID = ArtifactID::NONE;
auto artID = ArtifactID::NONE;
int spellID = -1;
if(art->ID == Obj::SPELL_SCROLL)
@ -1168,7 +1168,7 @@ void CMapLoaderJson::MapObjectLoader::configure()
else if(art->ID == Obj::ARTIFACT)
{
//specific artifact
artID = art->subID;
artID = ArtifactID(art->subID);
}
art->storedArtifact = CArtifactInstance::createArtifact(owner->map, artID, spellID);