1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +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

@@ -1159,8 +1159,8 @@ CGObjectInstance * CMapLoaderH3M::readGarrison(const int3 & mapPosition)
CGObjectInstance * CMapLoaderH3M::readArtifact(const int3 & mapPosition, std::shared_ptr<const ObjectTemplate> objectTemplate)
{
auto artID = ArtifactID::NONE; //random, set later
int spellID = -1;
ArtifactID artID = ArtifactID::NONE; //random, set later
SpellID spellID = SpellID::NONE;
auto * object = new CGArtifact();
readMessageAndGuards(object->message, object, mapPosition);
@@ -1176,7 +1176,7 @@ CGObjectInstance * CMapLoaderH3M::readArtifact(const int3 & mapPosition, std::sh
artID = ArtifactID(objectTemplate->subid);
}
object->storedArtifact = ArtifactUtils::createArtifact(map, artID, spellID);
object->storedArtifact = ArtifactUtils::createArtifact(map, artID, spellID.getNum());
return object;
}