1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-19 00:17:56 +02:00

Converted creature ID and spell ID to new form

This commit is contained in:
Ivan Savenko
2023-08-19 20:48:28 +03:00
parent ec8d31bbfc
commit 17d3d663ee
33 changed files with 135 additions and 171 deletions

View File

@ -1189,8 +1189,8 @@ void CMapLoaderJson::MapObjectLoader::configure()
if(auto * art = dynamic_cast<CGArtifact *>(instance))
{
auto artID = ArtifactID::NONE;
int spellID = -1;
ArtifactID artID = ArtifactID::NONE;
SpellID spellID = SpellID::NONE;
if(art->ID == Obj::SPELL_SCROLL)
{
@ -1208,7 +1208,7 @@ void CMapLoaderJson::MapObjectLoader::configure()
artID = ArtifactID(art->subID);
}
art->storedArtifact = ArtifactUtils::createArtifact(owner->map, artID, spellID);
art->storedArtifact = ArtifactUtils::createArtifact(owner->map, artID, spellID.getNum());
}
if(auto * hero = dynamic_cast<CGHeroInstance *>(instance))