1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Bugfixing

This commit is contained in:
Ivan Savenko
2023-11-02 13:18:40 +02:00
parent f201e3019a
commit 056ef00f74
5 changed files with 25 additions and 23 deletions

View File

@@ -799,14 +799,14 @@ void CGArtifact::onHeroVisit(const CGHeroInstance * h) const
break;
case Obj::SPELL_SCROLL:
{
int spellID = storedArtifact->getScrollSpellID();
iw.components.emplace_back(ComponentType::SPELL, spellID);
SpellID spell = storedArtifact->getScrollSpellID();
iw.components.emplace_back(ComponentType::SPELL, spell);
if(!message.empty())
iw.text = message;
else
{
iw.text.appendLocalString(EMetaText::ADVOB_TXT,135);
iw.text.replaceLocalString(EMetaText::SPELL_NAME, spellID);
iw.text.replaceLocalString(EMetaText::SPELL_NAME, spell.getNum());
}
}
break;