1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-17 20:58:07 +02:00

Fixes Adrienne starting without Inferno spell in campaign

This commit is contained in:
Ivan Savenko 2024-05-29 14:28:36 +00:00
parent a092760237
commit 49138e3de9

View File

@ -1866,7 +1866,12 @@ CGObjectInstance * CMapLoaderH3M::readHero(const int3 & mapPosition, const Objec
//we can read one spell
SpellID spell = reader->readSpell();
if(spell != SpellID::NONE)
// workaround: VCMI uses 'PRESET' spell to indicate that spellbook has been preconfigured on map
// but H3 uses 'PRESET' spell (-2) to indicate that game should give standard spell to hero
if(spell == SpellID::NONE)
object->spells.insert(SpellID::PRESET); //spellbook is preconfigured to be empty
if (spell.hasValue())
object->spells.insert(spell);
}