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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user