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

arts refactoring part1

This commit is contained in:
SoundSSGood
2023-04-13 20:40:36 +03:00
parent 59a7105385
commit 9a838598a6
8 changed files with 82 additions and 76 deletions

View File

@@ -101,7 +101,7 @@ boost::optional<int> MapObjectsEvaluator::getObjectValue(const CGObjectInstance
else if(obj->ID == Obj::SPELL_SCROLL)
{
auto scrollObject = dynamic_cast<const CGArtifact *>(obj);
auto spell = scrollObject->storedArtifact->getGivenSpellID().toSpell();
auto spell = scrollObject->storedArtifact->getScrollSpellID().toSpell();
if(spell)
{
switch(spell->getLevel())
@@ -116,7 +116,7 @@ boost::optional<int> MapObjectsEvaluator::getObjectValue(const CGObjectInstance
}
}
else
logAi->warn("AI found spell scroll with invalid spell ID: %s", scrollObject->storedArtifact->getGivenSpellID());
logAi->warn("AI found spell scroll with invalid spell ID: %s", scrollObject->storedArtifact->getScrollSpellID());
}
return getObjectValue(obj->ID, obj->subID);